clearVehicleInit – Talk

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
m (Example error)
Line 5: Line 5:


: No, no need for that. --[[User:Raedor|raedor]] 10:52, 14 July 2007 (CEST)
: No, no need for that. --[[User:Raedor|raedor]] 10:52, 14 July 2007 (CEST)
== Example error ==
The example used, is incorrect as far as my tests show. It should be:
<code>tank1 setVehicleInit "hint 'hi all'"; clearVehicleInit tank1; processInitCommands; </code>
[[clearVehicleInit]], clears the pending init commands, not those already processed. Once the init commands are processed, they can not be removed. Even if the vehicle is killed or deleted.
It might also be worth noting that the timing of processed init commands during JIP means any functions loaded by init.sqf and certain commands like [[player]]. Will fail, unless the user intervenes with some sort of conditional loop or delay beforehand.
My usual disclaimer applies, this was tested using a dedicated server running on the same machine as the client. So I may be wrong [[User:UNN|UNN]] 13:31, 16 July 2007 (CEST)

Revision as of 13:31, 16 July 2007

Are the effects of this command global or local? --ViperMaul 11:54, 25 June 2007 (CEST)

Should this be run before a vehicle is deleted? --Doolittle 21:01, 13 July 2007 (CEST)

No, no need for that. --raedor 10:52, 14 July 2007 (CEST)

Example error

The example used, is incorrect as far as my tests show. It should be:

tank1 setVehicleInit "hint 'hi all'"; clearVehicleInit tank1; processInitCommands;

clearVehicleInit, clears the pending init commands, not those already processed. Once the init commands are processed, they can not be removed. Even if the vehicle is killed or deleted.

It might also be worth noting that the timing of processed init commands during JIP means any functions loaded by init.sqf and certain commands like player. Will fail, unless the user intervenes with some sort of conditional loop or delay beforehand.

My usual disclaimer applies, this was tested using a dedicated server running on the same machine as the client. So I may be wrong UNN 13:31, 16 July 2007 (CEST)