NPC Spawning- How to do it in maps -1 reply

Please wait...

We're currently in the process of moving servers, parts or all of the site will be unavailable for a few hours. Sorry for any inconvenience!

Insecure

:)

50 XP

6th November 2005

0 Uploads

286 Posts

0 Threads

#1 12 years ago

OK I'm not sure if this topic has been covered elsewhere, but if it has a simple link will be accepted. What must be done in order to create an NPC spawn, how do you make them spawnable by pressing a button, and how do u regulate their weapons & health & attack power?




Bluestormtrooper

>You

50 XP

13th March 2005

0 Uploads

1,752 Posts

0 Threads

#2 12 years ago

Weapons and attack power can be don ebe editing the .npc file, for health type key: health vaule: your # in the menu you have a whole list of npcs you can chose from, if you target it with a trigger that will spawn it.




Neril

Mapper

50 XP

10th May 2005

0 Uploads

83 Posts

0 Threads

#3 12 years ago

Note: You may need to change to the Single Player mapping mode for this, as the Multplayer one usually tends not to provide the NPC menu for you. (File -> Project settings... -> Mapping mode: Single Player mapping mode)

  • Create a simple room with lighting and a spawnpoint, to base this in.
  • Right-click in 2D View, go to the NPC menu and select any NPC you like.
  • Place it where you would want it to spawn.
  • Keep it selected and press the n key. Now enter the following keys/values:

Key: Value count: -1 health: 200 targetname: toBeSpawned

  • Close the window and deselect it.
  • Make a small, button-like brush that fits the bespin/button_off texture and attach it to a wall within game-reachable parameters.
  • Create another brush that fits around the button, then with it selected, right-click in 2D View and go to trigger -> trigger_multiple.
  • Texture it with system/trigger.
  • Give it the following keys/values:

Key: Value target: toBeSpawned noise: sound/movers/switches/button_09.mp3 wait: 10 angle: 180 spawnflags: 7 That's it. Compile your map, walk to the button and press it, and you should see an NPC somewhere. :D Oh, I should mention that I wrote this with GTKRadiant 1.4.0 in mind. I'm not sure how this may vary in other versions or programs. Also, be aware that some NPCs are not at all supported in Multiplayer and may crash your game, or have some other type of negative effect.