Author Topic: DoPlayerTeleport, but with bots.  (Read 418 times)

I've tried gothboy's doTeleport but I can't seem to find a solution that works with bots.

For reference, here's doPlayerTeleport

Code: (Event_doBotTeleport.cs line 1) [Select]
function fxDTSBrick::doBotTeleport(%obj,%target,%dir,%velocityop,%rel,%bot)
Code: (Event_doBotTeleport.cs line 18 to 20) [Select]
    if(isobject(%obj.hBot))
    {
        %bot = %obj.hBot;
At a glance it looks like this event only works if it is triggered from a bot's spawn brick.
The %bot from line 1 is overwritten on line 20, before it can be used to teleport anything.
So even if the %bot on line 1 is indeed a bot, the event ignores that and uses the bot associated with the triggering brick.