Latest topics
» Help with trigger_usescript
Thu Sep 22, 2016 8:16 am by flanagon

» New Lugormod U# (Windows + Linux)
Thu Sep 22, 2016 7:03 am by Ufo

» Single Round Team Quest
Thu Jul 23, 2015 10:39 pm by agent6141

» iobject terminal
Thu Sep 25, 2014 2:39 pm by flanagon

» Usefull Downloads
Thu Aug 07, 2014 12:35 am by Kimmeh

» Television
Thu Jan 09, 2014 2:25 am by Mr. Swister

» Lugormod U# on server
Wed Jan 08, 2014 11:08 pm by Shadow

» Teleporter with effects
Thu Jan 02, 2014 5:51 am by Pierry

» Some possibly useful addons
Thu Jan 02, 2014 5:50 am by Pierry

Movable NPCs

Go down

Movable NPCs

Post by Zkyo on Tue May 11, 2010 9:51 am

Finally getting to writting this Laughing

This guide is about how to create a npc that stands still and does nothing, so you can grip/push/pull it around, and move it into a trigger to get credits.

First, the spawner. Make it a standard jawa, but add a few extra keys.
/place npc_spawner 30 npc_type,jawa,count,-1,targetname,questjawa_npc, npc_target5,questjawa_credits,health,5000,npc_targetname,questjawa,spawnflags,32
As you noticed, there is a new key there, called npc_targetname. This gives the actual npc a name. I also set it to have 5,000 health. That is so that it can not be killed easily. Last, i used spawnflags,32. That makes the npc not use any behavior files, so it just stands there.

Now, find where you want to take the npc and place this. It is also good to have some kind of marker for where to take the npc. A good effect for that is misc/gen_rings
/place trigger_multiple 0 maxs,30 30 30,mins,-30 -30 -30,npc_targetname,questjawa,target,questjawa_tele
When you set the npc_targetname to the same thing as the spawner, it will make it so that only that exact npc can fire the trigger.

Next, lets get rid of the npc and spawn a new one. Noclip around and go straight up through the top of the map and take off noclip. You should land on an invisible object. That is the edge of what is built on the map. Turn on god, and place these on the ground right under you.
/place trigger_hurt 0 maxs,40 40 100,mins,-40 -40 0,dmg,999999
/place target_teleporter 30 targetname,questjawa_tele
This will cause the npc to teleport to this spot and instantly die, giving the player credits.

Last, place some credits, and a delay of 30 seconds to respawn the npc.
/place target_credits * targetname,questjawa_credits,count,50,random,20
/place target_delay * targetname,questjawa_done,target,questjawa_npc,wait,20

You can do much more than just give credits with this. You can have a group quest where you have to protect the jawa from several other enemy npcs, while trying to bring it to the trigger. If you do, it could fire a lmd_iobject to give you a keycard instead, open a door, whatever you want.

Posts : 384
Join date : 2010-03-29
Age : 25
Location : Grand Rapids, Michigan, USA

View user profile

Back to top Go down

Back to top

Permissions in this forum:
You cannot reply to topics in this forum