Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: Petarch on May 08, 2010, 04:02:55 pm

Title: Action repeated each time when one of arguments becomes true
Post by: Petarch on May 08, 2010, 04:02:55 pm
I'm making a mission in Fred and I want to use an event in which action is repeated each time when one of arguments becomes true. Below there is a screen of the event:

(http://img687.imageshack.us/img687/3829/fredpt.jpg)

I want the event to work in a following way: every time when one of marine transporters docks a destroyer called Nexus, number of turret's hitpoints increases by 10. As you can see in the picture, I tried to use "every-time" operator, but the result is starting an action and repeating it infinitly, until the subsystem has 100%. How can this be done in other way?
Title: Re: Action repeated each time when one of arguments becomes true
Post by: FUBAR-BDHR on May 08, 2010, 04:06:52 pm
when-argument
-->any-of
----><list of transports>
-->has-docked-delay
----><argument>
---->1
---->15
-->repair-subsystem
.............
-->invalidate-argument
----><argument>

Set it to trigger count # of transports (I have yet to use this method)

If trigger count doesn't work set repeat count 9999999 and delay 1 second.  (I know this one works)
Title: Re: Action repeated each time when one of arguments becomes true
Post by: Droid803 on May 08, 2010, 04:57:32 pm
I think you can get every-time to work too if you add invalidate-argument to it.
Not sure.

That's the important thing. (Otherwise, the game just keeps checking if one of the things have docked BEFORE, which will be true after the first time it docks).
Title: Re: Action repeated each time when one of arguments becomes true
Post by: FUBAR-BDHR on May 08, 2010, 05:03:55 pm
Every-time is not meant for operations such as this it's meant for special cases where the action needs to occur/be tested every frame. 
Title: Re: Action repeated each time when one of arguments becomes true
Post by: Petarch on May 09, 2010, 05:01:05 am
It works. Thanks very much.