Author Topic: Bot health  (Read 2536 times)

0 Members and 1 Guest are viewing this topic.

Offline Barda4

  • Major(1)
  • Posts: 5
  • Go banana Go banana its ur birthday!
Bot health
« on: May 17, 2007, 07:14:38 pm »
I was wondering if there is anyway to modify bot's health. I'm trying to make it like Counter-Strike for anyone who knows i want to make their health super high and make super mod weapons

Offline Keron Cyst

  • Global Moderator
  • Rainbow Warrior
  • *****
  • Posts: 2872
  • will waypoint for food
Re: Bot health
« Reply #1 on: May 17, 2007, 08:32:44 pm »
You can't. The closest you could get to this is by weakening the weapons; that's it.

Offline ghg

  • Camper
  • ***
  • Posts: 411
  • Village Idiot
Re: Bot health
« Reply #2 on: May 18, 2007, 11:22:11 am »
Oh rly? Just create a script in the dedicated server to damage the bot when it joins (I assume your using it).

Eg.
In NetworkCore.pas change:
Quote
procedure OnJoinGame(ID, Team: byte);
begin
end;
to:
Quote
procedure OnJoinGame(ID, Team: byte);
begin
 if(IDToName(ID)='Botname') then begin
  DoDamage(ID,-100);
 end;
end;

That should take about half the bots health away.
-=Gradius wuz you=-

Offline Tosty

  • Soldier
  • **
  • Posts: 172
  • Ultimate TW Medic
    • Just Click it
Re: Bot health
« Reply #3 on: August 05, 2007, 11:01:22 pm »
this script does not work?!?!



Offline Xxypher

  • Veteran
  • *****
  • Posts: 1319
  • Soldat Veteran.
Re: Bot health
« Reply #4 on: August 18, 2007, 02:02:40 pm »
You need to be using ARRSE or some other hosting dedicated system to use it, you can't just stick it in the bot folder, sorry.

Offline Tosty

  • Soldier
  • **
  • Posts: 172
  • Ultimate TW Medic
    • Just Click it
Re: Bot health
« Reply #5 on: August 18, 2007, 02:09:17 pm »
-_-

I know that

I even make my own scripts



Offline Zetro

  • Major(1)
  • Posts: 6
Re: Bot health
« Reply #6 on: August 21, 2007, 11:15:56 am »
is it possible to do so your own health is lower?(i think no but i was needed to ask)

Offline Tosty

  • Soldier
  • **
  • Posts: 172
  • Ultimate TW Medic
    • Just Click it
Re: Bot health
« Reply #7 on: August 21, 2007, 05:50:53 pm »
Yes it is just put this in a script

Code: [Select]
procedure OnJoinTeam(ID, Team: byte);
begin
DoDamage(ID,75);
end;

This will hurt your hp to half and  if you set the 75 to 150 it will kill you



Offline Toumaz

  • Veteran
  • *****
  • Posts: 1906
Re: Bot health
« Reply #8 on: August 22, 2007, 12:03:45 am »
Yes it is just put this in a script

Code: [Select]
procedure OnJoinTeam(ID, Team: byte);
begin
DoDamage(ID,75);
end;

This will hurt your hp to half and  if you set the 75 to 150 it will kill you

... but only upon joining a team. You'd preferably want to do something like this:

Code: [Select]
var
spawned: array[1..32] of boolean;

procedure AppOnIdle(Ticks: integer);
var
i: byte;
begin
for i:=1 to 32 do
if (GetPlayerStat(i,'active')=true)and(spawned[i]=true) then begin
DoDamage(i,75);
spawned[i]:=false;
end;
end;

procedure OnPlayerRespawn(ID: byte);
begin
spawned[ID]:=true;
end;

Could be easily modified into making bots having more health.