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 Product Chat / Confusion over spawning

Author
Message
piXX3D
17
Years of Service
User Offline
Joined: 27th Mar 2007
Location: Nowhere
Posted: 23rd Nov 2008 21:09 Edited at: 23rd Nov 2008 21:10
OK,

I have a crate that is only set to spawn once the player pushes a button.

When I push the button, the crate appears as I wish.

I want the crate to fall down, hit the ground and explode, which is does.

However, as soon as it explodes, another one instantly appears.

What I wish is for the crate to fall down, explode, then stop re-appearing. HOWEVER I wish for another crate to be spawned IF the player pushes the button again.

Attached is a screenshot of the crate's settings.

BTW, I have searched the forums and cannot find anything on this. The manual is pretty vague too.

Attached image:

Attachments

Login to view attachments
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 23rd Nov 2008 21:17
Use Ply's Mod.


Well, that's the short answer anyway, lol.


In any other version of FPSC (And all the other Mods.... for now ) as soon as you activate a spawning entity, it will start to spawn and CONTINUE to spawn until it has reached the "Maximum" amount to be spawned.

I think the best workaround for this is to make your button systematically activate a different crate each time it's pressed. Then you just put all of those crates where you want them to spawn, have them all set to "Maximum Spawn: 1". This is very limiting since you'd need to have a seperate entity for every crate that you want to be able to spawn.... which really sucks if you want the spawner to be "unlimited" or a very high number (like 1000 in your pic)


Alternatively, in Ply's Mod, you could activate the spawner with a value of -1 to stop it from spawning anymore.


The one and only,


Those who live in the past, are destined to insanity. Those who live only for the future, will be slaves to their ambitions.
Those who live in the moment... only they, are truly happy.
piXX3D
17
Years of Service
User Offline
Joined: 27th Mar 2007
Location: Nowhere
Posted: 23rd Nov 2008 22:17
thank you ply, once again... you've saved my cake many a time on these boards. I would use Ply's mod, but, meh it's for the puzzle competition and so I have to use the default engine. I entered without thinking I'd get this many problems

Quote: "In any other version of FPSC (And all the other Mods.... for now ) as soon as you activate a spawning entity, it will start to spawn and CONTINUE to spawn until it has reached the "Maximum" amount to be spawned."


When you say, "any other version of FPSC"... is that like X10, or version 112 or earlier or somethign? did this feature somehow get removed, or am I misreading what you said?

I don't really need it to spawn a gazillion times, I just need three or four... however I don't want it to suddenly run out cos that wouldn't fit the scenario the player was in...

Thank you anyway, I will take your advice.

If there's any other workarounds... I'd be happy to know
Nickydude
Retired Moderator
17
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Look outside...
Posted: 23rd Nov 2008 22:27
You could set up a number of separate box entities (say 10) and each time the player pushes a button, spawn a box and have the max at 5. Then when the player presses a button five boxes are spawned, player presses the button again another 5 are spawned. You could then warn the player that they'll only have a set number of boxes that will appear.

Hope you understood that!

piXX3D
17
Years of Service
User Offline
Joined: 27th Mar 2007
Location: Nowhere
Posted: 23rd Nov 2008 22:31
@Nickydude... Kind of...

So saying I made 10 box entities. Each time the player pushes the button, it spawns a box. when that box explodes another 4 come out. Is that what you're saying? Then once all 5 are gone, I can push it again and the process repeats another 9 times.

I get it, but... I only want 1 to come out
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 24th Nov 2008 02:58
Well, if you're wanting ONLY 1 to appear for EACH time the player presses the button, you'll be needing to do what I suggested (kinda what Nickydude is saying but he suggests having a max spawn of 5 for each of the crate entities). Then your player will get a new crate each time they press the button.... but only up to the amount that you created.

Or, you can do what I suggested but have the last one cause a "malfunction" in the vending machine and have it shoot out like 10 at once (MAx Spawn of 10, Max of 10 at a time) and then the machine "breaks" and can't vend anymore... so may want to put a checkpoint before they get there, lol.


Quote: "When you say, "any other version of FPSC"... is that like X10, or version 112 or earlier or somethign? did this feature somehow get removed, or am I misreading what you said?"


I mean any official version of X9... I don't know about X10, but I assume it'll be the same way. This never was a feature... it has always been designed to continue spawning as soon as it's been activated.


The one and only,


Those who live in the past, are destined to insanity. Those who live only for the future, will be slaves to their ambitions.
Those who live in the moment... only they, are truly happy.
piXX3D
17
Years of Service
User Offline
Joined: 27th Mar 2007
Location: Nowhere
Posted: 24th Nov 2008 08:43
Ah ok. Well, thanks for the tips both.

I tried having a look to see if there were any scripting commands available. Unfortunately due to my lack of being able to get my head around programming (despite the fact I've learnt two other programming languages 'fluently', it only seems to be FPI ) the closest I got was this:

:state=0:state=1
:state=1:spawnoff

In FPI EditPad the definition of spawnoff was "switches off the entities ability to spawn." what I tried was making one crate and giving it this script, and perhaps seeing if once it had been spawned it would stop respawning. But apparently not! So laugh away, I have been fooled again.

Ah well. Worse things happen at sea, and thanks for the help so far.
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 24th Nov 2008 09:58
I never could get that command to work...

It may be because the "spawner", which is a hidden entity, has no real script attached to it, the scripts you give to the entity are for the spawned entities only.


The one and only,


Those who live in the past, are destined to insanity. Those who live only for the future, will be slaves to their ambitions.
Those who live in the moment... only they, are truly happy.
Bejasc3D
16
Years of Service
User Offline
Joined: 17th Aug 2008
Location: Down Under
Posted: 24th Nov 2008 10:45
I know that this probably isnt the awnser, and probably not even close because Ply or Nicky never said anything... but... There is a Maximum spawn option in your screenshot that is set to 1000?

~/BennyBoy\~
piXX3D
17
Years of Service
User Offline
Joined: 27th Mar 2007
Location: Nowhere
Posted: 24th Nov 2008 17:47
@Benny Boy: Yes, the Maximum spawn is the maximum times the object is able to spawn. It's just that I don't want it to spawn repeatedly, I only want it to spawn as I push the button. Meaning I could push the button 1000 times and only then would it stop.

Thanks anyway though
piXX3D
17
Years of Service
User Offline
Joined: 27th Mar 2007
Location: Nowhere
Posted: 24th Nov 2008 22:59 Edited at: 24th Nov 2008 23:15
EDIT: IT WORKS. OH BOY YES. IGNORE ALL THAT STUPID POST BELOW. I TRIED IT ONCE AND IT FAILED. I TRIED IT AGAIN... AND IT WORKED! Dont know how... but Im not complaining!

Well a quick update, I've got a script that does the trick - well, at least it's MEANT to!. it's linked to the Lift Button found in the sci-fi entitybank (I liked the look of that button!).

It happily spawns the first crate, but yeh you guys no I'm not much cop at scripting. I've tried my best here but unfortunately I fail to be terribly impressive at this thang.

Btw the script isn't finished yet, but I'm not gonna finish it obviously until I get it to work!

Oh yeah, the problem of course... It doesn't spawn the second crate. I didn't know what command to use to get it to change the "if used" field, and I didn't think there was one (or at least I didn't find it). So I thought the nearest thing was the "settargetname=" and "activatetarget=". Laugh at me if I misunderstood these commands and it doesn't work like that. And once your laughing stitch has gone... please give me a hand

I thought "settargetname=" would set the name for a target. Then "activatetarget=1" would activate the target. So, for example, settargetname=fall2, activatetarget=1 would activate fall 2 and make it spawn... come on, its only logical..



If it's any help I even read through it in english, courtesy of X-Plain!

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 25th Nov 2008 01:13
So using seperate entities to spawn individual boxes worked for you? That's good to hear.

Perhaps you should re-post it in the Script board with a bit of an explanation behind it so that others can benefit from it as well.


The one and only,


Those who live in the past, are destined to insanity. Those who live only for the future, will be slaves to their ambitions.
Those who live in the moment... only they, are truly happy.
piXX3D
17
Years of Service
User Offline
Joined: 27th Mar 2007
Location: Nowhere
Posted: 25th Nov 2008 08:35
Script board: will do

Thanks for all your help,

~ Jack

Login to post a reply

Server time is: 2024-10-11 19:25:19
Your offset time is: 2024-10-11 19:25:19