Jump to content

Recommended Posts

Is there already a function or script to 'clone' a vehicle?

What I mean is, saving ALL vehicle params like position, speed, direction, inventory, fuel state, ammo state, damage states of every part, crew, etc.

Then delete this vehicle, and replace the vehicle with a new, cloned one.

Share this post


Link to post
Share on other sites

There are several caching scipts which have to do exactly this to cache groups and their vehicles but i guess its easier to write it yourself than extracting it from such mostly big script frameworks...

Share this post


Link to post
Share on other sites
9 hours ago, Nicoman35 said:

Is there already a function or script to 'clone' a vehicle?

What I mean is, saving ALL vehicle params like position, speed, direction, inventory, fuel state, ammo state, damage states of every part, crew, etc.

Then delete this vehicle, and replace the vehicle with a new, cloned one.

 

Not with all that params. Usually respawn vehicle systems doesn't care with the previous damage state!  So you have to script saving all that stuff, then cloning on condition you want (respawn?)...
Tell us more about your aim.

Share this post


Link to post
Share on other sites

Drones, for example the Darter AR2, have the tendency to get 'stuck', if you command them to land. Things get funny, when you try to give them any other commands afterwards. Or try to steer them by yourself. They get.... stubborn. Like a donkey. By replacing that 'broken' drone with a new one, I hope to have an immersive workaround. This was the intention. Will write something when I get to it.

Share this post


Link to post
Share on other sites

That looks like a heavy scenario with multiple scripts & mods & units.

Generally, when things come wrong, AIs dumber and dumber, that means all the behaviors (sqf or fsm) can't run on due time. There is no error, just no result.  So, IMHO, adding scripts for replacing existing objects will not fix anything.

Share this post


Link to post
Share on other sites

Your assumption is right. I manly play KP Liberation, with multiple mods. Heavy workloads occur often.

If I hear anybody telling again 'PCs nowadays are much too fast and too potent for the most users to use that potential', I will kick him in the nuts.

 

Many thanks for your help, pierremgi. 

Share this post


Link to post
Share on other sites
2 minutes ago, Nicoman35 said:

Your assumption is right. I manly play KP Liberation, with multiple mods. Heavy workloads occur often.

If I hear anybody telling again 'PCs nowadays are much too fast and too potent for the most users to use that potential', I will kick him in the nuts.

Do you use headless client on the mission?

If not then u should consider to use som HC to get some workload moved to other cpu cores...

Share this post


Link to post
Share on other sites

I would love to, saro, but I failed due to my IQ. If you know a step by step guide for dummies on how to set up a HC, just tell.

Share this post


Link to post
Share on other sites

Its not that hard if the mission supports it already and the liberation version i played some time ago did.

You can easy verify this by checking if there are HC slots in the lobby. You are able to see the slots if u r logged in as admin only.

 

The only thing u ve to do then is to set the IP for the HC in server.cfg.

After that u can connect a HC like you start a server but with -client as start parameter...

 

All of this is described detailed in the bi-wiki

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

×