Author Topic: Cancelling out an event that is already in action  (Read 1035 times)

0 Members and 1 Guest are viewing this topic.

Cancelling out an event that is already in action
Hello,
Long time freespace player, occasional FREDer and frequent viewer of this forum needs help, so much so i have finally joined to seek answers.

My question is about disabling an event that is currently active in my mission. I have made a red alert warning sign in gimp to use in my mission to add a bit of character, the event used to display it flashing is simple:

Red alert!
>when
>Intruder fires
>show-subtitle-image
RED ALERT
100
0
true
false
0
0
3000

With a repeat count of 9999, trigger count 9999 and interval time of 2. Makes it flash nicely but how can i disable it after the battle ends? I want the player to be able to press a button that cancels the red alert event, is this possible?

Thank you for reading.



 

Offline Mito [PL]

  • 210
  • Proud Member of Slavicus Mechanicus
Re: Cancelling out an event that is already in action
Let me suggest: (dunno how to write it properly)

when
>and
>>not -> is-event-true (STAHP THE SUBTITLE)
>>is-event-true (Intruder fires)
do the proper stuff.
How do you kill a hydra?

You starve it to death.

 

Offline procdrone

  • Formerly TheHound
  • 29
  • Balance breaker! Thats me!
    • Steam
Re: Cancelling out an event that is already in action
MitoPL said it.

Add another variable there, like is event true ->stop red alert

and set the red alert event to trigger true when you press the button.

If you want to make it work multiple times, make the stop button change a variable you created to 0, and make red alert trigger when you set it to 1. (for example, when an enemy arrives)
--Did it! It's RELEASED! VeniceMirror Thread--

  

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Cancelling out an event that is already in action
BTW for what you're doing there is going to be no difference between a trigger count of 9999 and a repeat count of 9999, so there is no need to do both (In fact it's only ever worth doing both if the trigger count is less than the repeat count).
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]