Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Revive

Pages: [1]
1
Suggestions & Requests / Re: projectile events for bots.
« on: February 17, 2019, 01:17:14 PM »
You could just do Datablock ProjectileData when you register the event instead of building your own list.
True, but doesn't this just read the UI name of ProjectileDatas? As far as I'm aware not everyone bothers to write UI names for their projectiles.

2
Suggestions & Requests / Re: projectile events for bots.
« on: February 16, 2019, 12:56:44 PM »
holy loving god how much loving events do you have
Slayer adds quite a few onActivate(TeamX) events and such, which is why it looks like I have ton of events.
Why not have a list of projectiles instead of a string for the event? That way it's more user friendly because then they don't have to find out what the data block names for all the projectiles are manually.
This could be pretty useful, but like for your average handicap I'll probably give up midway through trying to find out the datablock names. A list would be way more convenient for just setting up this system.
Good point, I have updated the add-on so it now includes a projectile list.


Updated Version: https://cdn.discordapp.com/attachments/535827708630925313/546407708992077834/Event_BotWeakness.zip

3
Suggestions & Requests / Re: projectile events for bots.
« on: February 15, 2019, 04:23:54 PM »


This is an output event for bots which sets the bot's weaknesses against projectiles.
First field is the name of the projectile, as an example, the projectile for Gun is gunProjectile.
Second field is multiplier. 1 is normal damage, 2 is double damage, 3 is triple damage and so on..
Values between 0 and 1 means that the bot will take reduced damage, having the value negative will heal the bot instead.
Supports multiple weaknesses on same bot.

Here: Removed Link

4
Perhaps not the most optimal solution, but does this work? I have added comments where I added code.
Code: [Select]
package PipeSpawn
{
function Projectile::spawnPipeFlash(%this,%flashcount)
{
   %pos = %this.getPosition();
   //Count how many zombies
   %zmbcount = 0;
   
   if(%flashCount % 4 == 0)
   {
      %radius = 5000;
      %searchMasks = $TypeMasks::PlayerObjectType;
      InitContainerRadiusSearch(%pos, %radius, %searchMasks);
      while ((%targetid = containerSearchNext()) != 0 )
      {
         if(%targetid.getClassName() $= "AIPlayer")
         {
            if(%targetid.hType $= "Zombie")
    {
%targetid.stopHoleLoop();
%targetid.setmoveobject(%this);
%targetid.setaimobject(%this);
//Remember targeted zombie and add it to the list.
%targetzombie[%zmbcount] = %targetid;
%zmbcount++;
     }
          }
      }
   }
   
   if(%flashcount < 5)
   {
      %sound = Phone_Tone_1_Sound;
      %time = 750;
   }
   else if(%flashcount < 10)
   {
      %sound = Phone_Tone_3_Sound;
      %time = 250;
   }
   else
   {
      %this.explode();
      //Return zombies to its usual state if it survives
      for(%i = 0; %i <= %zmbcount; %i++)
      {
         if(isObject(%targetzombie[%i]))
         {
     %targetzombie[%i].startHoleLoop(1);
}
      }
      return;
   }
   
   %this.schedule(%time,spawnPipeFlash,%flashcount+1);
   serverPlay3d(%sound,%pos); //if(%flashCount % 2 == 0)
   
   %p = new Projectile()
   {
      dataBlock = sPipeBombLightProjectile;
      initialPosition = %pos;
      initialVelocity = "0 0 1";
      sourceObject = %this.sourceObject;
      client = %this.client;
      sourceSlot = 0;
      originPoint = %this.originPoint;
   };
   if(isObject(%p))
   {
      MissionCleanup.add(%p);
      %p.setScale(%this.getScale());
   }
}
};activatePackage(PipeSpawn);

6
I think I fixed it now: https://cdn.discordapp.com/attachments/535827708630925313/535955876125736981/Player_L4DSurvivor.zip

Just keep in mind those coins and gems should not be in the .txt files.
Output events like addItem doesn't work neither, but thats how it works for all playertypes.

7
I looked at my file again and realised I should be ashamed for posting such a terrible fix. I got it to kinda work now, but the problem is whenever I pick up the coin/gem I get both the points and an empty item (a white printgun with no name). If you want to take a look at the code yourself, I would recommend you to take a look at Support_L4DItems.cs in the Player_L4DSurvivor addon. Look for the function Player::pickup(%player,%item);

I'll continue to take a look at it, but I'm not sure if I'm able to get it fixed.

8
Here: https://cdn.discordapp.com/attachments/535827708630925313/535827741061283851/Player_L4DSurvivor.zip

Did some testing myself, but let me know if it doesn't work.

9
Add-Ons / Re: Bot Events - v11, redownload.
« on: February 19, 2013, 04:36:01 PM »
I believe this is a big error with Bot Events;

If "hasClaws" and "aggressive" is enabled, and you kill the attacking bot, you will still take damage from it's corpse if you are within range.

Therefore, if you spawn a bot with "hasClaws" enabled, and you kill it on it's spawn, it will create an endless loop of dying bots, lagging everyone on the server.
What I basically do is:
onBotSpawn -> bot -> setAIproperties -> HasClaws(on)
onBotSpawn -> bot -> setAIproperties -> Agressive(on)
onBotKilled -> bot -> setAIproperties -> HasClaws(off)

Pages: [1]