Random Switches
Jan 1 2008, 10:54 pm
By: Kaleidx  

Jan 1 2008, 10:54 pm Kaleidx Post #1



Alright, so I'm using random switches to randomize 2 different switches. The randomizing is to get a random countdown timer set .. but I seem to be getting a little confused on this concept. There are a couple problems I'm running into.

At a certain point in my map, when current player brings [men] to loc the switch to begin the randomization is set. i.e. BeginRandomTimer is set Randomize switch1, switch2 and to stop it from continuing to randomize, I clear BeginRandomTimer .. but unfortunately I would like this to loop in a way where countdown timer is at most 1 second, there would be a small break and then reset BeginRandomTimer to get another loop. I think I got that part down right but I just thought I'd explain in case that somehow has something to do with my problem.

Now I'm sure you know that switches start out cleared and since that would be an outcome of randomization, I have to set an outcome for that event. The problem is, that means it'll happen at the very beginning of the map.
Another event that seems to interfere with that is since I'm trying to loop it so after the first timer runs out, a second timer starts .. I have to preserve the "BeginRandomTimer is Set" , "Randomize switch1, switch2"
I have to clear both switches after the action so the countdown timer -isn't- permenantly set as if it is frozen.

BeginRandomize
--
"BeginRandomTimer" is set
-
Randomize "switch1"
Randomize "switch2"
--

Outcome1
--
"switch1" is set
"switch2" is cleared
-
Set Countdown Timer to 180 seconds
Clear "switch1"
Clear "switch2"
--

So then of course that'll just loop to the event where both switches are cleared. So I think you can see my dilema. :flamer: Do you think I should just use a different method for my randomization? Or any suggestions on how to fix my problem would be really appreciated.

Post has been edited 1 time(s), last time on Jan 1 2008, 11:44 pm by Kaleidx.



None.

Jan 1 2008, 11:23 pm fm47 Post #2



I dont entirely understand your situation, but you could use death counters to determine when or how often you want it to randomize/reset the timer.



None.

Jan 1 2008, 11:25 pm who Post #3



Have the outcomes only occur when "BeginRandomTimer" is set, and clear it at the end of every outcome.



None.

Jan 2 2008, 1:18 am NudeRaider Post #4

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

I hope I figured correctly what you want. However, here's my solution:

Conditions:
Current Player brings at least 1 civ to 'beacon'
Switch 'BeginRandomTimer' is cleared
DC 'cooldown' is 0 for <comp player> (optional)
Actions:
Set Switch 'BeginRandomTimer'
Set Countdown Timer to 10s

Conditions:
Switch 'BeginRandomTimer' is set
Countdown timer is at least 1s
Actions:
<randomize switches>

Outcome #1
Conditions:
Switch 'BeginRandomTimer' is set
Countdown timer is at most 0s
Switch 1 is set
Switch 2 is set
Actions:
Clear Switch 'BeginRandomTimer'
Set Countdown Timer to 180 seconds
Clear "switch1"
Clear "switch2"
Set DC 'cooldown' to 20 for <comp player> (optional)

Outcome #2
Conditions:
Switch 'BeginRandomTimer' is set
Countdown timer is at most 0s
Switch 1 is set
Switch 2 is cleared
Actions:
Clear Switch 'BeginRandomTimer'
Set Countdown Timer to 80 seconds
Clear "switch1"
Clear "switch2"
Set DC 'cooldown' to 20 for <comp player> (optional)

Cooldown Counter (optional)
Always
Subtract 1 from DC 'cooldown' for <comp player>


The grey part is optional if you want some delay after the 10s randomization so the player can't activate it right after the first loop.

EDIT: Hehe, lol I guess someone09 answered it already but I realized it only when I was finished. ;)




Jan 2 2008, 3:52 am Falkoner Post #5



http://Falkoner.CoW.GooglePages.com/Switches.html

You're using the Basic Switch Randomization.

Now, I think a problem you have is that the condition that it's cleared is met as soon as the map starts, so just make sure there's an extra condition, other than just the combination of switches.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[11:26 am]
ridicaw408 -- Sports and Fitness Equipment manufacturer https://www.riogrand.in/
[11:25 am]
ridicaw408 -- Sports and Fitness Equipment manufacturer https://www.riogrand.in/
[11:25 am]
ridicaw408 -- Sports and Fitness Equipment manufacturer https://www.riogrand.in/
[11:25 am]
ridicaw408 -- Sports and Fitness Equipment manufacturer https://www.riogrand.in/
[11:25 am]
ridicaw408 -- Sports and Fitness Equipment manufacturer https://www.riogrand.in/
[11:25 am]
ridicaw408 -- Sports and Fitness Equipment manufacturer https://www.riogrand.in/
[11:25 am]
ridicaw408 -- Sports and Fitness Equipment manufacturer https://www.riogrand.in/
[11:24 am]
ridicaw408 -- Outdoor gym and fitness equipment manufacturer and suppliers https://mountwoodco.com/outdoorgym-equipment-manufacturer-in-uttar-pradesh.php
[11:24 am]
ridicaw408 -- Outdoor gym and fitness equipment manufacturer and suppliers https://mountwoodco.com/outdoorgym-equipment-manufacturer-in-uttar-pradesh.php
[11:23 am]
ridicaw408 -- Outdoor gym and fitness equipment manufacturer and suppliers https://mountwoodco.com/outdoorgym-equipment-manufacturer-in-uttar-pradesh.php
Please log in to shout.


Members Online: 7madisone1523hL2, 3taylore523wg2