- Joined
- Oct 29, 2012
- Messages
- 1,474
I'm using 2D Engine ( always -_-) . I modified it a bit . It uses 'Terrain Tilesets' types' as a platform .My Unit walks on ground normally . But when It jumps it seems that it goes throught some 'Locust Objects' that I have made the Stable Ground on them (So The Unit doesn't walk throught them ) .Look what I have seen :
Please Help . +1 rep 

-
SetVariables
-
Events
-
Map initialization
-
-
Conditions
-
Actions
-
-------- The maximum amount of players playing at the same time. --------
-
Set _AmountPlayers_2D = 4
-
-------- The speed your platformer will fall at. --------
-
Set _SpeedFall_2D = 15.00
-
-------- The terrain type you are able to stand at. --------
-
Set _GroundStable_2D = Cityscape - Black Marble
-
-------- The terrain type that kills you. --------
-
Set _GroundKill_2D = Dungeon - Lava
-
-------- The speed your platformer moves at. --------
-
Set _SpeedMove_2D = 15.00
-
-------- The angle your platformer moves when the right arrow key is pressed. --------
-
Set _AngleRight_2D = 0.00
-
-------- The angle your platformer moves when the left arrow key is pressed. --------
-
Set _AngleLeft_2D = 180.00
-
-------- The angle you fall towards. --------
-
Set _Integer_2D = 1
-
For each (Integer A) from 1 to 4, do (Actions)
-
Loop - Actions
-
Set _AngleGravity_2D[_Integer_2D] = 270.00
-
Set _Integer_2D = (_Integer_2D + 1)
-
-
-
-------- The distance between your platformer and stable ground. --------
-
Set _BlockDistance_2D = 25.00
-
-------- Leave this at 5~ above _BlockDistance_2D --------
-
Set _BlockDistance2_2D = 30.00
-
-------- The distance between the platformer and the special effect which is created when jumping. --------
-
Set _JumpSED_2D = 20.00
-
-------- The angle at which the special effect created when jumping is created. --------
-
Set _Integer_2D = 1
-
For each (Integer A) from 1 to _AmountPlayers_2D, do (Actions)
-
Loop - Actions
-
Set _JumpSEA_2D[_Integer_2D] = _AngleGravity_2D[_Integer_2D]
-
Set _Integer_2D = (_Integer_2D + 1)
-
-
-
-------- The angle your platformer moves when pressing the up arrow key. --------
-
Set _Integer_2D = 1
-
For each (Integer A) from 1 to _AmountPlayers_2D, do (Actions)
-
Loop - Actions
-
Set _AngleJump_2D[_Integer_2D] = 90.00
-
Set _Integer_2D = (_Integer_2D + 1)
-
-
-
-------- The speed your platformer gains when jumping. --------
-
Set _SpeedJump_2D = 16.00
-
-------- The height of your platformers jumps. --------
-
Set _HeightJump_2D = 30
-
-------- The height of your platformers walljumps. --------
-
Set _HeightWJump_2D = 30
-
-------- If walljumping is prohibited or not. --------
-
Set _Integer_2D = 1
-
For each (Integer A) from 1 to _AmountPlayers_2D, do (Actions)
-
Loop - Actions
-
Set _WallJumpEnabled_2D[_Integer_2D] = False
-
Set _Integer_2D = (_Integer_2D + 1)
-
-
-
-------- The angle of your camera. --------
-
Set _ViewCamera_2D = 270.00
-
-
-
JumpExecute
-
Events
-
Player - Player 1 (Red) Presses the Up Arrow key
-
Player - Player 2 (Blue) Presses the Up Arrow key
-
Player - Player 3 (Teal) Presses the Up Arrow key
-
Player - Player 4 (Purple) Presses the Up Arrow key
-
-
Conditions
-
Actions
-
-------- Checks so the player is standing at stable ground: --------
-
Set _tempPointJE_2D = (Position of _Hero_2D[(Player number of (Triggering player))])
-
Set _tempPointJE2_2D = (_tempPointJE_2D offset by _BlockDistance2_2D towards _AngleGravity_2D[(Player number of (Triggering player))] degrees)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Terrain type at _tempPointJE2_2D) Equal to _GroundStable_2D
-
-
Then - Actions
-
-------- Increases jump timer and creates special effect: --------
-
Custom script: call RemoveLocation( udg__tempPointJE_2D )
-
Custom script: call RemoveLocation( udg__tempPointJE2_2D )
-
Set _tempPointJE_2D = (Position of _Hero_2D[(Player number of (Triggering player))])
-
Set _tempPointJE2_2D = (_tempPointJE_2D offset by _JumpSED_2D towards _JumpSEA_2D[(Player number of (Triggering player))] degrees)
-
Set _TimerJump_2D[(Player number of (Triggering player))] = _HeightJump_2D
-
-
Else - Actions
-
-------- Checks if there's stable ground towards the facing of the player and if walljump is enabled: --------
-
Set _tempPointJE_2D = (Position of _Hero_2D[(Player number of (Triggering player))])
-
Set _tempPointJE2_2D = (_tempPointJE_2D offset by _BlockDistance2_2D towards (Facing of _Hero_2D[(Player number of (Triggering player))]) degrees)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Terrain type at _tempPointJE2_2D) Equal to _GroundStable_2D
-
_WallJumpEnabled_2D[(Player number of (Triggering player))] Equal to True
-
-
Then - Actions
-
-------- Increases jump timer and creates special effect: --------
-
Set _tempPointJE_2D = (Position of _Hero_2D[(Player number of (Triggering player))])
-
Set _tempPointJE2_2D = (_tempPointJE_2D offset by _JumpSED_2D towards _JumpSEA_2D[(Player number of (Triggering player))] degrees)
-
Special Effect - Create a special effect at _tempPointJE2_2D using Abilities\Spells\Orc\FeralSpirit\feralspiritdone.mdl
-
Special Effect - Destroy (Last created special effect)
-
Set _TimerJump_2D[(Player number of (Triggering player))] = _HeightWJump_2D
-
-
Else - Actions
-
-
-
-
-------- -------------------------------------------------- Set Jump Animation ----------------------------------------- --------
-
Custom script: call SetUnitAnimationByIndex(udg__Hero_2D[GetConvertedPlayerId(GetTriggerPlayer())], 9)
-
-------- -------------------------------------------------- Remove Leaks ----------------------------------------- --------
-
Custom script: call RemoveLocation( udg__tempPointJE_2D )
-
Custom script: call RemoveLocation( udg__tempPointJE2_2D )
-
-
-
Jump Copy
-
Events
-
Time - Every 0.02 seconds of game time
-
-
Conditions
-
Actions
-
-------- Makes the trigger run for each player set to play: --------
-
Set _IntegerJ_2D = 1
-
For each (Integer A) from 1 to _AmountPlayers_2D, do (Actions)
-
Loop - Actions
-
-------- Checks if there's stable ground above the player: --------
-
Set _tempPointJ_2D = (Position of _Hero_2D[_IntegerJ_2D])
-
Set _tempPointJ2_2D = (_tempPointJ_2D offset by _BlockDistance_2D towards _AngleJump_2D[_IntegerJ_2D] degrees)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Terrain type at _tempPointJ2_2D) Not equal to _GroundStable_2D
-
_TimerJump_2D[_IntegerJ_2D] Greater than or equal to 1
-
-
Then - Actions
-
-------- Moves the player upwards: --------
-
Set _tempPointJ_2D = (Position of _Hero_2D[_IntegerJ_2D])
-
Set _tempPointJ2_2D = (_tempPointJ_2D offset by _SpeedJump_2D towards _AngleJump_2D[_IntegerJ_2D] degrees)
-
Unit - Move _Hero_2D[_IntegerJ_2D] instantly to _tempPointJ2_2D
-
-
Else - Actions
-
-
Set _IntegerJ_2D = (_IntegerJ_2D + 1)
-
-
-
Custom script: call RemoveLocation( udg__tempPointJ_2D )
-
Custom script: call RemoveLocation( udg__tempPointJ2_2D )
-
-
Last edited: