• 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.

[Trigger] Mirror Slide

Status
Not open for further replies.
Level 6
Joined
Sep 15, 2006
Messages
136
Hi, currently I'm working on an Escape/Maze map, and I want to add a type of ice that when you click to turn right, it goes left, if you click on top you go to bottom, etc...

I don't want to see my guy sliding backwards, simple contrary direcction when clicking, that means that I can't simply put -6 towards instead of 6.

I want to make it work like the mirror ice of Area of Ice Escape.

I tried a lot of different ways to try to do this, but none works.

Here there's the trigger that I currently use for normal turning one ice when sliding:
  • Events
  • Unit - A Unit issues an order as a objetive point
  • Conditions
  • Actions
  • Set TempPoint = (Position of (Triggering unit))
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
  • If: Condtions
  • (Terrain type at TempPoint) Equal to Northrend - Ice
  • Then: Actions
  • Set TempPoint2 = (Target point of issued order)
  • Unit - Make (Triggering unit) face TempPoint2 over 0.00 seconds
  • Custom script: call RemoveLocation(udg_TempPoint2)
  • Other: Actions
  • Custom script: call RemoveLocation(udg_TemPoint)
 
No that doesn't work, it's more complicated.

Here's what I did in my DDKB system:

JASS:
            if IsTerrainWalkable(x,y) or IsUnitType(tempDat.u,UNIT_TYPE_FLYING) then
                call SetUnitX(tempDat.u,x)
                call SetUnitY(tempDat.u,y)
            else
                set tempDat.direction=0-tempDat.direction
                set x=GetUnitX(tempDat.u)+tempDat.power*Cos(tempDat.direction*bj_DEGTORAD)
                set y=GetUnitY(tempDat.u)+tempDat.power*Sin(tempDat.direction*bj_DEGTORAD)
                if IsTerrainWalkable(x,y) then
                    call SetUnitX(tempDat.u,x)
                    call SetUnitY(tempDat.u,y)
                else
                    set tempDat.direction=tempDat.direction-180
                endif
                set tempDat.power=tempDat.power*3/4
            endif
 
Status
Not open for further replies.
Top