Author Topic: Transition an effect from every-time to when  (Read 5147 times)

0 Members and 1 Guest are viewing this topic.

Offline 0rph3u5

  • 211
  • Oceans rise. Empires fall.
Transition an effect from every-time to when
So, I have an effect I am pretty proud of (even if it is kinda simple and ridiculous) but it is currently build on events with "every-time" as conditional - which I didn't think through back then and until recently didn't reconsider. However some time ago, I tried to make a recording of the mission it is implimented in and as it is with wrongly used "every-time" the frame rate dropped to no small degree.

The original effect worked like this:

So every frame in between the NTCv Congreve's arrival and destruction the engine would randomly set two variables to either 0 or 1. Each variable was used as a trigger for the following events - if the variable was 1 an event would trigger that activated the glow maps/points; if the varibale was 0 an event would trigger that deactived the glow maps/points.
Not exactly how this was intended to be used but it worked.

Now I am building a new version of the effect based on "when" events and hit a little snag: The glow-maps go out as intended but never get back on and subsequently don't flicker.... (as there aren't all ships implimented in the mission yet I can't see if the equivalent stuff for the turrets works or not)

Using the varibale as trigger here might be redundant (as you can basically make the check if the Naxos is at <20% hull a condition on its own) but otherwise I can't see a fault in the events.

The only stuff I can come up with at the moment would be that Interval Time needs to be higher but don't have that covered with the "event-ture" stuff?
« Last Edit: October 16, 2016, 02:09:53 pm by 0rph3u5 »
"As you sought to steal a kingdom for yourself, so must you do again, a thousand times over. For a theft, a true theft, must be practiced to be earned." - The terms of Nyrissa's curse, Pathfinder: Kingmaker

==================

"I am Curiosity, and I've always wondered what would become of you, here at the end of the world." - The Guide/The Curious Other, Othercide

"When you work with water, you have to know and respect it. When you labour to subdue it, you have to understand that one day it may rise up and turn all your labours into nothing. For what is water, which seeks to make all things level, which has no taste or colour of its own, but a liquid form of Nothing?" - Graham Swift, Waterland

"...because they are not Dragons."

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Transition an effect form every-time to when
The big problem is that none of Naxos power flicker A, B or C will ever evaluate to false. They'll only ever evaluate to event-true or event-incomplete until the end of the mission.
« Last Edit: October 16, 2016, 08:10:07 am by karajorma »
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline 0rph3u5

  • 211
  • Oceans rise. Empires fall.
Re: Transition an effect form every-time to when
*faceplam* I was not seeing the forest for the trees *faceplam-harder*

Those "event-false-msec-delay"s should be "event-true-msec-delay"

EDIT: changed, still not working as intended...
« Last Edit: October 16, 2016, 08:40:09 am by 0rph3u5 »
"As you sought to steal a kingdom for yourself, so must you do again, a thousand times over. For a theft, a true theft, must be practiced to be earned." - The terms of Nyrissa's curse, Pathfinder: Kingmaker

==================

"I am Curiosity, and I've always wondered what would become of you, here at the end of the world." - The Guide/The Curious Other, Othercide

"When you work with water, you have to know and respect it. When you labour to subdue it, you have to understand that one day it may rise up and turn all your labours into nothing. For what is water, which seeks to make all things level, which has no taste or colour of its own, but a liquid form of Nothing?" - Graham Swift, Waterland

"...because they are not Dragons."

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Transition an effect form every-time to when
Same problem?
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline 0rph3u5

  • 211
  • Oceans rise. Empires fall.
Re: Transition an effect form every-time to when
Same problem?

Not exactly ... They trigger now and the random time inbetween seems to work (tested by adding a message to each event) but there is no visible activation/deactivation of the glow maps...
"As you sought to steal a kingdom for yourself, so must you do again, a thousand times over. For a theft, a true theft, must be practiced to be earned." - The terms of Nyrissa's curse, Pathfinder: Kingmaker

==================

"I am Curiosity, and I've always wondered what would become of you, here at the end of the world." - The Guide/The Curious Other, Othercide

"When you work with water, you have to know and respect it. When you labour to subdue it, you have to understand that one day it may rise up and turn all your labours into nothing. For what is water, which seeks to make all things level, which has no taste or colour of its own, but a liquid form of Nothing?" - Graham Swift, Waterland

"...because they are not Dragons."

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Transition an effect from every-time to when
Sounds like the problem isn't your events then. Make a simple test mission without the repeats and check that the glowmaps and glowpoints can be turned on and off that way.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline 0rph3u5

  • 211
  • Oceans rise. Empires fall.
Re: Transition an effect from every-time to when
I found the time to do as you asked ...

When I have four events without repeats do it, it works
When I have two repeating events do it, it doesn't

Test mission added - if it works for you I might have to check with another build

[attachment deleted by admin]
"As you sought to steal a kingdom for yourself, so must you do again, a thousand times over. For a theft, a true theft, must be practiced to be earned." - The terms of Nyrissa's curse, Pathfinder: Kingmaker

==================

"I am Curiosity, and I've always wondered what would become of you, here at the end of the world." - The Guide/The Curious Other, Othercide

"When you work with water, you have to know and respect it. When you labour to subdue it, you have to understand that one day it may rise up and turn all your labours into nothing. For what is water, which seeks to make all things level, which has no taste or colour of its own, but a liquid form of Nothing?" - Graham Swift, Waterland

"...because they are not Dragons."

 

Offline 0rph3u5

  • 211
  • Oceans rise. Empires fall.
Re: Transition an effect from every-time to when
Related Issue:

This...

(repeat count and intervall time are valid for both)

... seems to be shutting down all turrets on the Naxos (a Deimos, if you don't remember her from the main FS2 campaign) except the missile launchers. Am I just undercutting the Medium-difficutlies AIs reaction time, or is the intervall time all wrong?
"As you sought to steal a kingdom for yourself, so must you do again, a thousand times over. For a theft, a true theft, must be practiced to be earned." - The terms of Nyrissa's curse, Pathfinder: Kingmaker

==================

"I am Curiosity, and I've always wondered what would become of you, here at the end of the world." - The Guide/The Curious Other, Othercide

"When you work with water, you have to know and respect it. When you labour to subdue it, you have to understand that one day it may rise up and turn all your labours into nothing. For what is water, which seeks to make all things level, which has no taste or colour of its own, but a liquid form of Nothing?" - Graham Swift, Waterland

"...because they are not Dragons."

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Transition an effect from every-time to when
You're using number-of incorrectly. Since you aren't testing for anything using <argument> in the trigger for the event all the arguments in the list are being passed to the action part of the event.

I'll test the mission when I'm sober.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline 0rph3u5

  • 211
  • Oceans rise. Empires fall.
Re: Transition an effect from every-time to when
You're using number-of incorrectly. Since you aren't testing for anything using <argument> in the trigger for the event all the arguments in the list are being passed to the action part of the event.

Okay... I will see if I can come up with something that both contains the <argument>-string and comes to true no matter what... Too bad I can't just set it to test if <argument> has the subsystem type "turret"; it would also be a lot easier if it were a list of ships and not subsystems...
« Last Edit: October 22, 2016, 01:59:02 pm by 0rph3u5 »
"As you sought to steal a kingdom for yourself, so must you do again, a thousand times over. For a theft, a true theft, must be practiced to be earned." - The terms of Nyrissa's curse, Pathfinder: Kingmaker

==================

"I am Curiosity, and I've always wondered what would become of you, here at the end of the world." - The Guide/The Curious Other, Othercide

"When you work with water, you have to know and respect it. When you labour to subdue it, you have to understand that one day it may rise up and turn all your labours into nothing. For what is water, which seeks to make all things level, which has no taste or colour of its own, but a liquid form of Nothing?" - Graham Swift, Waterland

"...because they are not Dragons."

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Transition an effect from every-time to when
Instead of using number-of use random-multiple-of and an interval of zero.

Basically test until a random number of turrets are locked and then stop testing. With an interval of 0 it will choose a new turret each frame. As long as you lock and then invalidate the argument, you'll get all the turrets locked in a few seconds even if someone is playing at 4 fps.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline 0rph3u5

  • 211
  • Oceans rise. Empires fall.
Re: Transition an effect from every-time to when
Any update on the glow-maps-flicker thing?

Also, re-did the turret thing from the buttom up with additional variables.... which came with "****, did I just break it all?"-scare (seriously, FRED should prompt that a variables exceeds the 31 characters limit BEFORE you save and it becomes an Error message)
"As you sought to steal a kingdom for yourself, so must you do again, a thousand times over. For a theft, a true theft, must be practiced to be earned." - The terms of Nyrissa's curse, Pathfinder: Kingmaker

==================

"I am Curiosity, and I've always wondered what would become of you, here at the end of the world." - The Guide/The Curious Other, Othercide

"When you work with water, you have to know and respect it. When you labour to subdue it, you have to understand that one day it may rise up and turn all your labours into nothing. For what is water, which seeks to make all things level, which has no taste or colour of its own, but a liquid form of Nothing?" - Graham Swift, Waterland

"...because they are not Dragons."

  

Offline 0rph3u5

  • 211
  • Oceans rise. Empires fall.
Re: Transition an effect from every-time to when
Any updates on the glow-maps issue? - Do I need to provide the test mission again?
"As you sought to steal a kingdom for yourself, so must you do again, a thousand times over. For a theft, a true theft, must be practiced to be earned." - The terms of Nyrissa's curse, Pathfinder: Kingmaker

==================

"I am Curiosity, and I've always wondered what would become of you, here at the end of the world." - The Guide/The Curious Other, Othercide

"When you work with water, you have to know and respect it. When you labour to subdue it, you have to understand that one day it may rise up and turn all your labours into nothing. For what is water, which seeks to make all things level, which has no taste or colour of its own, but a liquid form of Nothing?" - Graham Swift, Waterland

"...because they are not Dragons."

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Transition an effect from every-time to when
I've been forced to reinstall Windows so I'm running rather behind on things I need to do. I should have the mission file somewhere. If I haven't checked this out by the end of the weekend, remind me.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline 0rph3u5

  • 211
  • Oceans rise. Empires fall.
Re: Transition an effect from every-time to when
I've been forced to reinstall Windows so I'm running rather behind on things I need to do. I should have the mission file somewhere. If I haven't checked this out by the end of the weekend, remind me.


Reminder
"As you sought to steal a kingdom for yourself, so must you do again, a thousand times over. For a theft, a true theft, must be practiced to be earned." - The terms of Nyrissa's curse, Pathfinder: Kingmaker

==================

"I am Curiosity, and I've always wondered what would become of you, here at the end of the world." - The Guide/The Curious Other, Othercide

"When you work with water, you have to know and respect it. When you labour to subdue it, you have to understand that one day it may rise up and turn all your labours into nothing. For what is water, which seeks to make all things level, which has no taste or colour of its own, but a liquid form of Nothing?" - Graham Swift, Waterland

"...because they are not Dragons."

 

Offline herkie423

  • 29
  • Plunge into the chaos!
Re: Transition an effect from every-time to when
I ASSUME (since it's not visible in the image) you placed the infinity value (I mean the 999999) in the "repeat" box and "trigger" 1. The event will trigger only once and repeat for infinity. If you tie this with turning the glow maps off then it will be off forever. This will slow down the computer because it will execute the event for infinity.

Try this:
Basically the same SEXPs but place the infinity value to the "trigger" box and "repeat" box value of 1.

Disregard this comment if my assumption is wrong.
« Last Edit: May 09, 2017, 03:45:28 am by herkie423 »

 

Offline herkie423

  • 29
  • Plunge into the chaos!
Re: Transition an effect from every-time to when
Oh yes, I forgot. If you use "event-true-delay" or "event-true- msec-delay", it will not work. Once the event is true or triggered, any subsequent trigger like setting trigger count more than 1, it will always be true until the end. You may use toggle variables and duration variables in conjunction with the "everytime" condition or "when" triggered multiple times. Anyway, I will make a mission concerning this and post this here. I find this intriguing and I like daunting tasks. I really do.

 

Offline 0rph3u5

  • 211
  • Oceans rise. Empires fall.
Re: Transition an effect from every-time to when
The trigger was not the problem, it actually worked. There are some imperfections in but that's for one is basically works.

I am attaching the test mission again so you can see for yourself.

[attachment stolen by Russian hackers]
"As you sought to steal a kingdom for yourself, so must you do again, a thousand times over. For a theft, a true theft, must be practiced to be earned." - The terms of Nyrissa's curse, Pathfinder: Kingmaker

==================

"I am Curiosity, and I've always wondered what would become of you, here at the end of the world." - The Guide/The Curious Other, Othercide

"When you work with water, you have to know and respect it. When you labour to subdue it, you have to understand that one day it may rise up and turn all your labours into nothing. For what is water, which seeks to make all things level, which has no taste or colour of its own, but a liquid form of Nothing?" - Graham Swift, Waterland

"...because they are not Dragons."

 

Offline herkie423

  • 29
  • Plunge into the chaos!
Re: Transition an effect from every-time to when
I'll check it out. Is dependent on a mod? No matter, the events will still be there even if assets will be missing.

Downloading now.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Transition an effect from every-time to when
I've been forced to reinstall Windows so I'm running rather behind on things I need to do. I should have the mission file somewhere. If I haven't checked this out by the end of the weekend, remind me.


Reminder

Okay, I have time to test today.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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