Jump to content
Sign in to follow this  
Kovah85

createVehicle delay

Recommended Posts

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

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

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

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
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

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

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 by Kovah85
Tested suggestion

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×