• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Help: slow fall & blink

Status
Not open for further replies.
Level 2
Joined
Jun 16, 2007
Messages
10
My first request is for help with designing a slow fall spell.

What i currently have is a modified "metamorphosis" ability to give a flying height of 0. This does allow for the user to "fall" from a cliff while under the influence of the spell, UNFORTUNATELY it allows them to "fall" right back up the cliff.

----------------------------
My second is a modification of the blink ability. as is, blink allows the user to go over cliffs, something which i wish to deny it. If anyone has an idea as to how I can avoid this "feature" (i've thought about using a dummy ability, with triggers to check for extreme height changes, but that could result in the ability failing to go up a ramp)

-----------------------------
I'm comfortable with some minor JASS work, but if it requires more, I suppose i'll need to get to learning.
 
Level 6
Joined
Mar 2, 2006
Messages
306
modification of the blink ability

if you want the blink ability to work only for same-height terrain (and remain unchanged otherwise), try this:

  • Events
    • Unit - unit begins casting an ability
  • Conditions
    • (ability being cast) == your blink
  • Actions
    • Set L1 = position of triggering unit (point variable)
    • Set L2 = target point of ability being cast
    • if terrain height at L1 is much different then at L2 (ie: abs(a-b)>somedistance) then
      • Unit - order triggering unit to stop
      • print out a message, yellow letters, centered
    • Custom script - call RemoveLocation( udg_L1 )
    • Custom script - call RemoveLocation( udg_L2 )
 
Last edited by a moderator:
Level 2
Joined
Jun 16, 2007
Messages
10
thanks edge

Sorry for double post, edit was bugging:

So, I've found GetSpellTargetLoc() method call and I did the logical thing and tried a SetSpellTargetLoc() method call, to make blink "bug", just as it has done so many time on me in WoW. Unfortunately, this did not work.

Does anyone know of a function that would achieve the desired effect?
 
Last edited by a moderator:
Level 11
Joined
Jul 12, 2005
Messages
764
There's no such function.
Btw, I'd do this no-cliff-target thing by catching the ORDER and not the cast!

To "stop" the unit, use this structure:
Pause unit
Order unit to "stop"
Unpause unit

(A simple "stop" order does not work every time. This one does.)


And I don't think you can do anything against "falling up". A flying unit can move up/down cliffs, that's hardcoded.
 
Level 6
Joined
Mar 2, 2006
Messages
306
Btw, I'd do this no-cliff-target thing by catching the ORDER and not the cast

in case of instant-cast spells (like blink), so would i. but i wanted him to learn the more usable way as he can apply it on other spells. for example, if he wanted to abort rain of fire or storm bolt (pretty much anything targeting unit or area) if some conditions were not met, he couldn't be able to check for order, because order may have been given from afar and unit may have had to walk for 20sec before coming in range to cast a spell. in that case, he probably wanted to test casting conditions moment before the cast, not 20s before.
 
Level 2
Joined
Jun 16, 2007
Messages
10
ah, thank you both.

i just gave blink a .01 second casting time and gave the unit a cmd to move to its own location.

as for my requested function, i figured that there wouldn't be one already made, but rather I'd hoped that someone may have come across a player made function that would do so. If not, i'll just stick with the canceled casting.

As for the slow fall, would there be a way to do a "one way" pathing blocker, such as that the blocker prevents movement from incoming on one side, but not the other?
 
Level 2
Joined
Jun 16, 2007
Messages
10
yeah, I'd thought about using regions, but anywhere that i miss would be very limiting in addition to feeling somewhat jerky =(.

assuming the order to stop on movement to a higher level doesn't affect hills as paskovich said, I think that I'm just gonna scrap the terrain that I have, start from a higher level and get creative to replace all my ramps with hills.

However, as I type this I am foreseeing many problems as I can only manipulate my cliff placement so far in this fashion.
 
Level 7
Joined
Jun 10, 2007
Messages
225
I did this once for a spell where i wanted units to be able to walk into a jail but not out of it. What I did was simply create several 'units' along the area (very close together) and have them in a unit group.
Every .04 seconds it would set another unit group to all unts within 50 distance. If the unit was in region X (the region on the lower side, meaning it cant continue), it is moved 51 distance from the cliff. If the unit is on top, it is not affected.
 
Status
Not open for further replies.
Top