How i do this for more npc,s because when i put it and there are 2 npc,s it works for both and that is what i dont want i want that its only for one npcs so every npcs has gotten his own script.
So not all the npc do the same trigger.
Is this possible DC or anyone? DC Admin Offline
I don't understand what you want to do.
Quote
How i do this for more npc,s
do WHAT?
Quote
because when i put it and there are 2 npc,s it works for both and that is what i dont want
when you put WHAT?
and what script are you talking about?
if you are talking about triggering env_npc entities: give every entitiy a different name. this way you can trigger the one you want to trigger without triggering the other ones... he want do this
omg i was trying to know how to do it too...
and...env_p0rN?WTF i do that with paint
start trigger A delay
A delay trigger B delay
B delay trigger A delay, NCP ncp
its a science No all wrong ok i try to explain again.
I have gotten a script which does the following thing when you kill a npc it does a trigger but now the problem appears when you put MORE npc,s then it doesnt matter which one you kill because they all do the same trigger.
Understand now?
Sorry for my bad english its not so well....
So can anyone find a solution for this? he want to make script or wants script
when npc will die next will be spawn at npc spawn point No -.- i want if a npc dies that he does a TRIGGER!
but if i put 2 NPC,S and i kill them them BOTCH THEY DO THE SAME TRIGGER AND I JUST WANT THAT ONE NPC HAS HIS OWN TRIGGER GOT IT? As far as I understood, your problem is, that the names of all npcs you use are the same. so give every npc it's own name and make triggers to every single.
(I hope that was right now - that's what I understood.) As far as I know NPCs can't activate a trigger, LUA or not... DC Admin Offline
okay.. so.. simply check attributes of the NPC to distinguish?!
see sys/lua/info.txt and take a look at the object command.
the NPC type (zombie, headcrab or snark) is saved in the object(id,"player") value.
moreover you could check the position or whatever you want. it's kinda obvious...
if you want to check which entity spawned your NPC: this is much harder. you would have to keep track of this yourself with additional variables etc. K-tronic,
You are right but the problem is i dont know how to do this so i need a kind of script i have already one for npc,s but this one just works for all npc,s please take a look at this script:
addhook("objectkill","_objectkill")
function _objectkill(id,pl)--Object ID, player id
if object(id,"type") == 30 then --If npc
parse("trigger test")
end
end
Maybe if some one could edit this script so it works for only one npc and not for every npc
pickachu,
npcs (CAN) activate a trigger try this script and you see that it works! DC Admin Offline
only for one NPC. okay - but for WHICH one?
only the first one so it triggers only once? use a trigger_once or a Lua variable + condition My objective is to create a kind of round system so how higher the round the more zombies there are so if you have killed all zombies a new round start.
If you still dont know what i mean go to youtube and type in nazi zombies to get the idea
I hope you got enough information about this and i hope somebady could make this because i am very bad at lua. edited 1×, last 03.09.10 07:34:53 pm
Admin/mod comment
don't edit your post to push it! it's forbidden! /DC