Switches HALP
Feb 17 2010, 7:35 pm
By: newBorn  

Feb 17 2010, 7:35 pm newBorn Post #1



k, so heres my problem:

I'm working on a HoI-like map, as most of you know, in HoI u receive minerals for the number of National Provinces (Supply Depots.) you control at the end of a turn.
I want to have the exact same, yet countdown timer doesnt work perfectly as everyone knows.

if u set the condition (timer.) to exacly 1 second('s) for example, the trigger giving cash will launch a few times because of hypertriggers (like 50 ms cooldown).
I figured i need to use switches in order to get the income ONCE, easy stuff, well not that much when u have 7 players, that requires me to use 7 switches, which in term broadens the number of triggers i have to use for income to about 1400 (200 for each player.), i'm like.. FUCK!

Yet i'm not quite sure if Switch works for all players, or for each separately, if it would work for each separately, then i would just need 1 switch (200 triggers.) which is mucho simple. Any help in this one? How can i make it work easier?

P.S- I dont want BloodNIronish type of Income, it sucks.



None.

Feb 17 2010, 7:36 pm Biophysicist Post #2



http://www.staredit.net/wiki/Death_Counters



None.

Feb 17 2010, 9:37 pm Sacrieur Post #3

Still Napping

There's no need to use switches or death counters at all. Your HTs run at 8 times per game second (which is the seconds the countdown clock uses). This means you'll get 8x the amount you need. The way to fix this is to run it when the timer is at exactly 0 seconds and reset the countdown timer in the same trigger you use to give out minerals. This way the trigger only registers once, and eliminates all of those 7 other unneeded checks.

If you need to give the minerals on a nonzero time, then just simply changes the reset to x - 1 (where x is the time you want it checked at). This will also avoid the trigger from firing more than once.

It is possible to have the reset trigger standalone, but it must be lower on the trigger list than the money triggers.

Post has been edited 3 time(s), last time on Feb 17 2010, 9:50 pm by Sacrieur.



None.

Feb 17 2010, 10:51 pm newBorn Post #4



thx Tassadar, dc works perfectly for this concept.



None.

Feb 17 2010, 11:44 pm ImagoDeo Post #5



Quote from newBorn
thx Tassadar, dc works perfectly for this concept.

DCs work very well for a lot of concepts. I use them almost exclusively as opposed to switches.



None.

Feb 18 2010, 1:12 am Sacrieur Post #6

Still Napping

... Or you could do what I said and eliminate the need for DCs at all. It would save you time and lots of unnecessary actions.



None.

Feb 18 2010, 4:28 am rockz Post #7

ᴄʜᴇᴇsᴇ ɪᴛ!

you can also not use the countdown timer, (or have it run and not use it) and instead use a DC which counts down. The countdown timer to DC with Hyper triggers conversion is *8. That means 1 second is 8 DCs. That way you can use "exactly 80 DC" instead of "Exactly 10 seconds".

Sacrieur's method will work as well, though. Make sure you reset the timer on player 8, (or a computer player after all the humans).



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Feb 18 2010, 4:48 am Lanthanide Post #8



Note that 10 countdown timer = 80 DC != 10 real-time seconds. The real-time second count varies depending on your game speed.

At fastest speed, 1 real-time second = ~11.9 DC.

I actually make use of both DCs and the countdown timer in my map. I have a trigger with condition Always that freezes the countdown timer, and another set of triggers that sets a DC to 12, then decrements each trigger loop. Once it gets to 0, I subtract 1 second from the countdown timer and set the DC back to 12.

That way I get real-time seconds displayed on the countdown timer, and if I needed to do anything every second (I don't), I could do it when the DC == 0.

Note that the display on the countdown timer using this method seems a little jerky, like it seems to display the time for greater or less lengths of time than 1 second, which is a little odd if you stare at it. However over the course of 3 minutes, it works out to being only 2 seconds too fast, so not a big deal.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[01:24 pm]
Vrael -- NEED SOME SPORTBALL> WE GOT YOUR SPORTBALL EQUIPMENT MANUFACTURING
[2024-4-30. : 5:08 pm]
Oh_Man -- https://youtu.be/lGxUOgfmUCQ
[2024-4-30. : 7:43 am]
NudeRaider -- Vrael
Vrael shouted: if you're gonna link that shit at least link some quality shit: https://www.youtube.com/watch?v=uUV3KvnvT-w
Yeah I'm not a big fan of Westernhagen either, Fanta vier much better! But they didn't drop the lyrics that fit the situation. Farty: Ich bin wieder hier; nobody: in meinem Revier; Me: war nie wirklich weg
[2024-4-29. : 6:36 pm]
RIVE -- Nah, I'm still on Orange Box.
[2024-4-29. : 4:36 pm]
Oh_Man -- anyone play Outside the Box yet? it was a fun time
[2024-4-29. : 12:52 pm]
Vrael -- if you're gonna link that shit at least link some quality shit: https://www.youtube.com/watch?v=uUV3KvnvT-w
[2024-4-29. : 11:17 am]
Zycorax -- :wob:
[2024-4-27. : 9:38 pm]
NudeRaider -- Ultraviolet
Ultraviolet shouted: NudeRaider sing it brother
trust me, you don't wanna hear that. I defer that to the pros.
[2024-4-27. : 7:56 pm]
Ultraviolet -- NudeRaider
NudeRaider shouted: "War nie wirklich weg" 🎵
sing it brother
[2024-4-27. : 6:24 pm]
NudeRaider -- "War nie wirklich weg" 🎵
Please log in to shout.


Members Online: NudeRaider