Not working...

manofsteel

New Member
Reaction score
36
This is just a simple thing thats going to create a unit for each player at there start location, but it dosen't work, for some reason(when I'm player1) the unit is created at player3's start location.
Code:
JASS:
function Trig_convert_Func001A takes nothing returns nothing
    local location p = GetPlayerStartLocationLoc(GetEnumPlayer())
    local real x = GetLocationX(p)
    local real y = GetLocationY(p)
    call CreateUnit(GetEnumPlayer() , 'h00X', x, y, 90)
    call RemoveLocation(p)
    set p = null
endfunction
 

manofsteel

New Member
Reaction score
36
This is everything and another trigger running this trigger but the other trigger is not the problem.
JASS:
function Trig_convert_Func001A takes nothing returns nothing
    local location p = GetPlayerStartLocationLoc(GetEnumPlayer())
    local real x = GetLocationX(p)
    local real y = GetLocationY(p)
    call CreateUnit(GetEnumPlayer() , 'h00X', x, y, 90)
    call RemoveLocation(p)
    set p = null
endfunction

function Trig_convert_Actions takes nothing returns nothing
    call ForForce( GetPlayersAll(), function Trig_convert_Func001A )
endfunction

//===========================================================================
function InitTrig_convert takes nothing returns nothing
    set gg_trg_convert = CreateTrigger(  )
    call TriggerAddAction( gg_trg_convert, function Trig_convert_Actions )
endfunction
 
Reaction score
456
Well that seems more than fine to me. Are you sure that the start locations don't get randomed like in melee maps? And you're not changing the startlocations locations anywhere?
 

manofsteel

New Member
Reaction score
36
Well that seems more than fine to me. Are you sure that the start locations don't get randomed like in melee maps? And you're not changing the startlocations locations anywhere?

Are there any option for that random thing? else no. And I'm not changeing them, 100% sure.
 
Reaction score
456
The problem is not with that code, that's all I can say.

Try it when you're some other player than P1.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top