Jump to content

Home

Npc spawned by button...


Dslayer

Recommended Posts

Posted

ok before anyone thinks omg another one....just so you know im new to mapping and im trying to build an arena that allows npcs to be spawned by the press of a button. this is what i have setup in gtk radient.

 

untitled.th.jpg

 

and heres the details on what they should be doing.

 

untitled.th.jpg

untitled.th.jpg

 

in game itll only spawn once and never again.can someone please help me?

Posted

The pictures aren't very big, so it's difficult to see... But anyway you shoult have a trigger_multiple:

 

key: classname

value: trigger_multiple

 

key: target

value: t1

 

key: wait

value: 3

 

(You also better have the use_button checkbox checked)

Then you need a NPC_spawner:

 

Key: classname

Value: NPC_spawner

 

Key: NPC_type

Value: Kyle (f. eg.)

 

Key: count

Value: -1

 

Then place the NPC_spawner where you want the NPC to be spawned, and then you must place the trigger_multiple where you want the button to be... that's it.

Posted

thanks it worked!

ok another question.

 

how do i give it more health

and how do i make it die after a certain amount of time has past and how do i keep it confined to an area?

Posted

i don't know about giving it more health, but, i think to confine t to an area this should work (i havn't tried it) make a brush covering where ever you dont want the NPC to go, and then cover it in texture/system/block NPC

Posted

Then any NPC that spawns will not move. This will probably increase fps a lot if you put it throughout the whole map. Just put it in the places where the NPCs shouldn't go to, such as doorways and such. And by the way, block npc only works in SP.

Posted

DoH! ok then so its either kill or be killed when it comes to npcs.can they use teleporters? so that if u need to escape u just run through the teleporter and be safe?another thing is how do i set a count down so that they dont live forever and cause lag?

Posted

i am sure there is a command which the npc will trigger when spawns (like key: npc_spawn possable, its only a guess. look in npc_spawner for the right key) and then link that to a target_delay, put in a delay for how ever long and then link it to a target_kill. that should kill the npc after the delay has run out

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...