Forum

> > CS2D > Scripts > Spawn Selected Zombie
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Spawn Selected Zombie

5 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Spawn Selected Zombie

samucaj
User Off Offline

Zitieren
Guys, I had an idea. I thought that a server you could choose the type of zombie that wanted. But it is not
choice according to ability (Tall, strong, fast) none of this is choosing the type of zombie. IMAGE zombie. For example, create more than one NPC. Ready! The question is this,
how do I make more NPC? I really wanted to create more than one zombie, and thank you!

1
2
3
4
1 - Start Game
2 - Select IMAGE zombie
3 - The zombie Is normal, but Image is different.
4 - Play, and have fun!

Sorry bad English, I'm not for here.

alt Re: Spawn Selected Zombie

Apache uwu
User Off Offline

Zitieren
You can only place the image over the zombie, not replace.

I believe zombies are stored in objects(0,"table") with type '1'.

1
2
3
4
5
for _,npc in ipairs(object(0,"table")) do
	if object(npc,"type")=="1" then
		--place an image over object(npc,"x"),object(npc,"y")
	end
end

Then when the zombie dies remove the image.

alt Re: Spawn Selected Zombie

Bowlinghead
User Off Offline

Zitieren
1
2
3
4
5
6
7
8
9
10
11
12
13
-- Untestet, of curse
addhook("spawn","spawnlol")
function spawnlol(id)
	for _,npc in ipairs(object(0,"table")) do
   	  if object(npc,"type")=="1" then
       	   id=image("PATH!!!",1,1,200+id)
     	end
	end
end
addhook("die","dielol")
function dielol(v,k,w,x,y)
	freeimage(v)
end
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht