Author Topic: Bot Events - v11, redownload.  (Read 21037 times)

Did you fix how it breaks onPlayerTouch which interferes with checkpoint bricks among other things?

//This isn't packaged because it's rewriting the function in a way that would break other packages to it
function FxDTSbrick::onPlayerTouch(%this, %obj) //Only editing this because with the way I made bots damage it considers them players too
{
   //Basic passing on of arguments to datablock's ::onPlayerTouch
   %this.getDatablock().onPlayerTouch(%this, %obj);

   if(%this.numEvents <= 0)
   {
      return;
   }
   $InputTarget_["Self"] = %this;
   if(%obj.getClassName() $= "Player")
   {
      %client = %obj.client;
      $InputTarget_["Client"] = %client;
      $InputTarget_["Minigame"] = %client;
      $InputTarget_["Player"] = %obj;
      %this.processInputEvent("onPlayerTouch", %client);
   }
   if(%obj.getClassName() $= "AIplayer")
   {
      $InputTarget_["Minigame"] = %obj.client.minigame; //Bot's minigame
      if(isObject(%driver = %obj.getMountedObject(0)))
      {
         $InputTarget_["Driver"] = %driver;
         if(isObject(%client = %driver.getControllingClient()))
         {
            $InputTarget_["Client"] = %client;
            $InputTarget_["Minigame"] = %client.minigame;
         }
      }
      $InputTarget_["Bot"] = %obj;
      %this.processInputEvent("onBotTouch", %this.getGroup().client);
   }
}


stuff.
hmm. I'ma try think of a way to make this work better.

Why don't you just do it kind of like this?
Code: [Select]
package stuff
{
function fxDtsBrick::onPlayerTouch(%this,%player)
{
parent::onPlayerTouch(%this,%player);

if(%player.getClassName() !$= "Player")
return;

%client = %player.client;

%mini = getMinigameFromObject(%client);
if(!isSlayerMinigame(%mini))
return;

%team = %client.getTeam();
if(!isObject(%team))
return;

$InputTarget_["Self"] = %this;
$InputTarget_["Player"] = %player;
$InputTarget_["Client"] = %client;
$InputTarget_["MiniGame"] = %mini;
%this.processInputEvent("onPlayerTouch(Team" @ %team.getGroupID() + 1 @ ")",%client);
}
};
activatePackage(stuff);



Also, you need to fix the bug where this causes all vehicles to respawn instantly. Trust me, it's this mod, not Blockland.

Why don't you just do it kind of like this?
Code: [Select]
package stuff
{
function fxDtsBrick::onPlayerTouch(%this,%player)
{
parent::onPlayerTouch(%this,%player);

if(%player.getClassName() !$= "Player")
return;

%client = %player.client;

%mini = getMinigameFromObject(%client);
if(!isSlayerMinigame(%mini))
return;

%team = %client.getTeam();
if(!isObject(%team))
return;

$InputTarget_["Self"] = %this;
$InputTarget_["Player"] = %player;
$InputTarget_["Client"] = %client;
$InputTarget_["MiniGame"] = %mini;
%this.processInputEvent("onPlayerTouch(Team" @ %team.getGroupID() + 1 @ ")",%client);
}
};
activatePackage(stuff);



Also, you need to fix the bug where this causes all vehicles to respawn instantly. Trust me, it's this mod, not Blockland.

This was about what I was thinking.
I'm going to sleep so tomorrow I have a plan

Fix player touch
Fix vehicle respawn

while you're at it make a new bot events mod


New?
Foreign to you?

The mod requires extensive work to become good that isn't even worth reviving it, and needs a complete remake.

Yay! Its fixed! Thank you! I needed this mod!!!!
Wait a minute,still has the same respawn giltch,could you fix it?
The giltch is that when the bot gets killed he instantly respawns,which is mostly annoying when you have a zombie map.
« Last Edit: December 04, 2012, 07:34:12 AM by Gamey »

The mod requires extensive work to become good that isn't even worth reviving it, and needs a complete remake.

True, that would be nice. Also more rtb prefs please.

Yay! Its fixed! Thank you! I needed this mod!!!!
Wait a minute,still has the same respawn giltch,could you fix it?
The giltch is that when the bot gets killed he instantly respawns,which is mostly annoying when you have a zombie map.

OnBotKilled>Self>SetVehicle>None

Though this would be a nice rtb pref.

Foreign to you?

The mod requires extensive work to become good that isn't even worth reviving it, and needs a complete remake.
I think you're overreacting. It has a lot of bugs, but I still think it's probably the best event mod out there next to VCE. It opens up a huge realm of new possibilities. Obviously it's abusive, but there are a lot of things that are abusive that nobody complains about. VCE is extremely abusive, so are events in general depending on what you do with them. Heck, you could say bricks and chat are abusive because people can spam so much with them.

If Brian continues to fix bugs like this, bot events could end up being a lot better than it used to be.



I think you're overreacting. It has a lot of bugs, but I still think it's probably the best event mod out there next to VCE. It opens up a huge realm of new possibilities. Obviously it's abusive, but there are a lot of things that are abusive that nobody complains about. VCE is extremely abusive, so are events in general depending on what you do with them. Heck, you could say bricks and chat are abusive because people can spam so much with them.

If Brian continues to fix bugs like this, bot events could end up being a lot better than it used to be.

It isn't only the bugs that need fixing, the way it works is just bad, you get a very limited set of 'behaviors', no real control over them, and any other action you want the bot doing is activated only through touching a brick or detecting a player.

It needs a more flexible way of creating custom behaviors.
« Last Edit: December 04, 2012, 03:39:28 PM by Conservative »

the OP Dont quote

#chainban

Whoops

Anyways, this is really useful. I could make a story save with these.

Does the team and stuff for the bots work for slayer
.
Cause I liek slayer.