• 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.

[Spell Help] : Jump

Status
Not open for further replies.
Level 1
Joined
Jun 27, 2005
Messages
2
Hello all. I tried to make a "Jump" spell in GUI but i didnt arrive can you tell me what i did wrong so i can correct it... Thx for all answers.

I made this code with help of some people... but i dont know what to do Now... :roll:
I have replace values... but it doesnt work... i need some help guys. That's the code
Code:
Event: Temps - Every 0.04 seconds of game time
Condition:
Actions:
Set t = (t + 0.04)
Animation - Change UnitSaut flying height to (H - ( vitesse * k * (t - (T/2) ))²) at 0.04
Unité - Move UnitSaut instantly to ((Position of UnitSaut) offset by ((vitesse * 0.04) * cos f), (vitesse * 0.04) * sin f)

_________


f = Angle of the unit
Cos = Cosinus
Sin = Sinus
* = Multiplication
K = Coefficient of height's variation
H = Maximal Height
T = Total time
O = Original Position
speed = coeficient that make vary distance/height of the jump
_________

for fz H - ( vitesse * k * (t - (T/2) ))²
for fx: Ox + (vitesse * t) * cos f
for fy: Oy + (vitesse * t) * sin f
 
Level 7
Joined
May 16, 2004
Messages
355
Well I'm sure what any of that is supposed to do but here is the code I wrote up for a hero on my AOS that has a fly, if you just adapt it thought remember that most of the values in it are specifically determined and if you change one most are going to be needed to be changed. An example of this is the wait times, if you change the speed he flies up at or moves forward at you are going to need to recalculate the waits.
Code:
Take Flight
    Events
        Unit - Angel of Wrath 0096 <gen> Begins casting an ability
    Conditions
        (Ability being cast) Equal to Take Flight 
    Actions
        Set FlightPoint[1] = (Position of Angel of Wrath 0096 <gen>)
        Set FlightPoint[2] = (Target point of ability being cast)
        Special Effect - Create a special effect at (Position of Angel of Wrath 0096 <gen>) using Abilities\Spells\Undead\ReplenishHealth\ReplenishHealthCaster.mdl
        Special Effect - Create a special effect attached to the chest of Angel of Wrath 0096 <gen> using Abilities\Spells\NightElf\Rejuvenation\RejuvenationTarget.mdl
        Set FlyEfect = (Last created special effect)
        Unit - Add Flight  to Angel of Wrath 0096 <gen>
        Unit - Turn collision for Angel of Wrath 0096 <gen> Off
        Unit - Pause Angel of Wrath 0096 <gen>
        Trigger - Turn on Flying <gen>
        Animation - Change Angel of Wrath 0096 <gen> flying height to 750.00 at 750.00
        Wait 0.50 seconds
        Animation - Change Angel of Wrath 0096 <gen> flying height to 0.00 at 1500.00
        Wait 0.20 seconds
        Unit - Remove Flight  from Angel of Wrath 0096 <gen>
        Unit - Turn collision for Angel of Wrath 0096 <gen> On
        Trigger - Turn off Flying <gen>
        Special Effect - Create a special effect at (Position of Angel of Wrath 0096 <gen>) using Abilities\Spells\Undead\ReplenishHealth\ReplenishHealthCaster.mdl
        Special Effect - Destroy FlyEfect
        Unit - Unpause Angel of Wrath 0096 <gen>
        Unit - Create 1 Universal Dummy for (Owner of Angel of Wrath 0096 <gen>) at (Position of Angel of Wrath 0096 <gen>) facing Default building facing degrees
        Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
        Unit - Add Flight Slam  to (Last created unit)
        Unit - Set Level of Flight Slam  for (Last created unit) to (Level of Take Flight  for Angel of Wrath 0096 <gen>)
        Unit - Order (Last created unit) to Orc Tauren Chieftain - War Stomp
------------------------------------------------------
Flying
    Events
        Time - Every 0.01 seconds of game time
    Conditions
    Actions
        Unit - Move Angel of Wrath 0096 <gen> instantly to ((Position of Angel of Wrath 0096 <gen>) offset by ((Distance between FlightPoint[1] and FlightPoint[2]) / 110.00) towards (Angle from FlightPoint[1] to FlightPoint[2]) degrees), facing (Angle from FlightPoint[1] to FlightPoint[2]) degrees

Hope this helps you.

[/quote]
 
Level 2
Joined
Mar 10, 2005
Messages
19
ok i already made a spell like that and tried to implement usefull comments, explaining how to do jump spells. get it HERE. first of all you need the flying height trick which chuckle already mentioned. there is a tutorial in the tutorials section which explains quite well how to use this trick to make units jump, you should take a look at it. your trigger only confuses me, i cant help you there, sry. i used a parabole (-x^2 +500) while others use simplier methods. have a look in the spells section for a panda spell package, it contains a panda jump which is easy to understand (nearly the same as chuckles...).
 
Level 7
Joined
May 16, 2004
Messages
355
Leopard said:
Unit - Add Flight to Angel of Wrath 0096 <gen>
...
...
...

Unit - Remove Flight from Angel of Wrath 0096 <gen>

I think you should explain this part more clearly to Sky.Death :wink:
Flight is a spell based off of metamorphosis(or raven form) that allows you to become a flying unit, it tricks the editor into giving the unit a flying height
 
Level 1
Joined
Jun 27, 2005
Messages
2
I already made this with one trigger

Code:
Event: Map Init
Conditions: Nothing
Actions: Add Ability [Crow] to Berseker
Remove Ability [Crow] to Berseker

That works too.. but i want only know what value i must replace...

Event: Temps - Every 0.04 seconds of game time
Condition:
Actions:
Set t = (t + 0.04)
Animation - Change UnitSaut flying height to (H - ( speed * k * (t - (T/2) ))²) at 0.04
Unité - Move UnitSaut instantly to ((Position of UnitSaut) offset by ((speed * 0.04) * cos f), (vitesse * 0.04) * sin f)


Only That i search..
 
Status
Not open for further replies.
Top