Blockland Forums > Modification Help

Objects that emit a player detecting radius

Pages: << < (4/4)

Placid:


--- Quote from: Obibital on June 11, 2011, 05:35:12 PM ---Whenever this runs, the game tells me that It cannot find what setTransform, setScale, and whatnot are.

--- End quote ---
If you look closer in the error, does it not tell you that it can't find object '%trigger' or can't find object ''?
If so, that means it's not creating the trigger properly. However, I have no clue why because I have no clue about triggers and I'm sorry about that. :(

Obibital:


--- Quote from: Placid on June 11, 2011, 06:04:43 PM ---If you look closer in the error, does it not tell you that it can't find object '%trigger' or can't find object ''?
If so, that means it's not creating the trigger properly. However, I have no clue why because I have no clue about triggers and I'm sorry about that. :(

--- End quote ---

I assume you mean these error?

Errors


--- Code: ---Add-ons/Gamemode_Fallout/Radiation.cs (48): Register object failed for object radZone of class Trigger.

Add-ons/Gamemode_Fallout/Radiation.cs (49): Unable to find object: '0' attemting to call function 'setTransform'

Add-ons/Gamemode_Fallout/Radiation.cs (50): Unable to find object: '0' attemting to call function 'setScale'

--- End code ---

Snippet of Code One last time


--- Code: ---package radZone
{
function createRadZone(%brick)
{
if(!isobject(%brick)) return;
%trigger = new trigger("radZone")
{
datablock = brickFalloutRadArea;
owner = %brick.client;
};
%trigger.setTransform(%brick.getTransform());
%trigger.setScale("15 15 15");
}

function fxDtsBrick::onPlant(%brick)
{
Parent::onPlant(%brick);
//echo("Radzone brick planted!");
//echo(%this @ "Was planted!");
createRadZone(%brick);
}

function radZone::OnEnterTrigger(%this, %trigger, %obj)
{
echo("HOLY stuff YOUR IN A RAD ZONEEEEEEEEEEEEEEEEEEEEEEEEEEE");
echo( %client.Name @ " is in deep stuff.");
}
};
activatePackage(radZone);

--- End code ---

Still looking into it. Now I just have to get this damn thing to work.

Placid:


--- Quote from: Obibital on June 11, 2011, 08:06:51 PM ---I assume you mean these error?

Errors


--- Code: ---Add-ons/Gamemode_Fallout/Radiation.cs (48): Register object failed for object radZone of class Trigger.

Add-ons/Gamemode_Fallout/Radiation.cs (49): Unable to find object: '0' attemting to call function 'setTransform'

Add-ons/Gamemode_Fallout/Radiation.cs (50): Unable to find object: '0' attemting to call function 'setScale'

--- End code ---

--- End quote ---
Yes, those are the exact errors I was looking for. I don't know how to use triggers, at all, but I do know that your trigger is not being created. Are you using any mods for references to this? Do you know that you are declaring the trigger correctly?

Pages: << < (4/4)

Go to full version