- Joined
- Oct 28, 2008
- Messages
- 27
Hi, I'm creating a fake gravity that pulls the units in a southward direction on the map. It works just fine, but when they hit raised terrain instead of stopping, they slide to the right. I am assuming this is because I am using an instant move trigger and it resorts to moving the unit to the closest place it can if it can't go down. I tried adding a condition that checked whether the unit was on a cliff or dirt terrain to stop its movement, but it didn't change anything. Any suggestions?
I tried making Location[4] at a point a little lower than the unit, as Location[3] is where the unit is, and Location[2] is where the unit is being moved. Maybe a getlocationZ would be better, but I don't know how to implement...
Additionally, the unit is a hover. Changing to fly just makes it pass over everything, but maybe something useful can be used by knowing this.
I tried making Location[4] at a point a little lower than the unit, as Location[3] is where the unit is, and Location[2] is where the unit is being moved. Maybe a getlocationZ would be better, but I don't know how to implement...
Additionally, the unit is a hover. Changing to fly just makes it pass over everything, but maybe something useful can be used by knowing this.
-
gravy test
-
Events
- Time - Every 0.02 seconds of game time
- Conditions
-
Actions
- Set Location[4] = (Location[3] offset by (0.00, -30.00))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- DownTrue Equal to False
- UpTrue Equal to False
- LeftTrue Equal to False
- RightTrue Equal to False
- (Terrain type at Location[4]) Equal to Lordaeron Summer - Dirt
-
Then - Actions
- Set Location[2] = ((Position of Unit) offset by 30.00 towards 270.00 degrees)
- Unit - Move Unit instantly to Location[2]
- Custom script: call RemoveLocation(udg_Location[2])
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Speed Less than 3.00
-
Then - Actions
- Set Speed = (Speed + 0.02)
- Set AnimationSpeed = (AnimationSpeed + 0.01)
- Else - Actions
-
If - Conditions
- Else - Actions
-
If - Conditions
- Custom script: call RemoveLocation(udg_Location[4])
-
Events
Last edited: