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 / Making enemys respawn evry time the player enters a triggerzone

Author
Message
The Zoq2
15
Years of Service
User Offline
Joined: 4th Nov 2009
Location: Linköping, Sweden
Posted: 1st Feb 2011 00:14
Hi, im trying to make a "freeroam" game in a city. I have managed to keep the fps up for now, but i havn't added enemys yet. Theirfore i want to make the enemys spawn by triggerzones. I know how to make them spawn once, but i want them to spawn evry time the player enters a triggerzone (possibly with a minimum time between death and spawn delay) and not only the first time.

Is that possible, if so how. Im using the v118 b7

Srry about my english im from sweeden
Ched80
14
Years of Service
User Offline
Joined: 18th Sep 2010
Location: Peterborough, UK
Posted: 3rd Feb 2011 11:03
I don't think this is possible. I was trying to do a similar thing with my game, but got stuck. I was hoping i could keep re-spawning the same enemy after certain events/times but the entities or the FPSC engine dosen't offer that kind of spawning control.

I was going to go down the route of creating lots of enemies in the level, but control the spawning of each one with a passive script attached to a bloodsplat. You could do a similar thing with a trigger zone.

Or you could mod the source to get the functionality you want. This is my plan: modifying "spawnon" & "spawnoff" to control whether an enemy spawns (rather than just set the spawn at start flag) but i'm miles away from getting it working.

[url="http://raptr.com/No_Turn_Right?src=em_forum"][/url]
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 4th Feb 2011 22:49
I did make a mention of this in Ched's thread, but PB can do what you're asking. By activating a spawner entity with a value of -1, you can "turn off" the spawning.

Here is an example script of how it would work (Assuming the spawner is set in the zone's IfUsed field):



Notice that in the script, we are always activating the spawner with a value of -1, to keep the spawner turned OFF unless the player enters the zone. When the player enters the zone, it will activate the spawner ONCE to allow it to spawn ONE TIME. Then, the player must leave the zone and re-enter before it will spawn more.


Hope this helped you out in some way.


The one and only,


Only those who sow the seeds of their desires will reap their benefits later.
However, I have seeds of my own to tend to. I don't have time to be someone else's watering can.

Login to post a reply

Server time is: 2024-11-24 13:04:55
Your offset time is: 2024-11-24 13:04:55