playMaker

Author Topic: [SOLVED] Put on path multiple prefabs / objects, Array  (Read 995 times)

LuminRabbit

  • Full Member
  • ***
  • Posts: 161
  • Lumin Rabbit
[SOLVED] Put on path multiple prefabs / objects, Array
« on: May 10, 2020, 07:27:19 PM »
Hello,

Does anyone know how to set or put multiple prefabs/objects on a DoTween Path? I have an enemy prefab and the path is in the Hierarchy. I'm using DoTween playmaker actions. I'm not sure about how to use the Id's in the Dotween action and am failing thus far :) It doesn't have to be DoTween either as long as I can set multiple enemies on a path id be happy.

I can get one prefab to use a path by using the Get Owner action and saving that as a global variable but to get 2 of the same prefabs to use the same path Im struggling.

Also any updates on the native tweening actions coming in the next update? 

Greatly appreciate any help!
« Last Edit: May 11, 2020, 08:58:23 PM by Kodagames »
Have I said how much I love playmaker!!! This is one amazing tool

LuminRabbit

  • Full Member
  • ***
  • Posts: 161
  • Lumin Rabbit
Re: Put on path multiple prefabs / objects, Array
« Reply #1 on: May 11, 2020, 07:14:37 PM »
Ok, I've decided to dive into Array's :) it took a little figuring out but I believe I'm on the right track!

One of the things I noticed if you create an array variable (which is how you start to create an array (for example game objects)) and have the Inspector check box checked, you can't drag and drop your items into the fields you have to do it from the variable fields anyway...

I'm off to a half decent start (see attachment below), I have an array of  game objects now and am using Array Get Next to loop each game object (which is cool),  in the next state (go to each) I have a DoTween move action (to game object field: eachGate from the first state), again very cool and works smoothly.

Next up, figure out how to incorporate another object to move along this path then after that have different spots for them to line up (social distancing and all lol).
 
« Last Edit: May 11, 2020, 08:57:51 PM by Kodagames »
Have I said how much I love playmaker!!! This is one amazing tool

LuminRabbit

  • Full Member
  • ***
  • Posts: 161
  • Lumin Rabbit
Re: [SOLVED] Put on path multiple prefabs / objects, Array
« Reply #2 on: May 11, 2020, 09:03:16 PM »
OMG! I solved it I did an Array Get Next into an Array Get Next.
There are still a few things to solve and it looks like a tangled mess but it pretty much works.

I don't know how I'll remember how to do this again but it sure is cool to see it working! (screen shot below).
Have I said how much I love playmaker!!! This is one amazing tool