playMaker
Home
Store
Showcase
Tutorials
Forums
Manual
Wiki
About Us
Playmaker Forum
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Playmaker 1.9.1 Released!
Home
Help
Search
Login
Register
Playmaker Forum
»
PlayMaker Help & Tips
»
PlayMaker Help
»
Instantiating random prefab's[SOLVED]
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: Instantiating random prefab's[SOLVED] (Read 2810 times)
kinetiknz
Junior Playmaker
Posts: 85
Instantiating random prefab's[SOLVED]
«
on:
January 17, 2015, 11:12:08 PM »
Hi there, at a set time I am looking to create/instantiate a prefab based on a pool of prefabs I have created. They have the tag 'wave' on them and I am currently doing this>
1 - get position - spawn location position storage for later
2 - get random object - using the tag filter 'wave' and store it
3 - create stored object object at the location from 1
I think the problem is the get random object.. I'm assuming it only has access to the scene and not the project? I would rather not have all of the prefabs loaded into the scene and use tricks to activate them when needed.
Is there a clean workaround for instantiating random prefabs?
«
Last Edit: January 19, 2015, 02:48:19 AM by jeanfabre
»
Logged
kinetiknz
Junior Playmaker
Posts: 85
Re: Instantiating random prefab's
«
Reply #1 on:
January 17, 2015, 11:15:35 PM »
I just had an idea which may work, but is inelegant.
I could generate a random number and switch through to 10 nodes creating prefab's specifically.
This will probably work, but it means 20 branches for 20 prefabs..
Logged
Lane
Administrator
Hero Member
Posts: 2511
Mender of the past
Re: Instantiating random prefab's
«
Reply #2 on:
January 17, 2015, 11:32:07 PM »
Try
Select Random Game Object
where you can choose from prefabs, etc.
Logged
Products by Cleverous
||
Vault Core
: Database
||
Vault Inventory
: Multiplayer Inventory
||
Vault Attributes
: Character Stats
||
That Hurt!
: Dmg Floaties
||
Quinn
: 3D
kinetiknz
Junior Playmaker
Posts: 85
Re: Instantiating random prefab's
«
Reply #3 on:
January 18, 2015, 01:13:26 AM »
Thankyou. Worked a treat.
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
Playmaker Forum
»
PlayMaker Help & Tips
»
PlayMaker Help
»
Instantiating random prefab's[SOLVED]