Author Topic: Zombie Mod  (Read 2016 times)

0 Members and 1 Guest are viewing this topic.

Offline cynicle

  • Major(1)
  • Posts: 37
Zombie Mod
« on: May 30, 2007, 11:31:45 pm »
Hey, just need some help, im planning a zombie mod and basically I want the zombies to punch the players to death (1 hit kill) however I dont want players to be able to punch zobies with the same power (therefor cant really change punch in weapons.ini) so I came up with the idea that when a zombie punches a player it would call on a script which would kill the player. However the only two way I could think off to get this too work was to use the Command(/kill ID) or DoDamage command but they return 'Killed by Admin' and 'You killed yourself' respectivly. I want it to say Killed by Zombie. Is this possible? Or is there a better method?
Join the Army. Visit strange and exotic places. Meet fascinating people. And kill them.

Aus Soldat League 203.208.70.216:23073

Offline EnEsCe

  • Retired Soldat Developer
  • Flamebow Warrior
  • ******
  • Posts: 3101
  • http://enesce.com/
    • [eC] Official Website
Re: Zombie Mod
« Reply #1 on: May 30, 2007, 11:42:12 pm »
Use the OnPlayerDamage event, if its a zombie then do result := 999999;

Offline cynicle

  • Major(1)
  • Posts: 37
Re: Zombie Mod
« Reply #2 on: May 31, 2007, 12:45:53 am »
Thanks

Now my second question, I want to force the Zombies to punch and to not pick up guns, is this possible? Or should I just give them a knife/chainsaw.

Date Posted: May 31, 2007, 01:12:24 AM
Is it possible to change running speed? So the Zombie run faster?
Join the Army. Visit strange and exotic places. Meet fascinating people. And kill them.

Aus Soldat League 203.208.70.216:23073


Offline cynicle

  • Major(1)
  • Posts: 37
Re: Zombie Mod
« Reply #4 on: May 31, 2007, 01:14:16 am »
Ok cheers. Ill just give them chainsaws.

How do you do health regen? Negative do damage values?
Join the Army. Visit strange and exotic places. Meet fascinating people. And kill them.

Aus Soldat League 203.208.70.216:23073

Offline EnEsCe

  • Retired Soldat Developer
  • Flamebow Warrior
  • ******
  • Posts: 3101
  • http://enesce.com/
    • [eC] Official Website
Re: Zombie Mod
« Reply #5 on: May 31, 2007, 02:21:47 am »
Yep negative health values. And can use DoDamage with negative values.

Offline Clawbug

  • Veteran
  • *****
  • Posts: 1393
  • 1184!
Re: Zombie Mod
« Reply #6 on: May 31, 2007, 02:06:33 pm »
HMm, didn't avarax write something which gives players a speed boost? It should work for bots aswell, I think.
Fight! Win! Prevail!

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Zombie Mod
« Reply #7 on: May 31, 2007, 03:33:08 pm »
It is possible to force fist I thought...
on weapon change do a forceweapon (unless its called b4 it happens b4, where as then you'd need to set a boolean to false, and the non apponidle, set it to true and then do this) procedure with the weapon number of whatever the GetPlayerStat results with 'Primary' for fist. I don't know this number off the top of my head, but a simple test could figure it out for ya.

HMm, didn't avarax write something which gives players a speed boost? It should work for bots aswell, I think.
It isn't going to work in future versions 2.6.1+ because the MovePlayer procedure is being removed
« Last Edit: May 31, 2007, 03:34:55 pm by DorkeyDear »

Offline EnEsCe

  • Retired Soldat Developer
  • Flamebow Warrior
  • ******
  • Posts: 3101
  • http://enesce.com/
    • [eC] Official Website
Re: Zombie Mod
« Reply #8 on: May 31, 2007, 05:15:19 pm »
MovePlayer didnt work on bots, and you can make a WM to do speed boosts

Offline cynicle

  • Major(1)
  • Posts: 37
Re: Zombie Mod
« Reply #9 on: June 02, 2007, 01:46:24 am »
WM?
Join the Army. Visit strange and exotic places. Meet fascinating people. And kill them.

Aus Soldat League 203.208.70.216:23073

Offline -Skykanden-

  • Flamebow Warrior
  • *****
  • Posts: 3065
  • Hallowed be my name
Re: Zombie Mod
« Reply #10 on: June 02, 2007, 01:48:30 am »
Weapon Modified

the .ini changed an adapted to something

Offline Toumaz

  • Veteran
  • *****
  • Posts: 1904
Re: Zombie Mod
« Reply #11 on: June 02, 2007, 01:50:22 am »
Weapon Mod.

If you wonder how it's done practically, allow me to quote myself:

You add a negative speed to the weapon. For further reference I'd say check out Avarax' hoverrace weapon mod.

Offline cynicle

  • Major(1)
  • Posts: 37
Re: Zombie Mod
« Reply #12 on: June 02, 2007, 07:05:45 am »
Ok I'm writing a script which only allows people named Zombie into team charlie and if there name is Zombie will automatically move them into team charlie (great for when you want to addbots ingame with /addbot Zombie command).

Code: [Select]
procedure zt_OnJoinTeam(ID, Team: byte);
var
Nickname: String;

begin
Nickname := IDToName(ID);
 if (Nickname <> 'Zombie') And (Team <> 1) then
   begin
   Command('/SETTEAM1 ' + inttostr(ID));
   SayToPlayer(ID, Nickname + ', Only Zombie allowed on team Charlie!');
   end;
   begin
   if (Nickname = 'Zombie') And (Team <> 3) then
   begin
   Command('/SETTEAM3 ' + inttostr(ID));
   end;
end;
end;
//If player tries to join team Charlie move to team Alpha.
//If zombie joins instantly move him to team 3.

However when bots are added to the TDM they do not 'Join' a team so the function is not called and they stay in team 0 (none, FFA). I want this code to be run when bots are added, any ideas?

Date Posted: June 02, 2007, 03:25:13 AM
anyone...
Join the Army. Visit strange and exotic places. Meet fascinating people. And kill them.

Aus Soldat League 203.208.70.216:23073