Jump to content
Sign in to follow this  
all3n

Buyable plots of land?

Recommended Posts

i know its possible, maybe even fairly easy to do, but as i have no scripting experience was wondering if someone could do it or at least give me info to relay to our mission scripters.

i need a trigger, a box, that can be claimed by a civilian "for a set value (money)" that when claimed, the owner can access it like a crate via scroll menu and selecting "storage",where they can put weapons, ammo, clothing, ect. ect. and no other player would be able to access this container.

Secondly, this "storage" script would need to work the same for vehicles, i can pull up to my "box" in my car and scroll wheel and "store vehicle", and later on i can come back to the "box" and scroll wheel to select "garage", select my vehicle, and spawn it in. this script may or may not be used by the R-gaming community for the Stratis life mission depending on the quality, credits would be given of course

Share this post


Link to post
Share on other sites

For a garage, it would make sense to simply save that vehicle in a variable and then teleport it to an unaccessible place on the map. Upon retrieving it, you'd only have to teleport it back. That way you don't have to worry about saving all the parameters of that vehicle. While "in the garage" it would also make sense to use this http://community.bistudio.com/wiki/enableSimulation to disable simulation of that vehicle.

As far as buying "land" goes, you could make it so that upon buying the land, the "storage" is created as a local object and therefor not accessible by anyone else.

However, there are several possible solutions for this.

If your mission-scripters are worth their salt, they'll manage it (or maybe they should just go here and ask for themselves) ;)

Share this post


Link to post
Share on other sites

@TAJIM, thanks for the ideas, the teleporting would save up a lot of scripting, nice one, can you elaborate a bit more on the local object storage?

Share this post


Link to post
Share on other sites

What I have done on my Chernarus Life mission a while back was made a Lot system (where player can buy property such as residential and commercial) and it gave them access to building structures and gathering revenue.

The lots were marked on the map and once a player bought it, the marker's display name changed to show "Lot 1: PLAYER NAME".

Have an action available when the player is near the land and if it is available for purchase - have it display the price of the land - when purchased, have the marker rename to display ownership.

Now for the storage box; once the property is bought - create an ammobox - remove all of its contents - give the player the action to use the storage when near it (local since it is addaction).

For vehicle storage - http://community.bistudio.com/wiki/setVariable

Set a variable for the vehicle that determines if it can be accessed by the player.

Share this post


Link to post
Share on other sites

@zooloo, thanks, but what about locking it? preventing other players from entering the area of accesing the garage?

Share this post


Link to post
Share on other sites
@zooloo, thanks, but what about locking it? preventing other players from entering the area of accesing the garage?

Just do a check if the player owns the land, if they don't then teleport them to a location just outside of the area.

Share this post


Link to post
Share on other sites

I have had similar ideas to this in the past but never sat down and tackled it. This sounds really do able and cool. I will sit down soon and play around with these for a mock for others.

Is saving the parameters and state of a vehicle that much of a pain? It would be nice to see a mission where someone can buy a piece of land, park their vehicle with items in that vehicles storage/gear on their land and have it save to another day.

Share this post


Link to post
Share on other sites
Is saving the parameters and state of a vehicle that much of a pain? It would be nice to see a mission where someone can buy a piece of land, park their vehicle with items in that vehicles storage/gear on their land and have it save to another day.

Well, it would only really be fuel and damage right? And hypothetically, while the vehicle is in the 'garage' it could be repaired and refueled, yeah? So you could just delete the vehicle when its stored, save the classname, and create a new one. I think.

Share this post


Link to post
Share on other sites

Theres more to it than that – the contents of the vehicle for example. Especially as far as ammo per magazine goes.

So ff you want to do that right, it'll quickly grow into a very complex script.

Teleporting the vehicle away and disabling its simulation doesn't cost much performance and makes sure everything is saved properly, without any hassle.

Another alternative would be to allow saving in the garage only when the cargo of the vehicle is completely empty.

Share this post


Link to post
Share on other sites
Well, it would only really be fuel and damage right? And hypothetically, while the vehicle is in the 'garage' it could be repaired and refueled, yeah? So you could just delete the vehicle when its stored, save the classname, and create a new one. I think.
Theres more to it than that – the contents of the vehicle for example. Especially as far as ammo per magazine goes.

So ff you want to do that right, it'll quickly grow into a very complex script.

Teleporting the vehicle away and disabling its simulation doesn't cost much performance and makes sure everything is saved properly, without any hassle.

Another alternative would be to allow saving in the garage only when the cargo of the vehicle is completely empty.

I think the point of view I was approaching this with was persistence. Similar to MineCraft where what you do in that world is permanent and those who join in progress are updated to those actions. so for example in some mock up mission where the player has the ability to load his/her vehicle, house with item, save the state of that house or vehicle, leave the server and that house and vehicle is subject to being destroyed, robbed or tampered with in some way. Example being the car parked in the driveway of garage is left in the world/ server as owner is offline and can be robbed and such.

I know some would and wouldn't favor that and already sounds super advanced to even implement but what you gents have come up with is doable sounds very simple way of tacking it.

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  

×