wc3campaigns
WC3C Homepage - www.wc3c.netUser Control Panel (Requires Log-In)Engage in discussions with other users and join contests in the WC3C forums!Read one of our many tutorials, ranging in difficulty from beginner to advanced!Show off your artistic talents in the WC3C Gallery!Download quality models, textures, spells (vJASS/JASS), systems, and scripts!Download maps that have passed through our rigorous approval process!

Go Back   Wc3C.net > Warcraft III Modding > Developer's Corner > Triggers & Scripts
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 03-16-2013, 10:40 PM   #1
xintell
User
 
xintell's Avatar
 
Join Date: Mar 2013
Posts: 19

xintell has little to show at this moment (0)

Question attack range show

would like to request an effect where it shows the range

it should show attack range and skill range


I don't know if its possible but if it is and you can't do it pls link a tutorial on how

thanks in advance
xintell is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 03-17-2013, 09:14 AM   #2
Anitarf
Procrastination Incarnate


Development Director
 
Join Date: Feb 2004
Posts: 8,087

Submissions (19)

Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)

2008 Spell olympics - Fire - SilverApproved Map: Old School Alliance TacticsHero Contest #2 - 3rd PlaceSpell making session 2 winner

Default

Do you need this to show constantly, just when the unit is selected, or only when the player uses an ability?

I can think of two approaches to actually displaying the range, one is to create special effects in a circle around the unit, the other would be to use only a single custom model with something like the selection circle texture. The latter might look cooler, but requires custom art.
__________________
Anitarf is offline   Reply With Quote
Old 03-17-2013, 07:07 PM   #3
xintell
User
 
xintell's Avatar
 
Join Date: Mar 2013
Posts: 19

xintell has little to show at this moment (0)

Default

well I was looking for the first one you said when the unit is selected ^^ you can only see your own attack range after all
xintell is offline   Reply With Quote
Old 03-17-2013, 11:39 PM   #4
Anitarf
Procrastination Incarnate


Development Director
 
Join Date: Feb 2004
Posts: 8,087

Submissions (19)

Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)

2008 Spell olympics - Fire - SilverApproved Map: Old School Alliance TacticsHero Contest #2 - 3rd PlaceSpell making session 2 winner

Default

You need to create the special effects for all players or the game will desync, but you can give the special effect different model paths for different players so that way you can make them invisible for everyone except the owner.

You'd need to detect whenever a player selects a unit and, if it is a unit belonging to the player, display its range. To display the range, create a bunch of effects in a circle around the selected unit and store them in an array so you can clean them up later when a new unit is selected. Use trigonometric functions (Cos, Sin) to make the circle. You will need to use dummy units with attached effects if you want this to work for moving units, in which case you'll need a fast periodic trigger to move the range indicators along with the unit.
__________________
Anitarf is offline   Reply With Quote
Old 03-18-2013, 05:41 AM   #5
xintell
User
 
xintell's Avatar
 
Join Date: Mar 2013
Posts: 19

xintell has little to show at this moment (0)

Default

hard but also sounds fun :P I'm still new to this so it's hard without a tutorial but maybe I will be able to figure it out when I get use to this :D thanks a lot for the information
xintell is offline   Reply With Quote
Old 03-18-2013, 07:26 AM   #6
Fledermaus
default string
 
Fledermaus's Avatar
 
Join Date: May 2006
Posts: 605

Submissions (1)

Fledermaus has a spectacular aura about (134)

Send a message via MSN to Fledermaus
Default

Do you use jass, GUI, or vJass?
Fledermaus is offline   Reply With Quote
Old 03-19-2013, 03:41 AM   #7
xintell
User
 
xintell's Avatar
 
Join Date: Mar 2013
Posts: 19

xintell has little to show at this moment (0)

Default

well I am still trying what will suit me best ^^ i'm just a beginner here but I have a great background in programming :)

so now I have a range ring mdx any idea how to use it?

Last edited by xintell : 03-19-2013 at 04:47 AM.
xintell is offline   Reply With Quote
Old 03-19-2013, 11:25 AM   #8
Anitarf
Procrastination Incarnate


Development Director
 
Join Date: Feb 2004
Posts: 8,087

Submissions (19)

Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)

2008 Spell olympics - Fire - SilverApproved Map: Old School Alliance TacticsHero Contest #2 - 3rd PlaceSpell making session 2 winner

Default

Quote:
Originally Posted by xintell
so now I have a range ring mdx any idea how to use it?
I don't know, I am not familiar with the model. Where did you get it? There might be additional instructions there; otherwise, you'll need to experiment a bit.
__________________
Anitarf is offline   Reply With Quote
Old 03-20-2013, 10:21 PM   #9
xintell
User
 
xintell's Avatar
 
Join Date: Mar 2013
Posts: 19

xintell has little to show at this moment (0)

Default

range ring mdx can be scaled for the range i need and I want it to show the range of my skill as well before activating them for example when you press [F] for fireblast then the cast range will show for fire blast to know if you can reach it or not

well my ring range mdx file can be used to attach to a dummy and that dummy is attached to my model but since I will be attaching a dummy to my model then is it possible to make that dummy have a toggle ability? for example my skill set are Q, W, E, R then the dummy skill connected to my model have the same skill set but it is a toggle skill that if activated will disable the default skill which is basic attack range and change into the activated skill, after 3 sec's the ability will revert into the normal attack range.

Last edited by xintell : 03-20-2013 at 10:25 PM.
xintell is offline   Reply With Quote
Old 03-20-2013, 11:21 PM   #10
Anitarf
Procrastination Incarnate


Development Director
 
Join Date: Feb 2004
Posts: 8,087

Submissions (19)

Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)

2008 Spell olympics - Fire - SilverApproved Map: Old School Alliance TacticsHero Contest #2 - 3rd PlaceSpell making session 2 winner

Default

Quote:
Originally Posted by xintell
range ring mdx can be scaled for the range i need and I want it to show the range of my skill as well before activating them for example when you press [F] for fireblast then the cast range will show for fire blast to know if you can reach it or not
What you describe is not easy to achieve. We have no way to detect when players press the hotkey of a targeted ability.

You'd need to instead use a no-target ability with the same hotkey (ideally it should be an ability that doesn't interrupt orders like berserk), then once a unit casts that ability detect that, remove the ability, add the actual targeted ability and press its hotkey. At this point, you could show the range of the ability. After a small delay which allows the targetting cursor to come up, you'd also need to add a second no-target ability to the unit and start forcing its hotkey on a periodic timer; this is needed to allow you to detect when a player aborts the spell targeting, so you can once again remove the range indicator and ability and add the first no-target ability again.

If the player does not abort the spell targetting but instead orders to cast the spell, things get even more complicated as you can't remove the targeted ability immediately but must wait for it to be cast, or for another order being issued to the ordered unit. If the spell is cast, then removing and later readding the first no-target ability is actually the wrong thing to do since that doesn't preserve its cooldown, you'd need to use a different method of disabling it first and only remove and readd it if the targetting/casting was aborted.

You'd need to do this for every targeted spell and if a unit has more than one or two such spells then you'd run out of instant-cast no-target abilities anyway.

I'd instead recommend displaying spell ranges all the time the unit is selected.
__________________
Anitarf is offline   Reply With Quote
Old 03-21-2013, 01:48 AM   #11
xintell
User
 
xintell's Avatar
 
Join Date: Mar 2013
Posts: 19

xintell has little to show at this moment (0)

Default

oh yeah i forgot about those no target ability thanks for pointing that out but if showing the ranges will have an effect for players like delays then I won't put it :( but at least I know now it's not entirely possible :D I'll try to do this
xintell is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT. The time now is 01:34 PM.


Donate

Affiliates
The Hubb http://bylur.com - Warcraft, StarCraft, Diablo and DotA Blog & Forums The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

Powered by vBulletin (Copyright ©2000 - 2013, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services