• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

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