HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Jump in GUI

06-25-2008, 09:20 PM#1
Raydude
I tried, it works, but sometimes when i change direction right be4 the jump, he flys far far away

Trigger:
Collapse Events
Unit - A unit Begins casting an ability
Collapse Conditions
(Ability being cast) Equal to Sentry Ward
Collapse Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Terrain cliff level at (Target point of ability being cast)) Greater than (Terrain cliff level at (Position of (Triggering unit)))
Collapse Then - Actions
Unit - Order (Triggering unit) to Stop
Skip remaining actions
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Distance between (Position of (Triggering unit)) and (Target point of ability being cast)) Less than or equal to 150.00
Collapse Then - Actions
Unit - Order (Triggering unit) to Stop
Skip remaining actions
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Owner of (Triggering unit)) Equal to Player 1 (Red)
Collapse Then - Actions
Set Jumper[1] = (Casting unit)
Unit - Create 1 JumpDummy for Player 1 (Red) at (Position of Jumper[1]) facing (Facing of Jumper[1]) degrees
Set JumpAngle[1] = (Last created unit)
Set JumpDistance[1] = (Integer((Distance between (Position of Jumper[1]) and (Target point of ability being cast))))
Unit - Turn collision for Jumper[1] Off
Unit - Add Crow Form to Jumper[1]
Unit - Remove Crow Form from Jumper[1]
Animation - Change Jumper[1] flying height to 100.00 at 1250.00
Trigger - Turn on Jumping1 <gen>
Wait 0.10 seconds
Trigger - Turn off Jumping1 <gen>
Animation - Change Jumper[1] flying height to 0.00 at 1250.00
Unit - Turn collision for Jumper[1] On
Wait 0.01 seconds
Unit - Remove JumpAngle[1] from the game
Custom script: call RemoveLocation( udg_Jumping[1] )
Else - Actions

Trigger:
Collapse Events
Time - Every 0.02 seconds of game time
Conditions
Collapse Actions
Set Jumping[1] = ((Position of Jumper[1]) offset by ((Real(JumpDistance[1])) / 25.00) towards (Facing of JumpAngle[1]) degrees)
Unit - Move Jumper[1] instantly to Jumping[1]
Custom script: call RemoveLocation( udg_Jumping[1] )
06-25-2008, 10:26 PM#2
Feroc1ty
Don't know why you have those 0.01 second waits, you should remove them. Also you leak some location ( well many in the second trigger since its every 0.02 seconds of the game ), suggest you look at some tutorials that teach you how to remove leaks. Also you don't have to have 2 separate triggers, just create a timer and start it inside the first trigger. Also I don't know why the problem occurs.

EDIT: PM me if you need any help with the jump.
06-25-2008, 10:31 PM#3
Raydude
idk those are there so u can actually do a last second thing be4 u actually jump, someone's chasing u, stun them then jump off a cliff, it's amazing if u can time it, and i'll go search for the tut thnx
06-25-2008, 10:50 PM#4
Feroc1ty
I think people would greatly appreciate their character would jump right away, because although you can stun at the last second, so can they, and you can always just stun before the jump.
06-25-2008, 11:00 PM#5
Raydude
i read some of the tutorials about leaks, but i thought i got them, i removed the locations in the second one and did it again to the first one just in case it stopped in the the middle of the second one, none of them mentioned anything about having something that is every .02 second
06-25-2008, 11:25 PM#6
darkwulfv
Trigger:
Set Jumping[1] = ((Position of Jumper[1]) offset by ((Real(JumpDistance[1])) / 25.00) towards (Facing of JumpAngle[1]) degrees)
I'm fairly certain that leaks somehow. I think the "Position of Jumper[1]" leaks.

Btw, .01 seconds will not give anyone any sort of time to do anything, and when you're trying to jump and you have .00001 seconds to do something before you actually jump, I doubt even hotkeys could allow your hero to react.
06-25-2008, 11:40 PM#7
Raydude
there's .03 seconds but guess that wont do much unless single player anyways, taken out

Custom script: call RemoveLocation( udg_Position of Jumper[1] )

like um...that? cause i thought

Custom script: call RemoveLocation( udg_Jumping[1] )

covered that leak
06-26-2008, 12:45 AM#8
darkwulfv
.03 is one 300th of a second. There is no way anyone could make a command in that amount of time.

And I'm not sure if that covers the leak; I stopped using GUI a while ago so it's a bit different to me.
06-26-2008, 01:23 AM#9
Raydude
but that's how i found the problem in the jump, if u change directions (spamming right click right after clicking the spell) the jump, it flys u away like 10 times the normal distance
06-26-2008, 01:33 AM#10
Anitarf
Quote:
Originally Posted by darkwulfv
.03 is one 300th of a second.
No it's not.
06-26-2008, 01:36 AM#11
Joker
Quote:
Originally Posted by darkwulfv
.03 is one 300th of a second.
Its actually 33 1/3th of a second
06-26-2008, 01:39 AM#12
Raydude
i think i 4got to mention this....
Everytime i use the jump, it's off, sometimes the unit lands right on target, sometimes the unit goes over the target or lands short of it, what is wrong with the triggers?
06-26-2008, 03:30 AM#13
Feroc1ty
Oh, I know. You need to pause the unit, and than unpause it, otherwise he will be walking during the jump.
06-26-2008, 06:26 AM#14
Pyrogasm
Quote:
Originally Posted by Joker
Its actually 33 1/3th of a second
Try again. 3/100ths.
06-26-2008, 10:52 AM#15
Squally425
- Try having the periodic time raised a little to 0.04 or 0.05.
- I don't know if waiting 0.1 seconds even registers. It probably waits a minimum of 0.25 seconds or anyways, rendering your calculations wrong
- Same with the 0.01, that might be ignored and wait on the default minimum of 0.25 seconds
- With 0.25 seconds rather than 0.1, your unit will fly twice if not more than twice as far