- Joined
- Jul 14, 2011
- Messages
- 3,213
No need to. The current unit is always the one in the variable SpartFaceUnitVariable[Player Number] Just set any variable equal to that one.
OMMMMMG .. When I just press 'TEST MAP' ...Your triggers are disabled due to some errors ...Why the hell does this happen?????????? Ok Shit WE is really buggy they work nowFor God's sake xD Did you test the map? Did you notice how I added 2 unit types in map initialization? Just do the same with all your unit types.
AW , You said player 1 is 0 in JASS. but you said add +1 to them ......?!Add +1 to each one
No need to. The current unit is always the one in the variable SpartFaceUnitVariable[Player Number] Just set any variable equal to that one.
function SpartFaceUnitReplace takes integer pn returns nothing
set pn = pn+1 <<--- This solves all the pn problems in this function.
local unit u = LoadUnitHandle(SpartFaceHash, GetHandleId(SpartFaceCurrent[pn]), 0) // The Opposite Facing
set SpartFaceRight[OwnerNumber] = TRUE
set udg_Hero1_2D[OwnerNumber]= Current <-- This solves your issues
set udg_Hero2_2D[OwnerNumber]= Opposite <-- This solves your issues
call KillUnit(GetBuyingUnit()) // Just for testing
call KillUnit(GetTriggerUnit()) // Just for Testing
local integer pn = GetPlayerId(GetTriggerPlayer()) + 1
if (GetLocalPlayer() == Player(pn-1)) then