is it possible to keep track of an amount of data per unit without having to create a sh**load of variables, if so, how plz...
I think it has something to do with structs, but for some reason, everytime I try to use them, the game doesn't start, so if someone would post an examlory code from the first 'till the last line from the trigger, I'd be happy...
this is the last code I tried it with
Header
trigger itself
feel free to correct me if anything is wrong
I think it has something to do with structs, but for some reason, everytime I try to use them, the game doesn't start, so if someone would post an examlory code from the first 'till the last line from the trigger, I'd be happy...
this is the last code I tried it with
Header
trigger itself
JASS:
function Trig_Structtest_Actions takes nothing returns nothing
local test a = test.create()
set a.sum = a.a + a.b
set uitkomst = I2S(a.sum)
call test.destroy()
endfunction
//===========================================================================
local string uitkomst
function InitTrig_Structtest takes nothing returns nothing
set gg_trg_Structtest = CreateTrigger( )
call TriggerAddAction( gg_trg_Structtest, function Trig_Structtest_Actions )
call DisplayTextToPlayer(Player(0),0,0,uitkomst)
endfunction
feel free to correct me if anything is wrong