• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

Movement like in Soldiers

Status
Not open for further replies.
Level 8
Joined
Aug 2, 2006
Messages
346
I'm trying to make a map similar to Exilus5's Soldiers map. Normally I'd feel bad about taking someone else's concept, but Soldiers seems to have been discontinued, not to mention the movement delay in the game caused by predominantly GUI triggers is irritating other players. I'll be programming this in all JASS.

The part that's giving me trouble is the movement system, or more precisely, the movement up a diagonal slope. Because cliff height only changes ever 128 units, the level of precision in the cliff heights is unreliable, and it's difficult to discern a slope from that.

How did Exilus do this??? I've experimented with at least 5 methods including looking at the surrounding cliff heights to get the normal line, or simply moving the unit into the cliff, then pushing it out after the fact.

EDIT: Ok to clarify, the slope problem is caused by the low resolution of the "cliff height grid" as I am now calling it. It's difficult to distinguish between a slope and a wall because there are no definite 45 degree tell tales in the cliff data.

EDIT2: Oh you have got to be shitting me... There's a GetLocationZ() function??? WTF??? HOW LONG HAS THAT BEEN THERE??????????????????? Well that's great, now I can finish the map! :)
 
Last edited:
Level 19
Joined
Feb 4, 2009
Messages
1,313
well you found it out yourself but there is one thing which made me crazy until I found out:
GetUnitFlyingHeight(unit) only works properly for units with storm crow form ability but NOT FOR FLYING UNITS at cliffs

and it also seems like there is no use in using a global location do determine the height since the height won't be setted properly either (at least not with GUI globals but they should be the same)

and GetLocationZ(point) also works on non-cliff-height-changes (with the lower/raise tool)
however it does not work on trees etc. (probably on walkable things but I didn't check that)
 
Level 8
Joined
Aug 2, 2006
Messages
346
What are you talking about in your second paragraph there? No use in using a global location?

I got it working. All you have to do is look at the point 1 unit to the right of the player, and 1 unit to the left to determine which direction the cliff is in in the x direction, do the same for the y. Then you loop through several times and push the player out of the obstacle.
 
Level 9
Joined
May 9, 2009
Messages
536
EDIT2: Oh you have got to be shitting me... There's a GetLocationZ() function??? WTF??? HOW LONG HAS THAT BEEN THERE??????????????????? Well that's great, now I can finish the map! :)

OH SHIT>>?? THERES A GETLOCATIONZ???

still, im saying good luck on your project. i dont think this should be in help, more of the map development area...

still, you've gotta be careful with the cliffs.
 
Status
Not open for further replies.
Top