Jump to content

Using a Random Generator to Randomly generate one of 4 objects


Recommended Posts

Posted (edited)

Just trying to wrap my head around the concept - if possible.

Nevermind, After a 3 mile run I figured it out - Just use a random generator to "activate" 1 of 4 objects :dash: 

Edited by JG7_X-Man
  • Like 1
Posted (edited)

Great! I'm not sure if you saw "Example: Spawn an AI Fighter at Random Locations Whenever a Player Enters a Zone" on pg. 112 of the editor manual.

Edited by JimTM
  • Upvote 1
Posted
1 hour ago, JimTM said:

Great! I'm not sure if you saw "Example: Spawn an AI Fighter at Random Locations Whenever a Player Enters a Zone" on pg. 112 of the editor manual.

@JimTM I was just about to edit my post to think you - as I didn't come up with the idea - I saw it on pg. 124 of your manual LOL! Thank you again for that awesome piece of literature! :good:

 

Actually - I do need your help as I only solved have my issue:

 

Thanks to @Sketch  a train randomly placed at mission start at one of six locations at which point it travels from Point A to Point B. When it's destroyed, another one is spawned randomly at one of six locations.

 

What I am trying to do is randomly select the train that will spawn.

 

image.png.56d99c7466dbe16631fb0613dce37865.png

Posted (edited)
2 hours ago, JG7_X-Man said:

@JimTM I was just about to edit my post to think you - as I didn't come up with the idea - I saw it on pg. 124 of your manual LOL! Thank you again for that awesome piece of literature! :good:

 

You're most welcome X-man.

 

2 hours ago, JG7_X-Man said:

 

Actually - I do need your help as I only solved have my issue:

 

Thanks to @Sketch  a train randomly placed at mission start at one of six locations at which point it travels from Point A to Point B. When it's destroyed, another one is spawned randomly at one of six locations.

 

What I am trying to do is randomly select the train that will spawn.

...

 

In the attached simple test mission, a two-way switch spawns a train engine only in one of two places (near one of two buildings I placed to make it easier to spot, but use icons on for the test anyway). You are in an FW190 A3 with a 500 kg bomb and set to unlimited ammo. Destroy the train and it will respawn in two seconds in a randomly selected location. The first train spawns randomly 20 seconds after the mission begins. You'll probably need a few runs to make the train spawn in a different place.

 

JimTM - Test Random Train Spawn.zip

Edited by JimTM
  • Thanks 1
Posted (edited)

[Edit] @JimTM Thank you! I see what you did! I mist have opened the wrong .mis initially.

Edited by JG7_X-Man
  • Upvote 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...