How do I assign random appearance chance?

Moderators: Order of Battle Moderators, The Artistocrats

Post Reply
PoorOldSpike
Sr. Colonel - Battleship
Sr. Colonel - Battleship
Posts: 1660
Joined: Sun Aug 08, 2010 6:06 pm
Location: Plymouth, England

How do I assign random appearance chance?

Post by PoorOldSpike »

I first asked the question early last year and got some replies but sadly I could never understand the editor mechanics so I gave up on it and went off to sulk and pout for a few months.
But I recently returned to OOB and would like to have another crack at it, so any sage advice and words of wisdom would be most welcome.
Look, here's a typical scenario I've thrown together in the editor, my Brits at bottom are about to attack the jerries at the top.
I've given him 2x Tigers, but here's my question-
How can I give one of the Tigers a 50 per cent appearance chance?
That way, every time I play the scen, I won't know if I'm going to be facing 1 or (gulp) 2 Tigers, so there'll be an exciting element of uncertainty each time I crank up the game.
Believe me, I've tried to do it in the editor but flopped miserably which is why I'm throwing myself on your mercy and asking you to help me crack it once and for all..:)

Image
bebro
Slitherine
Slitherine
Posts: 4576
Joined: Sun Nov 19, 2006 12:50 pm

Re: How do I assign random appearance chance?

Post by bebro »

PoorOldSpike wrote: Tue Feb 05, 2019 5:34 pm
How can I give one of the Tigers a 50 per cent appearance chance?
Should be doable with random triggers. There could be even multiple ways to achieve it.

Right now what comes to my mind is

1. Add a random starter trigger

Make it so that it will fire one of two trigger options.

2. The two options are separate, inactive triggers which get activated according to the "choice" made by the starter.

Option A - a trigger giving 1 Tiger (spawn unit with type, location, side etc.)
Option B - a trigger giving 2 (as above, just double unit spawn)

The starter above will always, but randomly fire one of the two options.

So a bit like this:
randomtigers.jpg
randomtigers.jpg (316.21 KiB) Viewed 1859 times
PoorOldSpike
Sr. Colonel - Battleship
Sr. Colonel - Battleship
Posts: 1660
Joined: Sun Aug 08, 2010 6:06 pm
Location: Plymouth, England

Re: How do I assign random appearance chance?

Post by PoorOldSpike »

Thanks but despite trying for 2 days I'm still stuck (sniffle).
Maybe my "two Tigers' test scen made things unnecessarily complex, so I've created a simpler test scenario below to try to make just one vehicle- a Katyusha- appear or not appear with a 50 percent chance at the start of each scenario, but it's still not working, so please tell me what I'm doing wrong in these screenshots-

1- I set Trigger state to 'Enabled'-
Image


2- This is the spawn hex I assigned-
Image


3- and this is the 'no Katy' trigger. I 'Enabled' that too-
Image


4- But every time I start the scen, the Katy always appears 100 percent of the time, grrrr..
Image
Last edited by PoorOldSpike on Fri Feb 08, 2019 2:53 pm, edited 1 time in total.
terminator
Field Marshal - Gustav
Field Marshal - Gustav
Posts: 6115
Joined: Mon Aug 15, 2011 12:48 pm
Location: the land of freedom

Re: How do I assign random appearance chance?

Post by terminator »

PoorOldSpike wrote: Fri Feb 08, 2019 7:16 am 4- But every time I start the scen, the Katy always appears 100 percent of the time, grrrr..
Image
Where is the Random Trigger :?:
bebro
Slitherine
Slitherine
Posts: 4576
Joined: Sun Nov 19, 2006 12:50 pm

Re: How do I assign random appearance chance?

Post by bebro »

PoorOldSpike wrote: Fri Feb 08, 2019 7:16 am 4- But every time I start the scen, the Katy always appears 100 percent of the time, grrrr..
If both triggers are active and the first disables the second you get always the result of the first, as it will fire and instantly disable the other, which never has a chance ;)

Like terminator said, you need a random trigger first, and in there specify the two triggers for 1 or 2 tigers (or any other unit). Those two triggers need to be inactive at start, and get only activated by the random trigger (which is why they need to be specified in there, pls. see pic).

So the random thing is there to *select randomly* one of those triggers specified and fire that one. The other trigger specified in the random trigger will be ignored - unless you restart - then you get another randomized result.
PoorOldSpike
Sr. Colonel - Battleship
Sr. Colonel - Battleship
Posts: 1660
Joined: Sun Aug 08, 2010 6:06 pm
Location: Plymouth, England

Re: How do I assign random appearance chance?

Post by PoorOldSpike »

Thanks guys I'm making some progress but still haven't cracked it yet.
I've left the two trigs disabled (yellow circle), and have arranged for a Katy to spawn on a particular hex.
Question- when I select the 'no Katy' option, what attribute do I assign to it from the red circle?

Image
GabeKnight
Lieutenant-General - Karl-Gerat 040
Lieutenant-General - Karl-Gerat 040
Posts: 3710
Joined: Mon Nov 27, 2017 10:24 pm

Re: How do I assign random appearance chance?

Post by GabeKnight »

PoorOldSpike wrote: Sat Feb 09, 2019 8:45 pm Question- when I select the 'no Katy' option, what attribute do I assign to it from the red circle?
Whatever you want the "no Katy" trigger to do after it's been activated... :shock: :wink:
PoorOldSpike
Sr. Colonel - Battleship
Sr. Colonel - Battleship
Posts: 1660
Joined: Sun Aug 08, 2010 6:06 pm
Location: Plymouth, England

Re: How do I assign random appearance chance?

Post by PoorOldSpike »

GabeKnight wrote: Sat Feb 09, 2019 11:58 pm Whatever you want the "no Katy" trigger to do after it's been activated... :shock: :wink:
What's the shock/wink icons for? Sorry if I've asked something stupid, or is scenario-building a mystic art forbidden to us common outsiders?
(By comparison the dear old Panzer Corps editor is very easy to use)..

Here's the full list of 'Effects' for the OOB 'no Katy' trigger, am I supposed to guess at which one I need?

Image
bebro
Slitherine
Slitherine
Posts: 4576
Joined: Sun Nov 19, 2006 12:50 pm

Re: How do I assign random appearance chance?

Post by bebro »

You can also make completely "empty" triggers. If you make a choice between 1 trigger giving a unit, and 1 that gives nothing, just leave the second trigger without trigger effects.

You still specifcy both triggers in the random trigger. Then it will cause either 1 unit to appear, or zilch (when it decided to fire the "empty" one) :)
terminator
Field Marshal - Gustav
Field Marshal - Gustav
Posts: 6115
Joined: Mon Aug 15, 2011 12:48 pm
Location: the land of freedom

Re: How do I assign random appearance chance?

Post by terminator »

bebro wrote: Mon Feb 11, 2019 9:10 am You can also make completely "empty" triggers. If you make a choice between 1 trigger giving a unit, and 1 that gives nothing, just leave the second trigger without trigger effects.

You still specifcy both triggers in the random trigger. Then it will cause either 1 unit to appear, or zilch (when it decided to fire the "empty" one) :)
Why do we need to create completely "empty" triggers ? This technique I use works well :

Screenshot 147.jpg
Screenshot 147.jpg (206.63 KiB) Viewed 1703 times
Post Reply

Return to “Order of Battle : World War II - Scenario Design”