[ut2004] Need help with a puzzle using triggers

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.
Status
Not open for further replies.

chalupa44

New Member
Nov 24, 2005
43
0
0
Hey, I am wondering what is the best way to go about accomplishing the following?


When Triggers 1,2,3,4 are in their StayOpened Time then enable Trigger 5 to be activated?

Can this be done with a Scripted Trigger and using WaitForEvent? A counter trigger?

What is happening is that the player needs to set up 4 mirrors which reflect light onto a fifth mirror. When the four mirrors are all placed correctly (in their stay opened time) then let the player be able to move the fifth mirror.

Thanks in advance.

-chalupa
 

SuperApe

Registered Monkey
Mar 20, 2004
333
0
16
Inna Jungle
wiki.beyondunreal.com
It sounds to me like a job for TriggeredCondition.
( bToggled = false, bEnabled = false, bTriggerControlled = true )
When a mirror is set, a corresponding TriggeredCondition becomes active or "true" by using another Trigger (NormalTrigger) to activate it.
A ScriptedTrigger loops through the series of IfConditions and if all are true, it Triggers the final mirror.
 
Last edited:

chalupa44

New Member
Nov 24, 2005
43
0
0
Scripted Trigger

We almost have it working.

Currently we have a series of triggers that move mirrors that are movers. When the mirrors are in their open state they call a scripted trigger which has a series of "Action_WAITFOREVENT" AI scripts associated with it. When all the triggers that move the mirror are triggered, the open state of the mirror mover calls the next WAITFOREVENT in the scripted trigger. When all the movers are in their opened state the final mirror moves.

The problem we are having is with reseting the scripted trigger once the puzzle has been solved.

How do you reset a ScriptedTriger?

Thanks

-chalupa
 

SuperApe

Registered Monkey
Mar 20, 2004
333
0
16
Inna Jungle
wiki.beyondunreal.com
Well, the series of ScriptedActions in your ScriptedTrigger can be "re-run" by using an ACTION_GotoAction to loop it back to the beginning once the final mirror is Triggered.

If your mirror Movers must (and can only be) set in a particular order, your setup should work fine. However, if the player is able to set mirror #2 before setting mirror #1, then your sequence of WaitForEvent actions will miss it. That's why I suggested a series of ACTION_IFConditions looking at TriggeredConditions instead. That would allow the mirrors to be set in any order, and as long as they are all set, the final mirror would Trigger.

EDIT:
Actually, with Movers set to TriggerOpenTimed, I'd use these settings on Trigger -> TriggeredCondition:
( bToggled = true, bEnabled = false, bTriggerControlled = false )
and have the OpenedEvent and ClosedEvent both match the TriggeredCondition's Tag.
 
Last edited:

chalupa44

New Member
Nov 24, 2005
43
0
0
hmm

I tried to make a sandbox to test out a trigger condition.

What I have done is create a room and add 1 Trigger, 1 TriggerCondition and 1 ScriptedTrigger.

Trigger -> Has even "Toggle"

TriggerConditions tag is Toggle (and event is also toggle.. read somewhere on the wiki you needed to do this)

The scripted trigger has 5 actions:

1. ACTION_WAITFOREVENT -> toggle
2. ACTION_DISPLAYMESSAGE -> message is "blah" (this is so I know its getting this far atleast)
3. ACTION_IFCONDITION -> TriggerCondition Tag is Toggle
4. ACTION_DISPLAYMESSAGE -> message is "YAY IT WORKED" (this is so I know it worked)
5. ACTION_ENDSECTION

Now in theory... if I run over the trigger that fires off the event toggle, that should change the triggercondition to true which then would let my scriptedtrigger progress untill it says YAH IT WORKED.

However, it doesn't work.

Can anyone please help me figure out what I am doing wrong? Are IFCONDITION or triggeredconditions bugged?

Thanks,

-chalupa
 

Wormbo

Administrator
Staff member
Jun 4, 2001
5,913
36
48
Germany
www.koehler-homepage.de
TriggeredConditions work fine and so do ACTION_IfConditions.
Due to the way triggering works, you should add a small delay in your script via WaitForTimer if you are waiting for an event and check a triggered condition with the same tag.

[edit]
Since this is a mapping question, I suggest you continue in your other thread.
 
Last edited:
Status
Not open for further replies.