Kovah85 10 Posted February 7, 2010 Any time I use createVehicle and then add an action to it, there is a 5 to 10 second delay before the action even shows up. What is the cause of this and is there any way around it? Share this post Link to post Share on other sites
dmarkwick 261 Posted February 7, 2010 Script lag. There is an inbuilt 0.03ms limit per frame and if your script hasn't executed by then, it is queued for the next cycle. Now, obviously, a delay of one or two frames is negligible, and the fact that you (and I ;)) see delays of several seconds tells me that there *might* be some problem with the scheduling system. I don't know if a ticket exists for this scheduling problem. Share this post Link to post Share on other sites
Kovah85 10 Posted February 7, 2010 Ah okay. Thanks for explaining that. I was trying to make sure I wasn't doing anything wrong. Share this post Link to post Share on other sites
[aps]gnat 28 Posted February 8, 2010 Maybe try preloadObject http://community.bistudio.com/wiki/preloadObject Share this post Link to post Share on other sites
Wolfrug 0 Posted February 8, 2010 Um. Do -any- actions show up for the vehicle, e.g. Get In? If they do, then it's a bug, if they don't, it's just the fact that vehicles created with createVehicle need a moment to be revealed to you before they can be used. Add a Player reveal VehicleName to the script and shazam, it should be immediately useable. Although the preloadObject thing might work too! Regards, Wolfrug Share this post Link to post Share on other sites
Deadfast 43 Posted February 8, 2010 Script lag. There is an inbuilt 0.03ms limit per frame and if your script hasn't executed by then, it is queued for the next cycle. In that case script queue was already present in ArmA 1 ;). No, it's a knowledge issue. It takes a while for the player to acknowledge there is a new vehicle. As Wolfrug said, you can use the reveal command to have the actions show up immediately. Share this post Link to post Share on other sites
shuko 59 Posted February 8, 2010 Indeed, you can just use command reveal to get the action to show up sooner. Something along these lines: _v = createvehicle [something,something]; _v setvehicleinit "player reveal this"; processInitCommands; Share this post Link to post Share on other sites
Kovah85 10 Posted February 8, 2010 (edited) Oh thanks a lot guys! This is a great help. EDIT: I just tested it out in my mission and using the reveal command works perfectly. Thanks again. Edited February 8, 2010 by Kovah85 Tested suggestion Share this post Link to post Share on other sites