Author Topic: Weapon Spawn idea?  (Read 698 times)

0 Members and 1 Guest are viewing this topic.

Offline F4||3N

  • Soldier
  • **
  • Posts: 245
Weapon Spawn idea?
« on: August 11, 2009, 09:29:57 am »
I remember there was a thread not long ago; talking about weapon spawns!
I just had an idea!

Gametype: Teamdeath Match

Alpha: Players
Bravo: Players
Charlie:Players
Delta: Dummy bots

Script: The dummy bots hold a certain weapon (random, or specific if possible)
The dummy bot can't move, and it's coded so if it receives 1HP or more, it selfkills.
Therefore leaving you with the choice of picking up that weapon.
Killing one doesn't give you a point, that way you can't steal kills.
If you can make it so they can spawn every 1 minute or so.

So you wouldn't spawn with a weapon at the start, you have to punch a dummy bot to get one.
The script would be pointless without a limited ammo script or an instant weapon disappear script when a player dies.

The dummy bots would be like Weapon Pods or something.
Or you could make them spawn in the sky, with plenty of spawn points, which means rushing the map to find where the 'pod' landed.

You might even be able to do it in a realistic ctf game (that way you can kill your own team color)
But all the bots would spawn where you spawned.
But if an admin could randomly place bots in game that would be alright.

P.s! Just a random idea, it's probably not possibly, and I dunno how good it would be if it were!
Plus I like putting out my random ideas, even if they're not very good; just in case the idea inspires another idea for someone else!

Offline ~Niko~

  • Rainbow Warrior
  • *****
  • Posts: 2410
Re: Weapon Spawn idea?
« Reply #1 on: August 11, 2009, 10:29:49 am »
Code: (pascal) [Select]
procedure OnPlayerRespawn(ID: byte);
begin
if (GetPlayerStat(ID, 'Human') = False) and (GetPlayerStat(ID, 'Name') = 'Dummy') then DoDamage(ID, 1000);
END;

Screw it, that's good enough.

The main problem with leaving them 1 HP, is that sometimes they spawn over medkits, so they heal completely
« Last Edit: August 11, 2009, 11:32:26 am by ~Niko~ »

Offline rayanaga

  • Soldier
  • **
  • Posts: 143
  • ~Fur flying~
    • Kryonex
Re: Weapon Spawn idea?
« Reply #2 on: August 11, 2009, 05:41:05 pm »
maybe shove a for loop in apponidle to make sure they stay at 1hp or close to it.

Lol, wonder if something like this would work.
Code: (pascal) [Select]
procedure AppOnIdle(Ticks: integer);
var i: integer;
begin
for i:=1 to 31 do
if getplayerstat(i,'active') then if not getplayerstat(i,'human') then if (idtoname(i) = 'Dummy') and (getplayerstat(i,'alive')) and (getplayerstat(i,'health') > 10) then begin
DoDamage(i,-1000);
DoDamage(i,148);
end;
end;
[kY] Kryonex - Your local zombie fanatics.
http://www.kryonex.com/

Offline ~Niko~

  • Rainbow Warrior
  • *****
  • Posts: 2410
Re: Weapon Spawn idea?
« Reply #3 on: August 11, 2009, 07:59:28 pm »
screw it, this works, and it's simpler.

Code: (pascal) [Select]
procedure AppOnIdle(Ticks: integer);
var i: Byte;
begin
for i := 1 to 32 do begin
if (GetPlayerStat(i, 'Human') = False) and (GetPlayerStat(i, 'Name') = 'Dummy') and (GetPlayerStat(i, 'Health') > 1) then DoDamage(i, (GetPlayerStat(i, 'Health') - 1));
end;
END;

The point of my script is that it will set the health to 1 each second, so even if they take a med, they'll be set his life to 1 anyways. Also it's no matter if it's realistic/nonrealistic, because the dodamage() amount of health removed isn't fixed, it depends on the health of the bot.
« Last Edit: August 11, 2009, 08:02:45 pm by ~Niko~ »