System Lag-free line-spawning system

Renendaru

(Evol)ution is nothing without love.
Reaction score
309
You're checking for the player boolean, when it's not even set yet. Try to add more time.
 

Renendaru

(Evol)ution is nothing without love.
Reaction score
309
It should work, it sets the boolean to true when the player is active.

Don't know if it's up and working yet, but here's the spawn trigger.

JASS:
globals
constant boolean Extrasenabled = true
constant integer Waves = 25
constant integer NumPlayers = 7
endglobals


function Trig_Func_04 takes nothing returns boolean
    if Extrasenabled == true then
        return true
    endif
    return false
endfunction

function Trig_Func_05 takes nothing returns nothing
    if ( Trig_Func_04() ) then
        call SetUnitUserData( GetEnumUnit(), udg_Custom[GetForLoopIndexA()] )
    else
        call DoNothing(  )
    endif
    call UnitAddAbility( GetEnumUnit(), 'Aeth' )
    call SetUnitColor( GetEnumUnit(), GetPlayerColor(ConvertedPlayer(GetForLoopIndexB())) )
    call SetUnitExploded( GetEnumUnit(), true )
endfunction

function Trig_Func_06 takes nothing returns boolean
    if udg_ActivePlayer[GetForLoopIndexB()] == true then
        return true
    endif
    return false
endfunction

function Trig_Actions_06 takes nothing returns nothing
    local integer i = 0
    local integer o = 1
    local integer f = Waves
    local integer e = NumPlayers
    set udg_CurrentWave = ( udg_CurrentWave + 1 )
    call DisplayTextToForce( GetPlayersAll(), ( ( "Wave " + I2S(udg_CurrentWave) ) + ( ": " + UnitId2String(udg_Wave[udg_CurrentWave]) ) ) )
    if ( Trig_Func_04() ) then
        set udg_Custom[1] = 1
        set udg_Custom[2] = 1
        set udg_Custom[3] = 2
        set udg_Custom[4] = 2
        set udg_Custom[5] = 3
        set udg_Custom[6] = 3
        set udg_Custom[7] = 4
        set udg_Custom[8] = 4
    else
        call DoNothing(  )
    endif
    set udg_Angle[1] = 0.00
    set udg_Angle[2] = 180.00
    set udg_Angle[3] = 270.00
    set udg_Angle[4] = 90.00
    set udg_Angle[5] = 180.00
    set udg_Angle[6] = 0.00
    set udg_Angle[7] = 90.00
    set udg_Angle[8] = 270.00
    loop
        exitwhen o > f
        call PolledWait( 0.20 )
        loop
            exitwhen i > e
            if ( Trig_Func_06() ) then
                set udg_TempPoint = udg_Spawn<i>
                call CreateNUnitsAtLoc( 1, udg_Wave[udg_CurrentWave], Player(8), udg_TempPoint, udg_Angle<i> )
                call RemoveLocation (udg_TempPoint)
                call GroupAddUnitSimple( GetLastCreatedUnit(), udg_TempGroup )
                call ForGroup( udg_TempGroup, function Trig_Func_05 )
                call DestroyGroup (udg_TempGroup)
            else
            endif
            set i = i + 1
        endloop
        set o = o + 1
    endloop
endfunction

//===========================================================================
function InitTrig_Untitled_Trigger_007 takes nothing returns nothing
    local trigger t = CreateTrigger(  )
    call TriggerRegisterTimerExpireEvent( t, udg_Next_Wave )
    call TriggerAddAction( t, function Trig_Actions_06 )
endfunction


</i></i>
 

LightChaosma

New Member
Reaction score
60
its not... but i think the prob is not in the triggers that were altered to bolean... i changed 2, an neither is working

i'll post map, the triggers are: player resorces, and destroy player units, both are in initialisation

off topic... all this trouble to convert 2 triggers... making me wanne prospone learning JASS...:p

EDIT well, that was my time today, will have about an hour to look into this tomorrow, so will prolly be able to make a few improvements saturday...
 

Renendaru

(Evol)ution is nothing without love.
Reaction score
309
I think the problem is in my trigger, try setting the part at the end where it decides the boolean. Just reverse the true's to false and false's to true.
 

LightChaosma

New Member
Reaction score
60
isnt the rpoblem, it kills the units of ALL players, wether they are true or false... if player 1 and 8 are playing, and what you say would be true, buildings of 2 3 4 5 6 7 should dont get destroyed. the point is it doesnt se t them to true, because the initial value of the array is false.

i did change the array size to 8, you set it to one... but it seems logic to that it has to be 8
 
General chit-chat
Help Users

      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