Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Enderkevin13

A Little Help Here?

Recommended Posts

Okay, I'm Gonna Be As Detailed As I Can.

What I Want, Is For Stimpacks Spawned At MapSpots, To Make It Where You Pick Them Up And They Spawn Another Set 30 Seconds Later. I'm Gonna Use Thing_SetSpecial For This, So How Can I Do That?

Share this post


Link to post

Set up a map spot with a unique TID for each stimpak and have a script spawn stimpaks with the same TID as each map spot at the start of the level.

Have an array called "countdown" or whatever with as many elements as stimpaks where they are all initialized at zero.

Every tic, call a function that loops through the TID of each map spot and does a if(ThingCount(T_STIMPACK, tid) == 0) or whatever. If it detects that the stimpak is missing, set the corresponding array element to 1050 (30 * 35).

Then after looping through every tid, loop through the array and try to decrement each array element by 1 if it's greater than 0, and if an element is going from 1 to 0, spawn a new stimpak at the corresponding TID map spot.

Share this post


Link to post

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
×