Jump to content
  • 0

How would I make an item delete once accessed?


ElDubya

Question

Hey all, 

I have a trader setup that requires accessing an infostand to be teleported to it. What I wanted to know is, what would I have to add to this to make the infostand delete after it's been accessed once?

titleCut ["", "BLACK", 0];
playsound "tele";
titleText ["Now Accessing Hidden Trader", "PLAIN", 3]; titleFadeOut 4;
sleep 2;
player setPos [12463.2, 6758.78, 0.00202942];
sleep 5;
titleCut ["", "BLACK IN", 0];
titleText ["Hope you brought some cash with you .... ;)", "PLAIN", 3]; titleFadeOut 4;

Thanks in advance for any help you could provide.

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

Cool idea. Do you have the infostand in the same spot every restart?

There are a couple ways I can think of. My first idea would be the obvious, create the infostand every restart and put deleteVehicle at the end of the script ran on it.

Second idea would be to set a var to the infostand after accessing it and put an exitwith if the var exists at the beginning of the script. If it's already accessed, you can't click on it again.

Last, I think you could use hideObject.

Link to comment
Share on other sites

  • 0

It's tied to an AI event that players can spawn if they find a cobalt file. Once it's activated, an island fills with AI and an infostand appears in a building in the middle. If a player fights his way to the infostand, he can scroll on it and get teleported to a hidden trader who sells a rare rifle and ammo, an Anzio 20x102mm. (We have our own modpack that all players have downloaded)

I have it all built and working perfectly, just this last deletion of the infostand has me stumped. I'm not very knowledgable with code.

My other idea was to also have an infostand appear at a different location (if I gave a list of co-ordinates, say about 100 possible locations) every restart, that players would have to find in order to access the hidden trader.

I run a PVE server, players have lots of time on their hands :)

Link to comment
Share on other sites

  • 0
On 1/25/2016 at 5:27 PM, ElDubya said:

It's tied to an AI event that players can spawn if they find a cobalt file. Once it's activated, an island fills with AI and an infostand appears in a building in the middle. If a player fights his way to the infostand, he can scroll on it and get teleported to a hidden trader who sells a rare rifle and ammo, an Anzio 20x102mm. (We have our own modpack that all players have downloaded)

I have it all built and working perfectly, just this last deletion of the infostand has me stumped. I'm not very knowledgable with code.

My other idea was to also have an infostand appear at a different location (if I gave a list of co-ordinates, say about 100 possible locations) every restart, that players would have to find in order to access the hidden trader.

I run a PVE server, players have lots of time on their hands :)

just curious if you would mind sharing this...Im actually working on something similar, and thought about the infostand script you had...then found this lol

Basically i want players to be able to spawn static events, but only once per restart...I was looking at the rob bank script too to help me out.

Thanks

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...