playMaker

Author Topic: How do I turn off clone creation?[SOLVED]  (Read 285 times)

Jones

  • Playmaker Newbie
  • *
  • Posts: 7
    • View Profile
How do I turn off clone creation?[SOLVED]
« on: January 06, 2020, 11:11:27 AM »
How do I turn off clone creation?

Sorry about the stupid question, I'm new to the playmaker.  I have a group of objects in an array and one object that randomly selects an object from an array and appears on its surface, but the object continues to clone itself until it is created on each object of the array, I need only one random creating.

« Last Edit: January 13, 2020, 12:52:17 AM by jeanfabre »

Athin

  • Full Member
  • ***
  • Posts: 130
    • View Profile
Re: How do I turn off clone creation?
« Reply #1 on: January 06, 2020, 07:56:37 PM »
Heya,

Sounds like you have it looping through the array but I can't see exactly what is going on in the pictures.  Can you take a snap shot of each state with the actions as well as the array the objects are stored in so I can help with the exact problem?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14963
  • Official Playmaker Support
    • View Profile
Re: How do I turn off clone creation?
« Reply #2 on: January 07, 2020, 02:15:53 AM »
Hi,

 also, can you take pixel perfect screenshots, here I can't really see anything.

Bye,

 Jean

Jones

  • Playmaker Newbie
  • *
  • Posts: 7
    • View Profile
Re: How do I turn off clone creation?
« Reply #3 on: January 08, 2020, 06:57:05 AM »
Hi,

 also, can you take pixel perfect screenshots, here I can't really see anything.

Bye,

 Jean

Here are screenshots of the status of the state. When I add the required objects to an array, and select the array as the source for another object to appear, I start to have clones of the object in the scene ... but I need to have one object.
« Last Edit: January 08, 2020, 07:14:40 AM by Jones »

Farwest

  • Beta Group
  • Junior Playmaker
  • *
  • Posts: 54
    • View Profile
Re: How do I turn off clone creation?
« Reply #4 on: January 08, 2020, 07:12:23 AM »
I suggest separating Array Get Random and Create Object actions.

State2: Array Get Random
State3 (transition from State2): Create Object. This way it should pick only one variable randomly from your Array, then you create it.

Otherwise, it seems all the array is looping when both actions are within same state.

Jones

  • Playmaker Newbie
  • *
  • Posts: 7
    • View Profile
Re: How do I turn off clone creation?
« Reply #5 on: January 08, 2020, 07:50:05 AM »
I suggest separating Array Get Random and Create Object actions.

State2: Array Get Random
State3 (transition from State2): Create Object. This way it should pick only one variable randomly from your Array, then you create it.

Otherwise, it seems all the array is looping when both actions are within same state.
I did, but the object keeps cloning itself... Maybe I'm setting the properties of the state wrong?
« Last Edit: January 08, 2020, 08:01:59 AM by Jones »

Athin

  • Full Member
  • ***
  • Posts: 130
    • View Profile
Re: How do I turn off clone creation?
« Reply #6 on: January 08, 2020, 09:29:05 PM »
Heya,

I'm still unsure of your issue with the screen shots but I can see you have 5 errors happening.  Unity does some very odd things once you get a red error.  As soon as I get one red error I stop and try to fix it.  Anything that breaks after the red error may not be real. (A bug of a bug type thing)

From what I can see though I feel your logic is off as well perhaps?  Never showed us what happens in State 1 but State 2 has a finish event that links to nothing (1 red error).  Also you are creating the object first and then you're grabbing the random object to spawn on.  Actions go in order from top to bottom so you'll want to first find the spot you want the object to spawn and then spawn the object to that location.

Try cleaning up the States with that and see if you can make it work otherwise come on back with more snapshots of each state so I can help more.


Jones

  • Playmaker Newbie
  • *
  • Posts: 7
    • View Profile
Re: How do I turn off clone creation?
« Reply #7 on: January 09, 2020, 04:53:08 AM »
Heya,

I'm still unsure of your issue with the screen shots but I can see you have 5 errors happening.  Unity does some very odd things once you get a red error.  As soon as I get one red error I stop and try to fix it.  Anything that breaks after the red error may not be real. (A bug of a bug type thing)

From what I can see though I feel your logic is off as well perhaps?  Never showed us what happens in State 1 but State 2 has a finish event that links to nothing (1 red error).  Also you are creating the object first and then you're grabbing the random object to spawn on.  Actions go in order from top to bottom so you'll want to first find the spot you want the object to spawn and then spawn the object to that location.

Try cleaning up the States with that and see if you can make it work otherwise come on back with more snapshots of each state so I can help more.
Thank you, I've already figured it out, I've solved it with a get random child.