Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: Rowhider on September 10, 2011, 07:29:47 am

Title: Repeating an event
Post by: Rowhider on September 10, 2011, 07:29:47 am
Hi all!

I've searched in old topics but i didn't find exactly what I want to do:

To explain my problem simply:
I want to attribute a key to an event. Each time than the key is pressed, the event shall occure.

I've try several methods but without succes:
When i use: the "when" function, it runs, but only once.
When i use, "every-time", the function repeat don't stop to repeat: so the key pressed is never reset.

I've try the chaine, but i don't know why, it don't run.

I try to find a method to have the "key-pressed" checked at each cycle.

Could someone have the solution for my problem?!




Title: Re: Repeating an event
Post by: Lester on September 10, 2011, 07:55:47 am
Add a key-reset-multiple to your event. If you don't use it, the key will always count as pressed, causing the endless repeating which you mentioned.
Title: Re: Repeating an event
Post by: Rowhider on September 10, 2011, 08:13:13 am
Yes, i've try it too, but i have always the same problem:

In one case: the event runs once
In the the second case: the event runs to infinite  :shaking:
Title: Re: Repeating an event
Post by: Rowhider on September 10, 2011, 08:36:36 am
I've find a solution to my problem, but it seems than there are bugs following the key chosen...
Title: Re: Repeating an event
Post by: mjn.mixael on September 10, 2011, 01:49:17 pm
You simply need to add a trigger count to your event. It's a box in the middle (between the events and messages) of the Event Editor window.

When (with high trigger count #)
--Key-Pressed
-----YOUR KEY
--ACTIONS
--Key-Reset-Multiple
Title: Re: Repeating an event
Post by: Rowhider on September 11, 2011, 08:52:56 am
Yes thank you, i've found the solution yesterday and it run well.