Author Topic: Trigger error now... help?  (Read 2507 times)

he is talking events i dont want events, i want it auto without placing the events on the server manually
So um..

How can this be explained?

So um..

How can this be explained?

I think the only real way is to take him aside and gently remind him that computers aren't sentient and can't predict what he wants done.

you people really are starfishs sometimes
Code: [Select]
datablock triggerData(someTriggerData) {};
function someTriggerData::onEnterTrigger(%this, %trigger, %obj)
{
%obj.client.centerPrint(%obj.client.bl_id, -1);
}
function someTriggerData::onLeaveTrigger(%this, %trigger, %obj)
{
%obj.client.centerPrint("", 0);
}

function fxDTSBrick::makeBL_IDTrigger(%this)
{
new trigger(theActualTrigger)
{
position = %this.getPosition();
rotation = "1 0 0 0";
scale = "1 1 1";
datablock = someTriggerData;
polyhedron = "0.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 0.0000000 -1.0000000 0.0000000 0.0000000 0.0000000 1.0000000";
};
}
some or none of this may actually work. just call makeBL_IDTrigger() on all the brick objects you want to be a trigger.

you people really are starfishs sometimes
Code: [Select]
datablock triggerData(someTriggerData) {};
function someTriggerData::onEnterTrigger(%this, %trigger, %obj)
{
%obj.client.centerPrint(%obj.client.bl_id, -1);
}
function someTriggerData::onLeaveTrigger(%this, %trigger, %obj)
{
%obj.client.centerPrint("", 0);
}

function fxDTSBrick::makeBL_IDTrigger(%this)
{
new trigger(theActualTrigger)
{
position = %this.getPosition();
rotation = "1 0 0 0";
scale = "1 1 1";
datablock = someTriggerData;
polyhedron = "0.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 0.0000000 -1.0000000 0.0000000 0.0000000 0.0000000 1.0000000";
};
}
some or none of this may actually work. just call makeBL_IDTrigger() on all the brick objects you want to be a trigger.
He wants the placement to be automatic.

no, he wants what the event does, but he wants it to happen via script. he heard about triggers, and they sound like a good idea, because to him, events won't work because he doesn't think  they can be placed on the brick automatically

someone write some onPlant code that uses my code, and be done with this question.

Code: [Select]
package WhatTheforgetIsOPTryingToDo
{
function fxDTSBrick::onPlant(%this)
{
Parent::onPlant(%this);
%this.makeBL_IDTrigger();
}
};
activatePackage(WhatTheforgetIsOPTryingToDo);
?

good.

we're done here op, if you still don't know what you're doing, ask. we can stop loving with this thread now.

good.

we're done here op, if you still don't know what you're doing, ask. we can stop loving with this thread now.

Ty <3 perfect

Now I get an error of

Code: [Select]
Add-Ons/Gamemode_Testing/chewbacca.cs (233): Register object failed for oject (null) of class Trigger
That happenes everytime i place my brick

*EDIT*
 I fixed it.
« Last Edit: November 07, 2013, 10:38:50 PM by chubaka452 »

Post all the trigger code.