I have been trying to find the problem for hours now.
call DisplayTimedTextToForce( GetPlayersAll(), 60.0, CREATOR )
works, but the next line does not work at all. The Trigger stops at the code
call ForceAddPlayer( Players, owner )
I tried the ForceAddPlayerSimple() with changed positions of force and player, but it still did not work.
It was working earlier, before i made all the global variables in jass, but changed other aspects of the code as well.
This is at the top of the custom script code:
This is the trigger named Mapstart:
Im still a noob at jass, since this is the first map where im actually trying to make something, not just mess around. I feel like i should have found my error here though. "Arrrg..."
EDIT: Off to bed, going to sleep off some frustration xD
call DisplayTimedTextToForce( GetPlayersAll(), 60.0, CREATOR )
works, but the next line does not work at all. The Trigger stops at the code
call ForceAddPlayer( Players, owner )
I tried the ForceAddPlayerSimple() with changed positions of force and player, but it still did not work.
It was working earlier, before i made all the global variables in jass, but changed other aspects of the code as well.
This is at the top of the custom script code:
JASS:
globals
constant string CREATOR = "Respwner"
force Players
group Player_Heroes
group Creeps
endglobals
This is the trigger named Mapstart:
JASS:
function Trig_Mapstart_Actions takes nothing returns nothing
local location mapstartpoint
local rect picknewhero = gg_rct_Picknewhero
local integer i = 0
local unit wisp
local player owner
loop
if GetPlayerSlotState( Player( i ) ) == PLAYER_SLOT_STATE_PLAYING then
set owner = Player( i )
set mapstartpoint = GetRandomLocInRect( picknewhero )
set wisp = CreateUnitAtLoc( owner, 'e000', mapstartpoint, GetRandomDirectionDeg() )
call SelectUnitAddForPlayer( wisp, owner )
call PanCameraToTimedLocForPlayer( owner, mapstartpoint, 0 )
call DisplayTimedTextToForce( GetPlayersAll(), 60.0, CREATOR )
call ForceAddPlayer( Players, owner )
call RemoveLocation ( mapstartpoint )
set mapstartpoint = null
set wisp = null
set owner = null
endif
set i = i + 1
exitwhen i == 9
endloop
set picknewhero = null
endfunction
//===========================================================================
function InitTrig_Mapstart takes nothing returns nothing
set gg_trg_Mapstart = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_Mapstart, 0.3 )
call TriggerAddAction( gg_trg_Mapstart, function Trig_Mapstart_Actions )
endfunction
Im still a noob at jass, since this is the first map where im actually trying to make something, not just mess around. I feel like i should have found my error here though. "Arrrg..."
EDIT: Off to bed, going to sleep off some frustration xD