Use this trigger class:
Code:
class NewTrigger extends Trigger;
// The boolean variable.
bool WasTouched;
// The touch event (called when something touchs the trigger).
event Touch(Actor Other, PrimitiveComponent OtherComp, vector HitLocation, vector HitNormal)
{
if (FindEventsOfClass(class'SeqEvent_Touch'))
{
NotifyTriggered();
}
// It was touched.
WasTouched = true;
}
// Default values.
DefaultProperties
{
// Initially FALSE.
WasTouched=false;
}
and this:
Code:
event PostRender()
{
//Attempting to determine if Trigger_0 (in the editor) was touched
local Trigger T;
local string DrawMyText;
//local Pawn MyPawn;
/* Not sure if you need to replace 'Trigger' with
* the name of the new trigger. @100GPing100 */
foreach DynamicActors(class'Trigger', T, )
{
if(T.Name == 'Trigger_0')
{
//T.Touch();
//This is the T (Trigger) I want..
if (T.WasTouched) // Will be true if it has ever been touched. @100GPing100
{
DrawMyText = "This is the correct trigger, Trigger_0";
}
}
else if (T.Name == 'Trigger_1')
{
//This is Trigger 1..
DrawMyText = "This is Trigger_1";
}
}
Canvas.SetPos(50,50);
Canvas.SetDrawColor(255,255,255,200);
Canvas.Font = class'Engine'.static.GetSmallFont();
Canvas.DrawText(DrawMyText);
}
Also, next time use code tags, like this:
[code_]MY CODE[ /code_]
without the underscores ('_').
Bookmarks