English HOW to make a lua zombie?

13 replies
Goto Page
To the start Previous 1 Next To the start
28.02.15 04:45:20 am
Up
X2660
User
Offline Off
i don't know how to make a lua zombie in zombieplague 1.15 classes , so i need help.
28.02.15 06:24:25 am
Up
Talented Doge
User
Offline Off
Code:
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
Talented Doge
28.02.15 07:20:46 am
Up
X2660
User
Offline Off
thanks, but i want MAKE a special zombie in zombieplague 1.15, when the zombie dead, it can throw around the 'cut bomb'
28.02.15 08:14:34 am
Up
Talented Doge
User
Offline Off
Quote:
'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.
edited 1×, last 28.02.15 08:52:52 am
Talented Doge
28.02.15 08:56:21 am
Up
X2660
User
Offline Off
sorry, i'm not in lua , can you help me?
28.02.15 09:17:32 am
Up
The Gajos
BANNED
Offline Off
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+
28.02.15 06:32:31 pm
Up
Fixer
User
Offline Off
May this work?
Code:
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
28.02.15 06:36:48 pm
Up
Talented Doge
User
Offline Off
@user Fixer: That required one's on Dead only, which is like Kamikaze Zombie. Anyways, spawning gut bomb on attack, don't you think it is too much overpowered?
Talented Doge
28.02.15 06:45:12 pm
Up
Fixer
User
Offline Off
@user Talented Doge: Uff, i forgot that he wanted it on death. btw yeah it would be better if it is on attack2 and not in attack1.
28.02.15 07:51:15 pm
Up
Maximator
User
Offline Off
I bet you only want to make a lua zombie because minecraft has zombies and is the best game in the world
The pen is mightier than the finger!
01.03.15 06:00:30 am
Up
X2660
User
Offline Off
yes, i only want a zombie like Kamikaze zombie, but i don't know how to make it .
01.03.15 06:26:13 am
Up
Joni And Friends
User
Offline Off
@user X2660: Just adding class zombie named Kamikaze zombie on zp_classes.lua in zombieplague 1.15, done!
Web | file File does not exist (15501) | file File does not exist (15463) | file cs2d [JAF] Adventure (19) | file File does not exist (15919)
01.03.15 06:49:42 am
Up
X2660
User
Offline Off
@Joni And Friends: but how to let it when it dead, it can throw around cut bomb?!
08.03.15 03:09:36 pm
Up
muxarus
User
Offline Off
@user X2660: check my zombielua script (zombie! mode in lua) , you can teach yourself by watching other scripts, systems, and other interesting things you can will do
IMG:http://steamsignature.com/status/german/76561198081961553.png
IMG:http://steamsignature.com/AddFriend.png
To the start Previous 1 Next To the start