playMaker

Author Topic: Create 40+ objects & then parent them to 1 gameobject (easy way?)  (Read 2066 times)

4ppleseed

  • Full Member
  • ***
  • Posts: 226
Hi,

I'm currently creating a gameobject (prefab1) and then storing it as a gameobject variable and then setting it's parent to an empty game object - to collect them all in the same place. I'm doing this one by one and it's taking forever! Any way to speed this up?  :o

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: Create 40+ objects & then parent them to 1 gameobject (easy way?)
« Reply #1 on: March 08, 2014, 01:19:34 PM »
Yeah, use a loop to repeat the actions for each object.

Check out PlaymakerSamples\TestLab\Spawning\SpawnGrid for an example. Note, in that sample you can set the delay on Grid Maker to 0 and all the objects will be made in one frame.

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Create 40+ objects & then parent them to 1 gameobject (easy way?)
« Reply #2 on: March 08, 2014, 01:34:40 PM »
I did a Match game quick example that does the loop iterations until completion. It's not perfect but might help you get the idea.

http://hutonggames.com/playmakerforum/index.php?topic=4025.0

Just scroll down in the first post and hit the download on Matchup.

Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

4ppleseed

  • Full Member
  • ***
  • Posts: 226
Re: Create 40+ objects & then parent them to 1 gameobject (easy way?)
« Reply #3 on: March 09, 2014, 05:48:38 PM »
Thanks guys - I'll try it out :D