I am trying to script the following: When the player enters a jumpnode he gets a training message telling him he is in range. The player now has the option to press 1 which will immobilize his ship for 20 sec (a directive with help text should explain this). If the player leaves the node without pressing 1, the training message should reappear once he reenter the node, but if he pressed one it should not appear again.
What I have tried is using three events.
event 1 repeat 999999
when
-and
--is event incomplete event 2
--<
---distance alpha 1- waypoint 1
---300
-training message
event 2 chained to event 1 and contains the directive
when
-key pressed
--1
-player use ai
-ad goal
--ai play dead - Alpha 1
event 3 chained to event 2
when
-is event true delay
--event 2
--20
-player not use ai
-training msg
The message telling me I am in the right place appear as it should, and when I press 1 the directive becomes complete. The ai never takes over (or it is for such a short while that I is not noticed), and I get the message from the last event. After this the message from event 1 still appear when I am in the node.
It seems like the 20 sec. delay is not working and event 2 is not marked as complete, but I can't figure out why.