Jump to content
Tankbuster

fnc_replaceWithSimpleObject. wiki says not for MP?

Recommended Posts

Chaps,

 

https://community.bistudio.com/wiki/BIS_fnc_replaceWithSimpleObject

 

I was wondering if the advice on the wiki still holds true?

 

Quote

Use with caution as this technique is not very clean - should not be used for many objects and definitely not in MP games.

I've thought about how I would go about doing the same thing and my code would have been the same as the BIS function. Get its position, direction and vectorup, delete it and make a simpleObject in its place.

 

In my mission, players can deploy a small FOB from a given vehicle. It's primarily a premade composition, but players are told they can Zeus in a few optional objects such as statics, sandbags and a ground decal (it's a parachute jump target) that runs an existing vehicle refuel, rearm and repair script. But it's ugly and I wanted to replace the jumptarget with the sexy land_repair_depot from Tank DLC. Having the parachute jumptarget in the Zeus menu is confusing for players too when it's actually my service script location.

 

But the depot only repairs and I really want it to do a full repair, refuel and rearm. Just disabling sim on the depot doesn't stop its repair-only function.

 

Given that I'm only going to be doing this on one object and only a few times per session, do we think I can safely ignore the biki warnings about network traffic? I did some lashed up tests and even replacing 50 objects didn't cause any obvious problems.

Share this post


Link to post
Share on other sites

I have used this quite a bit. Never had any issues. I noticed it doesn't work on all objects, can't recall which. Might of been issue on my end / bug at the time. You can override the Rearm, etc without making it a simple object too. Check out EH. Never mind, I thought there was. You can set ammo, fuel, etc cargo to 0 though.



NOTE:

    Useful if you do not have access to simple object adjustment data - e.g. in case of unsupported/discontinued asset.
    All official assets have the adjustment data defined in config.

Use with caution as this technique is not very clean - should not be used for many objects and definitely not in MP games.

I would just prevent default service options. You can also prevent action using inGameUISetEventHandler command.

https://community.bistudio.com/wiki/inGameUISetEventHandler

  • Like 1

Share this post


Link to post
Share on other sites
2 hours ago, HazJ said:

I have used this quite a bit. Never had any issues. I noticed it doesn't work on all objects, can't recall which. Might of been issue on my end / bug at the time.

 

It most likely concerns objects without configuration, such as trees and plants - for those you need to work out the adjustment data yourself.

  • Like 2

Share this post


Link to post
Share on other sites
3 hours ago, HazJ said:

 

I would just prevent default service options. You can also prevent action using inGameUISetEventHandler command.

https://community.bistudio.com/wiki/inGameUISetEventHandler

 

 

As I understand it, which is not very much, that is used to 'supress' the addaction type menu on objects. The thing is, the repair depot doesn't use that. Like repair vehicles, all you have to do is get your damaged vehicle close to it, and the repair starts automatically, so I'm not sure that EH is what I'm after.

Simpleobject does work on the repair_depot, the option is available in the Eden editor and it worked as expected in a live server.

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

×