I was thinking, if I added an if/then/else to the jass, could it be:
If position of unit is on "Superfastice" then do use speed2
or something? I'm so retarded.
willy wrote:how do you make it work on many tilesets att once? ex if i want to slide on every tile except one
I don't understand what he is asking thus not understanding what your telling him...
Polar wrote:Thank you so much for this! You are right when saying that the // comments explain everything, I even figured out how to make 2 types of ice with different speed myself.
I will put your name and link into the loading screen, even though I probably wont use the map on Battle.net.
BAH! I'm out smarted!!!
I only need that and to add reverse steering.
3ICE wrote:and in the Setup2 trigger set usg_Slide to the terrain you don't want to slide on.
Bahahahaha, you said
usg_Slide instead of udg_Slide
------------------------------------------------------------------------------------------------------------------------------
HA! IN YOUR FACE 3ICE! I figured out how to make a different ice a different speed
Now I think I know why you were being suborn and not just telling me straight forward what to do.
Was it so i can get to know more JASS?
------------------------------------------------------------------------------------------------------------------------------
I still can't figure out how to get the reverse STEERING working.
I've got
Code: Select all
function Turn takes nothing returns nothing
local unit u=GetTriggerUnit()
local real x=GetUnitX(u)
local real y=GetUnitY(u)
local location p=GetUnitLoc(GetOrderTargetUnit())
if(GetTerrainType(x,y)==udg_Slide)or(GetTerrainType(x,y)==udg_Slide3)and(IsUnitInGroup(u,udg_H))then
call SetUnitFacing(u,57.295828*Atan2(GetLocationY(p)-y,GetLocationX(p)-x))
endif
if(GetTerrainType(x,y)==udg_Slide4)and(IsUnitInGroup(u,udg_H))then
call SetUnitFacing(u,57.295828*Atan2(GetLocationY(p)-y,GetLocationX(p)-x)+180)
endif
call RemoveLocation(p)
set p=null
set u=null
endfunction
function Steer takes nothing returns nothing
local unit u=GetTriggerUnit()
local real x=GetUnitX(u)
local real y=GetUnitY(u)
local real a=GetOrderPointX()
local real b=GetOrderPointY()
if(GetTerrainType(x,y)==udg_Slide)or(GetTerrainType(x,y)==udg_Slide3)and(IsUnitInGroup(u,udg_H))then
call SetUnitFacing(u,57.295828*Atan2(b-y,a-x))
endif
if(GetTerrainType(x,y)==udg_Slid4)and(IsUnitInGroup(u,udg_H))then
call SetUnitFacing(u,57.295828*Atan2(b-y,a-x)+180)
endif
set u=null
endfunction
function ReturnTrue takes nothing returns boolean
return true
endfunction
function InitTrig_Steer takes nothing returns nothing
local integer i=0
local filterfunc nullboolexpr=Filter(function ReturnTrue)
local trigger gg_trg_Turn=CreateTrigger()
set gg_trg_Steer=CreateTrigger()
call TriggerAddAction(gg_trg_Turn,function Turn)
call TriggerAddAction(gg_trg_Steer,function Steer)
loop
exitwhen i>12
call TriggerRegisterPlayerUnitEvent(gg_trg_Turn,Player(i),EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER,nullboolexpr)
call TriggerRegisterPlayerUnitEvent(gg_trg_Steer,Player(i),EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER,nullboolexpr)
set i=i+1
endloop
endfunction
but that isn't working.
BUT WAIT!!!
Using my logic and how I made the different ice sliding speeds, IT IS A SUCCESS!
I know almost every feature for your sliding system now! (Only thing missing is understanding "Realistic Sliding Mode" and how to make "Boosters")
But still!
