lfnetwork.com mark read register faq members calendar

Thread: spawn npc every X seconds?
Thread Tools Display Modes
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Old 06-13-2004, 07:04 AM   #1
d_eisenga
 
Join Date: Feb 2001
Posts: 36
spawn npc every X seconds?

i want to make a map where a new NPC is spawned every X seconds(but only if there arent already X NPCs on the map). i know you can spawn a new NPC when en existing NPC dies but that requires you to put all the NPCs into the map and link them to eachother, and that means the level isnt 'endless', which is what i'm going for. kinda like an exhaustion or endurance level.

so i thought, i'll just run a script which will wait X seconds and spawn an NPC, and repeat that process forever. but i cant find a command in behaved to spawn an npc, or to check for the current number of npcs(though i suppose i could use a counter for that.)

can anyone help?
d_eisenga is offline   you may: quote & reply,
Old 06-13-2004, 09:45 AM   #2
snife
Rookie
 
snife's Avatar
 
Join Date: May 2004
Posts: 68
Try this:

Mark all NPC then give them:
key:count
value:100000000000
or how many times u want the npc to spawn

and:

key:tagetname
value:npc

______________________________

then make a func_timer
give it:
value:count
key: how many sec u want

and:

value:target
key:npc



that would do it,,,,,


/Snife the map maker of SA
and Owner of Skyline's And Snife's JKA project
snife is offline   you may: quote & reply,
Old 06-13-2004, 09:58 AM   #3
d_eisenga
 
Join Date: Feb 2001
Posts: 36
thanks, i'll try that right away
d_eisenga is offline   you may: quote & reply,
Old 06-13-2004, 10:08 AM   #4
GothiX
Ocean Soul
 
GothiX's Avatar
 
Join Date: Aug 2003
Location: Just a journey away
Posts: 1,906
Count -1 would work better.


GothiX is offline   you may: quote & reply,
Old 06-13-2004, 06:07 PM   #5
d_eisenga
 
Join Date: Feb 2001
Posts: 36
yes, it works perfectly! thanks a lot.

one more thing though, with all those npcs getting killed, a lot of dead bodies and dropped weapons pile up on my map. the bodies disappear(if only when they go off-screen) but the weapons dont disappear unless i pick them up, and this level is designed to be played mostly with the saber. how do i make these disappear(at least the weapons but the bodies too if possible)?

thanks!
d_eisenga is offline   you may: quote & reply,
Old 06-14-2004, 12:29 PM   #6
zag
Rookie
 
zag's Avatar
 
Join Date: Sep 2003
Location: england
Posts: 80
make shader with the surfaceparm "nodrop"
any one that dies inside of this brush wont drop a weapon i think


Movie Battles Team Member
zag is offline   you may: quote & reply,
Old 06-14-2004, 03:55 PM   #7
{NJO}*Dark
Rookie
 
{NJO}*Dark's Avatar
 
Join Date: Feb 2004
Location: cyberspace.co.uk
Posts: 149
Do you want there to always be X number of npcs?
If so then you just have it spawn its self every time it dies. There are two ways, either have X number of npc that spawn them selves or have one that will spawn x times at the beginning then spawn as you go along

Zag, there is already a shader like that in textures/system/nodrop
{NJO}*Dark is offline   you may: quote & reply,
Old 06-14-2004, 05:12 PM   #8
d_eisenga
 
Join Date: Feb 2001
Posts: 36
thanks guys.

i considerd doing the spawning that way, but i dont want the number of NPCs to be constant. i just want a maximum. but the way the level is designed it shouldnt be possible to crash the game with too many NPCs so i dont need to limit it.
d_eisenga is offline   you may: quote & reply,
Old 06-15-2004, 03:57 PM   #9
{NJO}*Dark
Rookie
 
{NJO}*Dark's Avatar
 
Join Date: Feb 2004
Location: cyberspace.co.uk
Posts: 149
you should be carefull though, more that about 10 and the game really laggs, just try to limit it and you should be fine
{NJO}*Dark is offline   you may: quote & reply,
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Go Back   LucasForums > Network > JediKnight Series > Editing Central > JA Mapping > spawn npc every X seconds?

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:33 AM.

LFNetwork, LLC ©2002-2011 - All rights reserved.
Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.