Forum

> > CS2D > General > Npc-Trigger
ForenübersichtCS2D-ÜbersichtGeneral-ÜbersichtEinloggen, um zu antworten

Englisch Npc-Trigger

13 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Npc-Trigger

Jaso
BANNED Off Offline

Zitieren
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?

alt Re: Npc-Trigger

DC
Admin Off Offline

Zitieren
I don't understand what you want to do.

Zitat
How i do this for more npc,s

do WHAT?

Zitat
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...

alt Re: Npc-Trigger

SANTER
User Off Offline

Zitieren
i do that with paint

start trigger A delay
A delay trigger B delay
B delay trigger A delay, NCP ncp

its a science

alt Re: Npc-Trigger

Jaso
BANNED Off Offline

Zitieren
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?

alt Re: Npc-Trigger

FASTDIE
User Off Offline

Zitieren
he want to make script or wants script
when npc will die next will be spawn at npc spawn point

alt Re: Npc-Trigger

Jaso
BANNED Off Offline

Zitieren
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?

alt Re: Npc-Trigger

K-tronic
User Off Offline

Zitieren
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.)

alt Re: Npc-Trigger

DC
Admin Off Offline

Zitieren
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.

alt Re: Npc-Trigger

Jaso
BANNED Off Offline

Zitieren
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!

alt Re: Npc-Trigger

DC
Admin Off Offline

Zitieren
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

alt geschlossen Re: Npc-Trigger

Jaso
BANNED Off Offline

Zitieren
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.
1× editiert, zuletzt 03.09.10 19:34:53

Admin/Mod Kommentar

don't edit your post to push it! it's forbidden! /DC
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antwortenGeneral-ÜbersichtCS2D-ÜbersichtForenübersicht