createTrigger – Talk

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<code>" to "<code style="display: block">")
m (Text replacement - "Killzone Kid" to "Killzone_Kid")
 
Line 38: Line 38:
This note is misleading, so I moved it here. To detect initialisation it is enough to wait until list is not [[nil]].
This note is misleading, so I moved it here. To detect initialisation it is enough to wait until list is not [[nil]].
<code style="display: block">[[waitUntil]] {![[isNil]] {[[list]] trig}};</code>
<code style="display: block">[[waitUntil]] {![[isNil]] {[[list]] trig}};</code>
Waiting until list has some elements is waiting for detection not initialisation. [[User:Killzone Kid|Killzone Kid]] ([[User talk:Killzone Kid|talk]]) 19:16, 18 September 2015 (CEST)
Waiting until list has some elements is waiting for detection not initialisation. [[User:Killzone_Kid|Killzone_Kid]] ([[User talk:Killzone_Kid|talk]]) 19:16, 18 September 2015 (CEST)

Latest revision as of 13:48, 12 March 2024

So... can anyone enumerate the types? Of course, the ones added through addons might be too much to ask for. --MaHuJa 19:22, 29 December 2006 (CET)

EmptyDetector should be the only type in ArmA besides those added by addons. --TeRp 22:29, 29 December 2006 (CET)

createTrigger should be called createTriggerLocal... it is only created on the machine executing the command. --Doolittle 22:32, 17 November 2007 (CET)

How do you Remove a Trigger you created?

// How do you delete a Trigger you dynamically created?

 _Trig = createTrigger ["EmptyDetector", [0, 0, 0] ];
   

// Now we should delete this trigger since we no longer need it as I have // heard the more Triggers you have the more it impacts the server. // Currently I cannot find a command to accomplish this.

_Trig = nil;

// Would this work?

Use deleteVehicle _Trig to remove it. --Kronzky 09:29, 19 May 2007 (CEST)
From my experience there's no working way to remove triggersiin MP.--raedor 15:17, 19 May 2007 (CEST)

I will test it. But hopefully that is not true. If it is we need to have BIS add this ability. We need to be able to manage server impact by controlling the amount of triggers we have. Any object that we make on the map we should have a way to name and delete that object. Right?

detecting trigger initialisation

Posted on September 18, 2015 - 12:54 (UTC)
MisterGoodson
Following TeaCup's note, you can reliably use the following to wait until a trigger has initialised: waitUntil {(count (list _trigger)) > 0}; // Wait for trigger to initialise

This note is misleading, so I moved it here. To detect initialisation it is enough to wait until list is not nil. waitUntil {!isNil {list trig}}; Waiting until list has some elements is waiting for detection not initialisation. Killzone_Kid (talk) 19:16, 18 September 2015 (CEST)