@Isagabe - In your example "entity_number" would always be 3 and doesn't actually do anything anyway. All spawns would occur one after another too so your code could be written this way to do the same thing. I think it also solves shakyshawn8151's problem too.
function multiplespawn_init(e)
end
function multiplespawn_main(e)
if GetPlayerInZone(e) == 1 then
Spawn(1)
Spawn(2)
Spawn(3)
end
end
An alternate method is to set the entity numbers at the top so you can easily change them (which is perhaps what you were trying to do).
function multiplespawn_init(e)
-- get these numbers from IDE - these are just examples.
entity_number1 = 11
entity_number2 = 18
entity_number3 = 36
end
function multiplespawn_main(e)
if GetPlayerInZone(e) == 1 then
Spawn(entity_number1)
Spawn(entity_number2)
Spawn(entity_number3)
end
end
There are
much more elegant solutions using tables and _name fields but that might be best left for now so as not to confuse the issue.
AKA SisterMatic (Steam)
Development/ Gaming Rigs
Sys 1: i7-4770 (3.5)/16Gb/128 SSD/3Tb/970gtx/2 x 23, 1 x 27 LCD - Sys 2: i7/8Gb/670gtx/1.5Tb/1 x 23 LCD - Sys 3: Amd Quad/8Gb/645gtx/1Tb/30" LCD