Author Topic: Objects that emit a player detecting radius  (Read 1760 times)

Whenever this runs, the game tells me that It cannot find what setTransform, setScale, and whatnot are.
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. :(

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. :(

I assume you mean these error?

Errors

Code: [Select]
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'

Snippet of Code One last time

Code: [Select]
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);

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

I assume you mean these error?

Errors

Code: [Select]
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'
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?