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:
Join our
Discord Channel
Home
Help
Search
Login
Register
Playmaker Forum
»
PlayMaker Help & Tips
»
PlayMaker Help
(Moderator:
600
) »
[SOLVED] Pick item randomly from group of prefabs to spawn in scene
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: [SOLVED] Pick item randomly from group of prefabs to spawn in scene (Read 2322 times)
Tack
Playmaker Newbie
Posts: 14
[SOLVED] Pick item randomly from group of prefabs to spawn in scene
«
on:
December 10, 2014, 02:40:09 PM »
Hello everyone!
I'm making a little game that requires a random object to spawn on click. I already have a good sized library of items to pick from to randomly spawn. My problem is that I am having trouble determining a way to use Playmaker to pick a random item from the library to spawn.
This is what I'm hoping to accomplish and what I've completed:
1.Click box to open (Completed)
2.Play opening animation and particle effect on open (Completed)
3.Pick item randomly from group of prefabs and spawn (what I'm hoping to accomplish)
4.Destroy item after a certain amount of time (Pretty sure I know how to do this)
5.Close box on click (Completed)
Thanks for your time!
«
Last Edit: December 17, 2014, 07:01:30 AM by Lane
»
Logged
Lane
Administrator
Hero Member
Posts: 2511
Mender of the past
Re: Pick item randomly from group of prefabs to spawn in scene
«
Reply #1 on:
December 10, 2014, 02:43:28 PM »
Use Select Random Game Object action and list your objects, then use Create Object to spawn the chose random object, then use the Wait action to wait for x seconds, then use Destroy Self to destroy itself.
Logged
Products by Cleverous
||
Vault Core
: Database
||
Vault Inventory
: Multiplayer Inventory
||
Vault Attributes
: Character Stats
||
That Hurt!
: Dmg Floaties
||
Quinn
: 3D
Tack
Playmaker Newbie
Posts: 14
Re: Pick item randomly from group of prefabs to spawn in scene
«
Reply #2 on:
December 10, 2014, 02:48:50 PM »
Wow thank you for the quick reply! I'll try this out as soon as I get home from work and let you know how it goes.
Logged
Tack
Playmaker Newbie
Posts: 14
Re: Pick item randomly from group of prefabs to spawn in scene
«
Reply #3 on:
December 16, 2014, 05:57:27 PM »
I forgot to reply back. It worked like a charm. Thank you very much!
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
Playmaker Forum
»
PlayMaker Help & Tips
»
PlayMaker Help
(Moderator:
600
) »
[SOLVED] Pick item randomly from group of prefabs to spawn in scene