Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Scripts / Spawning the same item more than once - with a single switch

Author
Message
Toffeemouse
14
Years of Service
User Offline
Joined: 29th Apr 2010
Location: United Kingdom
Posted: 17th Mar 2012 18:58 Edited at: 17th Mar 2012 18:59
E.g. Press switch, one barrel spawns.
Press switch, barrel spawns again
press switch, barrel spawns again

etc etc. I am trying to make an item dispenser with the cash script but this seems to be the first step. Sadly the current scripts mean that you press the button and if your barrel is set to "can spawn 100 times", it will spawn 100 times all at once and the switch becomes useless after one use.

As a workaround I have been using this:


This is pix3d's multiple entity spawning script, but I am using it to just spawn 3 of the same item.

I have extended the script to 10 items in my game. The problem is I would like 100 and pasting and changing the states is horrible, not to mention I would need to have 100 barrel entities on one square waiting to spawn.

tl;dr: does anyone know how to make a resuable entity spawning switch
bruce3371
14
Years of Service
User Offline
Joined: 4th Aug 2010
Location: Englishland
Posted: 18th Mar 2012 19:08
I've had a go at doing this myself, but with no luck, so if anyone can give us some hints, I'd appreciate it as well...

maho76
13
Years of Service
User Offline
Joined: 31st May 2011
Location: universe-hub, playing the flute
Posted: 20th Mar 2012 11:03
you have to make sure that the barrel doesnt spawn where the player can see it (maybe use a trapdoor etc.), then open trapdoor with the switch instead try to respawn the barrel itself.

or you can use this system, changing triggerzone-activation to switch to change the variables:

http://forum.thegamecreators.com/?m=forum_view&t=187181&b=23

but watch out for the limitations.

in 1.18 you only see a little flickering, but unfortunately scene commander changed appear-conditions in 1.19 to get rid off the invisible-spawn problem, now the object appears completely for nearly a second so you have to hide spawnpoint (or doing a resizing appear-animation for the object).

Login to post a reply

Server time is: 2024-11-24 02:51:44
Your offset time is: 2024-11-24 02:51:44