Author Topic: Laser Pointer that works with bots  (Read 1500 times)

I need a version of the laser pointer that works with bots. The current one only calls onActivate on bricks. It should be pretty easy. I looked at the code but don't know how bots differ from bricks. Blockland isn't well documented.

by works with bots, do you mean activates them instead of burning them?

by works with bots, do you mean activates them instead of burning them?
yes, I already figured out how to remove the damage
(hint: there's a number labelled damage somewhere in there, set it to 0, boom, you're a skilled scripter now)

looking through it and found
Code: [Select]
if(%colType & $TypeMasks::fxBrickObjectType && getSimTime() - %col.lastLaserActivateTime > 200)
   {
     %col.lastLaserActivateTime = getSimTime();
     $InputTarget_["Self"]   = %col;
     $InputTarget_["Player"] = %obj;
     $InputTarget_["Client"] = %obj.client;
     if($Server::LAN)
     {
        $InputTarget_["MiniGame"] = getMiniGameFromObject(%obj.client);
     }
     else
     {
        $InputTarget_["MiniGame"] = getMiniGameFromObject(%col);
     }
     %col.processInputEvent("onActivate", %obj.client);
   }

probably want something similar, but checking if it's a bot instead of a brick, then finding the different needed values to send to the bots brick

I believe that was where I left off.
Maybe I should've put this in Mod. Discussion, I can probably do at least some of this myself

how do you 'activate' a bot? what do you want the pointer to do to the bot?

how do you 'activate' a bot? what do you want the pointer to do to the bot?
bot spawn brick:
onBotActivated

bot spawn brick:
onBotActivated

ezaktleh
anyone know how that'd work?

something like AiPlayer.hole.onBotActivate()

ezaktleh
anyone know how that'd work?
probably package player::onactivatestuff or something like that and do a raycast check to see if the player is looking at a bot, then calling the event on the bot spawn brick.

probably package player::onactivatestuff or something like that and do a raycast check to see if the player is looking at a bot, then calling the event on the bot spawn brick.
it's on projectile hit, actually, at least the original laser pointer activate is