Community Forum

Help making a buyable removeable placeable for map

Forum Overview >> Scripting

Created27.01.2021 11:59

Garry Parkinson (bonkser) 27.01.2021 11:59
Hi, I am making a map for FS19. It has been extremely interesting to do and am enjoying it very much. I have a problem though, and I'm stuck trying to solve it. I would relly appreciate some pointers or solutions.
I have three farmyards: One default farm (includes animal husbandry) and two extra farmyard areas with buildings which can be bought via the farmlands method. My problem is that you don't really have to buy the extra farmyards because you can just drive in and use them even if you don't own them. Is there a way of having a placeable barrier fence set at the entrances so that when you buy the farmyard(s) they are removed automatically or is there a way to create a fence mod placeable with trigger and collision which, when you buy it in game will remove the barriers so you can drive into the farmyard(s). I have made a sellable placeables fence barrier which works through the shop but I want it so you have to pay for it to be removed, not get money for it.
Thanking you in anticipation

Bilbo Beutlin (BBeutlin) 27.01.2021 18:40
I've read about fences which disappear when buying the farmland. But don't remember on which map it was. Also don't know if a custom script is used.
If you sell a placeable, you'll get money. Else it would require negative prices - that's not allowed.

Garry Parkinson (bonkser) 27.01.2021 20:47
Thank you, I'll have a look, might just write a tree as a fence post and add them as a barrier and leave a chainsaw in the yard in vehicles.xml so you can cut them down once you own the land. Kind regards.

Note: Log in to post. Create a new account here.