Death - and Scoreminus Trigger
by SPU9 · in General Discussion · 06/22/2003 (2:53 am) · 8 replies
Hi
i didnt know if this is the forum there i can post this questions
but :
1.how can i make a trigger with a function : the player goes(he jumps)into the trigger then he is death
(the player fall from a mountain in the trigger then he is death)
2.how can i make a trigger with a function : the player goes inside then the trigger takes scorepoint from the F2 list minus ( - ) [the player has 6 scores then he goes into the trigger
and than he has 1 scorepoint minus (than he has 5 scores )
sorry for my englisch but i am german and i am very very tired
but plz help me
i didnt know if this is the forum there i can post this questions
but :
1.how can i make a trigger with a function : the player goes(he jumps)into the trigger then he is death
(the player fall from a mountain in the trigger then he is death)
2.how can i make a trigger with a function : the player goes inside then the trigger takes scorepoint from the F2 list minus ( - ) [the player has 6 scores then he goes into the trigger
and than he has 1 scorepoint minus (than he has 5 scores )
sorry for my englisch but i am german and i am very very tired
but plz help me
About the author
#2
(sorry but i am a scriptingnewbie)
06/22/2003 (2:18 pm)
Thx but what must i replaced that i die when i enter the trigger(sorry but i am a scriptingnewbie)
#3
06/26/2003 (7:09 pm)
Try %colObj.kill("TriggerTrap");
#4
i have try it one hour but it doesnt work by me
i dont know what i must replace
can you plz help me?
or put the %colObj.kill("TriggerTrap");
in the script plz
06/27/2003 (1:27 am)
Shiti have try it one hour but it doesnt work by me
i dont know what i must replace
can you plz help me?
or put the %colObj.kill("TriggerTrap");
in the script plz
#5
//-----------------------------------------------------------------------------
// Trigger Trap - Kills player when they enter the tirgger
//-----------------------------------------------------------------------------
datablock TriggerData(TriggerTrap)
{
tickPeriodMS = 500;
};
function TriggerTrap::onEnterTrigger(%this, %obj, %colObj)
{
if(!%colObj) return;
%colObj.kill("TriggerTrap");
}
07/11/2003 (12:55 pm)
Sure://-----------------------------------------------------------------------------
// Trigger Trap - Kills player when they enter the tirgger
//-----------------------------------------------------------------------------
datablock TriggerData(TriggerTrap)
{
tickPeriodMS = 500;
};
function TriggerTrap::onEnterTrigger(%this, %obj, %colObj)
{
if(!%colObj) return;
%colObj.kill("TriggerTrap");
}
#6
the death trigger ist great thx
but i must have one more trigger
the scoreminus trigger
what function i must add??
07/12/2003 (4:00 am)
Thx big thxthe death trigger ist great thx
but i must have one more trigger
the scoreminus trigger
what function i must add??
#7
or this might work %obj.client.DecScore(1):
-----------------
Borus
03/03/2004 (4:53 pm)
%obj.client.IncScore(-1); or this might work %obj.client.DecScore(1):
-----------------
Borus
#8
03/06/2004 (12:15 am)
Hahahahaha, I swear Borus, you never read thread dates.
Torque Owner Josh Moore
Here an example of a trigger that heals you when you enter it. You can edit it to make it do what you want.
//-----------------------------------------------------------------------------
// Health Trigger - Repairs Whatever Is Inside It
//-----------------------------------------------------------------------------
datablock TriggerData(HealthTrigger)
{
tickPeriodMS = 500;
};
function HealthTrigger::onEnterTrigger(%this, %obj, %colObj)
{
if(!%colObj || %colObj.team != %obj.team) return;
%colObj.applyRepair(10);
%colObj.healthTriggerRepair = schedule(1000, %colObj, healthTriggerLoop, %colObj);
}
function HealthTrigger::onLeaveTrigger(%this, %obj, %colObj)
{
if(!%colObj || %colObj.team != %obj.team) return;
cancel(%colObj.healthTriggerRepair);
}
function healthTriggerLoop(%obj)
{
if(!%obj || if %obj.getDamageLevel() == 0) return;
%obj.applyRepair(10);
%obj.healthTriggerRepair = schedule(1000, %obj, healthTriggerLoop, %obj);
}