- Joined
- Oct 29, 2012
- Messages
- 1,474
I got these triggers so a unit jumps repeatedly smoothly . Well this is the best 2D jump triggers. But I need them to be working just if a player presses Up button . Any helps please ?
Please help . The triggers are in the attachment .
-
Init Constants
-
Events
-
Map initialization
-
-
Conditions
-
Actions
-
Sound - Play SadMystery <gen>
-
Sound - Set the music list to UndeadX1 <gen>, starting with a random song
-
Sound - Set the music list to OrcX1 <gen>, starting with a random song
-
Set g_Acceleration = 981.00
-
Set h_JumpHight = 640.00
-
Set t_TimeStep = 0.03
-
Set const_X_Speed = 200.00
-
-
-
Set Velocity and Position
-
Events
-
Time - Every 0.03 seconds of game time
-
-
Conditions
-
Actions
-
For each (Integer A) from 0 to NumberOfJumpers, do (Actions)
-
Loop - Actions
-
Set Jumpers_Y_Velocity[(Integer A)] = (Jumpers_Y_Velocity[(Integer A)] - (g_Acceleration x t_TimeStep))
-
-------- Set the new position --------
-
Unit - Move Jumpers[(Integer A)] instantly to ((Position of Jumpers[(Integer A)]) offset by ((Jumpers_X_Velocity[(Integer A)] x t_TimeStep), (Jumpers_Y_Velocity[(Integer A)] x t_TimeStep)))
-
-
-
-
-
Horizontal Regions
-
Events
-
Unit - A unit enters H1 <gen>
-
Unit - A unit enters H2 <gen>
-
Unit - A unit enters H3 <gen>
-
Unit - A unit enters H4 <gen>
-
Unit - A unit enters H5 <gen>
-
Unit - A unit enters H6 <gen>
-
Unit - A unit enters H7 <gen>
-
Unit - A unit enters H8 <gen>
-
Unit - A unit enters H9 <gen>
-
Unit - A unit enters H10 <gen>
-
Unit - A unit enters H11 <gen>
-
Unit - A unit enters H12 <gen>
-
Unit - A unit enters H13 <gen>
-
Unit - A unit enters H14 <gen>
-
Unit - A unit enters H15 <gen>
-
-
Conditions
-
Actions
-
For each (Integer A) from 0 to NumberOfJumpers, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Entering unit) Equal to Jumpers[(Integer A)]
-
-
Then - Actions
-
-------- Find THE ground (if it hits the ground) --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Jumpers_Y_Velocity[(Integer A)] Less than 0.00
-
-
Then - Actions
-
Set Jumpers_Y_Velocity[(Integer A)] = (Square root(((2.00 x g_Acceleration) x h_JumpHight)))
-
Sound - Play PriestMissileHit1 <gen> at 100.00% volume, attached to Jumpers[(Integer A)]
-
Sound - Stop (Last played sound) After fading
-
-
Else - Actions
-
Set Jumpers_Y_Velocity[(Integer A)] = (0.00 - Jumpers_Y_Velocity[(Integer A)])
-
Sound - Play DryadMissile2 <gen> at 100.00% volume, attached to Jumpers[(Integer A)]
-
Sound - Stop (Last played sound) After fading
-
-
-
-
Else - Actions
-
-
-
-
-
-
Vertical Regions
-
Events
-
Unit - A unit enters V1 <gen>
-
Unit - A unit enters V2 <gen>
-
Unit - A unit enters V3 <gen>
-
Unit - A unit enters V4 <gen>
-
Unit - A unit enters V5 <gen>
-
Unit - A unit enters V6 <gen>
-
-
Conditions
-
Actions
-
For each (Integer A) from 0 to NumberOfJumpers, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Entering unit) Equal to Jumpers[(Integer A)]
-
-
Then - Actions
-
Set Jumpers_X_Velocity[(Integer A)] = (0.00 - Jumpers_X_Velocity[(Integer A)])
-
Sound - Play NecromancerMissileHit1 <gen> at 100.00% volume, attached to Jumpers[(Integer A)]
-
Sound - Stop (Last played sound) After fading
-
-
Else - Actions
-
-
-
-
-