• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Help: Sliding on Snow

Status
Not open for further replies.
Level 1
Joined
Jul 29, 2006
Messages
1
I'm trying to make an escape map. I created this trigger to make a unit slide and be controlled on the snow. There is a problem though, you can't control it very well for some odd reason.
Can someone help me?

Code:
Snow Sliding
    Events
        Time - Every 0.01 seconds of game time
    Conditions
    Actions
        For each (Integer A) from 1 to 12, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        OnSnow[(Integer A)] Equal to True
                        (PlayerUnit[(Integer A)] is alive) Equal to True
                    Then - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                ((Playable map area) contains ((Position of PlayerUnit[(Integer A)]) offset by 5.00 towards (Facing of PlayerUnit[(Integer A)]) degrees)) Equal to True
                            Then - Actions
                                Custom script: call SetUnitX( udg_PlayerUnit[GetForLoopIndexA()] , GetLocationX( PolarProjectionBJ(GetUnitLoc(udg_PlayerUnit[GetForLoopIndexA()]), udg_SlideSpeed[GetForLoopIndexA()], GetUnitFacing(udg_PlayerUnit[GetForLoopIndexA()])) ) )
                                Custom script: call SetUnitY( udg_PlayerUnit[GetForLoopIndexA()] , GetLocationY( PolarProjectionBJ(GetUnitLoc(udg_PlayerUnit[GetForLoopIndexA()]), udg_SlideSpeed[GetForLoopIndexA()], GetUnitFacing(udg_PlayerUnit[GetForLoopIndexA()])) ) )
                            Else - Actions
                    Else - Actions

If you need me to explain the trigger a little more just ask. It's kind of like maze of sliding bunnies.
 
Level 8
Joined
Nov 20, 2005
Messages
372
OKAY NOW I'LL SHOW YOU HOW TO MAKE A SLIDE MAP XD LOL

OKAY

FIRST ...

SLIDE TRIGGER : X
SLIDE : UNIT MOVES TO LOCATION WITH ORDER : /

UNIT MOVES:

make a new trigger

Unit gets an ordner on a point ( or something like this)
Conditons /
Actions:
If Terrain Type at Position of triggerin unit equal to ICE then do
If ORder String(Ordered order)equal to Move
Then do:
Make unit fave Target Point of Issued Order in 0,01 secodns ( Or the time you want to have a delay ) :wink:

editor: The normal move doesnt work because it has an delay of 10 miliseconds and you move faster . So units dont have a chance to change the degrees(location) :p
 
Status
Not open for further replies.
Top