PDA

View Full Version : |Simple Guide to Random Events|



Bob Loblaw
2 Sep 2009, 05:11pm
The randomizer entity is called a logic_case.

What you have set up to trigger the logic_case is up to you, and varies greatly depending on how it is used. Whatever you decide to trigger the logic case you will need this output:
*Whatever it is to trigger, for button it is OnPressed*
Logic_case
PickRandom

This will randomly pick a case (1-16) and will fire all the outputs for that case.
You do not need to name each case, but it might help to keep things organized.

If you want a bunch of things fired on each case you might want to run everything through a logic_relay.
So create a relay and have all the outputs in it. Then in the outputs for logic_case have:
OnCase01
Case01Relay
Trigger

This will keep things neat and tidy and everything for Case01 you would put into the relay.

Have multiple cases set up to do different things, then it will randomly pick a case and fire the string of outputs in that case all at once.

Very simple, and it's how everything that happens randomly is done.

Solstice
22 Jan 2010, 09:25pm
Could somebody provide a simple example of specific outputs this could be used for? Please I would appreciate it. Thanks in advance.

Maybe like spawn entities or something?

Bob Loblaw
23 Jan 2010, 01:11am
Well, generally if you want a pattern to change. Some maps that use it would be like ze_mines of moria. It randomizes which staff is spawned, or whether neither staff is spawned, or if both are, all via logic_case.
Another example is minigames. Take office_course. A logic_case randomly choses which of the first two blocks is solid vs illusionary. Same with the ladders. I'm assuming he set it up so a logic_Case randomly picks where the killtriggers are on the ladders so it's not the same pattern over and over and you can just memorize it.

2DG
25 Jan 2010, 12:41am
Well, generally if you want a pattern to change. Some maps that use it would be like ze_mines of moria. It randomizes which staff is spawned, or whether neither staff is spawned, or if both are, all via logic_case.
Another example is minigames. Take office_course. A logic_case randomly choses which of the first two blocks is solid vs illusionary. Same with the ladders. I'm assuming he set it up so a logic_Case randomly picks where the killtriggers are on the ladders so it's not the same pattern over and over and you can just memorize it.

Another good example is potc.
Every round one of the 2 ways is picked.