Search the Community
Showing results for tags 'object init'.
Found 1 result
-
Hi all, First off, I am sorry if this is a known issue or if I am just plain wrong: I am new to scripting. I looked on the web but couldn't find anything about this topic... For context, I am trying to create a permanent smoke grenade from script. From the editor, it is straightforward: place a "smoke grenade" module and enable "permanent effect". This -if I am not mistaking- changes the variable "repeat" from 0 to 1. Makes sense. To make sure, I created a smoke grenade module and put "this setVariable ["repeat",1];" in its "init" module. Became permanent. The weird part now is that when I try to set this variable in a script, even though it changes the variable, the grenade pops out of existence after it's normal duration... So I guess this has to be set in the object's "init". But how do you access this init field since setVehicleInit has been disabled? Or do I get the problem wrong? To create the grenade from script and try to make it permanent: smoke_grenade = "SmokeShellGreen" createVehicle _atPosition; smoke_grenade setVariable ["repeat", 1]; As a disclaimer, I am aware that there are workarounds involving while loops, I am not interested in a workaround for this problem; I am trying to understand how Arma3 works.
- 4 replies
-
- setvariable
- script
-
(and 3 more)
Tagged with: