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 - Spartan224

Pages: [1] 2 3 4 5 6 ... 54
1
You can still use your Blockland Key after transferring it to Steam. So you'll basically have a Steam version and a Non-Steam version of Blockland.

2
Okay, I solved the problem now by just adding in the radius search in Bot_Zombie and everything works as intended.

Locking the thread, thanks for the help everyone.
Code: [Select]
function ZombieHoleBot::onBotLoop(%this,%obj)
{
//BreakBrickTest(%obj);
//schedule(%obj.getDatablock().hTickRate/2,0,BreakBrickTest,%obj);

  %radius = 10000;
      %searchMasks = $TypeMasks::ProjectileObjectType;
      InitContainerRadiusSearch(%pos, %radius, %searchMasks);
      while ((%targetid = containerSearchNext()) != 0 )
     {
  if(%targetid.dataBlock.getID() == sPipeBombProjectile.getID())
   {
%obj.setmoveobject(%targetid);
%obj.setaimobject(%targetid);
%obj.emote("alarmProjectile");
   }
     }
}

3
General Discussion / Re: what was your first server on blockland?
« on: February 05, 2019, 09:41:06 PM »
I think it was just Left 4 Block with Gamemode_Zombie.

4
Alright, thanks for providing the help. I'll do what I can to add in the code.

5
I did lag a bit, and my solution doesn't work with minigames anyways.

6
Sorry for the double post, but I managed to get it working, sort of. I used a different function, like what Conan suggested to search for bots after the explosion to re-enable them

Here's the code I added in, which only works out of minigames for some reason?
Code: [Select]
function sPipeBombProjectile::OnExplode(%this, %obj, %col, %amt, %fade)
{
Parent::OnExplode(%this, %obj, %col, %amt, %fade);
  %radius = 5000;
      %searchMasks = $TypeMasks::PlayerObjectType;
      InitContainerRadiusSearch(%pos, %radius, %searchMasks);
      while ((%targetid = containerSearchNext()) != 0 )
      {
         if(%targetid.getClassName() $= "AIPlayer")
         {
            if(%targetid.hType $= "Zombie")
    {
%targetid.startHoleLoop();
     }
          }
      }
}

7
Add-Ons / Re: Wainscoting Bricks
« on: February 05, 2019, 02:28:51 PM »
Neat, thanks.

8
Hmmm, yeah I could try that.

9
pipe bomb loop: keep searching for bots nearby and run %bot.stopHoleLoop(); on them, then make them look at pipe bomb location and walk in that direction

once pipe bomb explodes: search for nearby bots (in a slightly larger radius) and run %bot.startholeloop() on them.
Revive provided the top part which helped me understand how that works, but the main issue now is that the bots won't resume their loop once the pipe bomb's gone.
Code: [Select]
      %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);
Would I have to make another       InitContainerRadiusSearch       for it to find the bots that were disabled?

10
Sure, let me try it out now.  I might also use that code for a bile bomb if it works correctly.

EDIT: So the bots that end up surviving the blast or just weren't nearby still target the pipe bomb's original position even though it already exploded. Even if I try shooting the bots, they wouldn't care and still want to move to the location of the pipe bomb's location. I'll add a video to show this issue.

https://www.youtube.com/watch?v=eM_UGyboLAM&feature=youtu.be

11
You should keep it like that only have them look at the pipe bomb just to add exaggeration
I want to get the pipe bomb working similarly like it does in the original Gamemode_Zombie where they go to it and stay distracted until it explodes though, I thought of using that idea for a flashbang weapon.

12
I tried using the stopHoleloop(); line when the pipe bomb spawns in, but that made the bots stop whatever they're doing for 1 second then head to the bomb. Which is weird and I'm wondering if it's possible to fix that, I'll record a video to show the problem.

Code: [Select]
      %radius = 5000;
      %searchMasks = $TypeMasks::PlayerObjectType;
      InitContainerRadiusSearch(%pos, %radius, %searchMasks);
      while ((%targetid = containerSearchNext()) != 0 )
      {
         if(%targetid.getClassName() $= "AIPlayer")
         {
          if(%targetid.hType $= "Zombie")
          {
         %targetid.setMoveObject(%this);
         %targetid.setAimObject(%this);
%targetid.stopHoleLoop(0);

Still working on figuring out how to reactivate them with what you suggested.

13
I thought of that as well, but I'm not sure how to get the zombie bots around the pipe bomb's radius disabled, then re-enabling them if they survive after the detonation, I think that the SetBotPowered event has that though, so I could use that.

14
I want to make the default zombie bots distracted and only focus on the pipe bomb. In the video, you'll see that the bots run to it first, then they leave it alone and go ahead and attack the player instead, then repeat. I just want them to focus on the pipe bomb instead of doing that. Then they can return to their normal roots after the pipe bomb explodes, of course. I tried looking at Bot_Dogs but I had no luck looking for something to use in that code, and I'm not sure how to do it myself.

I also ripped the weapon out of Gamemode_Zombie, but still functions the same.

Video of the Pipe Bomb

Here's the code for the function to make the bots follow the weapon.
Code: [Select]
package PipeSpawn
{
function Projectile::spawnPipeFlash(%this,%flashcount)
{
   %pos = %this.getPosition();
   
   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.setMoveObject(%this);
         %targetid.setAimObject(%this);
        }
         }
      }
   }
   
   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;
   }
   
   %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);

15
Add-Ons / Re: [Brick] Microheads
« on: January 30, 2019, 08:41:42 PM »
That's awesome

Pages: [1] 2 3 4 5 6 ... 54