Author Topic: Killing then respawning a brick...  (Read 2261 times)

How can I kill a brick, then have it respawn? This has been driving me crazy for the past hour...I tried
Code: [Select]
%targetObject.hide(true);
%targetObject.schedule(5000, "hide", false);
but it doesn't recognize the command. :|

Code: [Select]

//We want them to choose how long it will take to respawn the brick, lets try this.
$pref::unhide::time=15000;
function serverCmdUnHide(%targetObject)
{
%targetObject.hide(false);
}

function serverCmdRespawnTime(%client,%time)
{
if(%client.isAdmin || %client.isSuperAdmin)
{
        $pref::unhide::time=%time;
  }
}

function serverCmdHide(%targetObject)
{
%targetObject.hide(1);
%targetObject.schedule($pref::unhide::time,0,serverCmdUnHide);
}

I don't have retail so I can't test the script.
« Last Edit: March 24, 2007, 09:26:30 PM by DarkKnight »

That's pretty much almost exactly what I said. And what I said doesn't work. :|

Try %obj.setCloaked(true);


What are you using to kill the brick in the first place? Since weapons don't damage outside of a minigame maybe the effect doing it is being negated.

Well, it does a radius search (InitContainerRadiusSearch) and I'm trying to make it destroy any bricks if it finds any. It finds the brick fine, but it won't destroy it...

And I'm not killing the brick yet. I was thinking of using %brick.brickkill(); but that just destroys it and it doesn't respawn. So I need a way to respawn the bricks...

Closing thread as I found a way around this.