Author Topic: Action repeated each time when one of arguments becomes true  (Read 1712 times)

0 Members and 1 Guest are viewing this topic.

Offline Petarch

  • 22
Action repeated each time when one of arguments becomes true
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:



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?

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: Action repeated each time when one of arguments becomes true
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)
No-one ever listens to Zathras. Quite mad, they say. It is good that Zathras does not mind. He's even grown to like it. Oh yes. -Zathras

 

Offline Droid803

  • Trusted poster of legit stuff
  • 213
  • /人 ◕ ‿‿ ◕ 人\ Do you want to be a Magical Girl?
    • Skype
    • Steam
Re: Action repeated each time when one of arguments becomes true
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).
(´・ω・`)
=============================================================

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: Action repeated each time when one of arguments becomes true
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. 
No-one ever listens to Zathras. Quite mad, they say. It is good that Zathras does not mind. He's even grown to like it. Oh yes. -Zathras

  

Offline Petarch

  • 22
Re: Action repeated each time when one of arguments becomes true
It works. Thanks very much.