Forum

> > CS2D > Scripts > HOW to make a lua zombie?
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch HOW to make a lua zombie?

13 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Re: HOW to make a lua zombie?

Talented Doge
User Off Offline

Zitieren
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--------------------------------------------------
-- Spawn Equip by Unreal Software               --
-- 22.02.2011 - www.UnrealSoftware.de           --
-- Equip players with certain items on spawn    --
--------------------------------------------------

if sample==nil then sample={} end
sample.spawnequip={}

-- Equip the following items (74 = Wrench)
sample.spawnequip.itemlist="74";

--------------------------------------
-- SPAWN                            --
--------------------------------------
addhook("spawn","sample.spawnequip.spawn")
function sample.spawnequip.spawn()
	return sample.spawnequip.itemlist;
end

The simplest Zombie survival script like this, copy this to notepad and save as a *.lua file and put it into autorun folder.

Better one with utsfx and resetscore scripts

alt Re: HOW to make a lua zombie?

Talented Doge
User Off Offline

Zitieren
Zitat
'cut bomb'


You means "Gut" Bomb right, you can use spawnprojectile to do this.

Uh, how to do this? Refer to the projectiles.lua file inside samples folder.

You should addhook to die too.
1× editiert, zuletzt 28.02.15 08:52:52

alt Re: HOW to make a lua zombie?

The Gajos
BANNED Off Offline

Zitieren
Why you want to create a script if you don't know Lua. Please learn this language before scripting
As you can see you can't understand the above really simple code in Lua so how you want to write really big script like zombie plague.
lmgtfy.com/?q=CS2D+Lua+

alt Re: HOW to make a lua zombie?

Coolhand
User Off Offline

Zitieren
May this work?
1
2
3
4
5
6
7
8
9
10
11
12
addhook("attack", "onAttack1")
function onAttack1(id)
	local wpn = player(id, "weapontype");
	
	if wpn == 78 then
		local rot = player(id, "rot");
		local i;
		for i = 1, 1 do
			parse("spawnprojectile " .. id .. " 86 " .. player(id, "x") .. " " .. player(id, "y") .. " 255 " .. (rot + math.random(-1, 1)));
		end
	end
end
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht