playMaker

Author Topic: auto generate slides  (Read 2235 times)

Bilz636

  • Playmaker Newbie
  • *
  • Posts: 8
auto generate slides
« on: February 22, 2017, 05:31:39 AM »
HI I need very serious help asap

i want to create a  in-game tutorial  test slider with the help of playmeker.

i want to popup slides random as per value i give.

for example
lets say
i want to see 20 slides on the path (screenshot attach) anywhere and the make distance between each slide 200px for example. then playmaker should auto genrate it for me?

sorry about my poor English but plz help me out


Bilz636

  • Playmaker Newbie
  • *
  • Posts: 8
Re: auto generate slides
« Reply #1 on: February 23, 2017, 01:03:52 AM »
anyone please response??

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: auto generate slides
« Reply #2 on: February 23, 2017, 01:23:45 AM »
Hi,
Maybe so more information would help.

Are these slides on standard positions?

To select a random gameobject you can use the "SelectRandomGameObject"
or you can place the objects in an array and then use array get random

then after the 1st object is placed you could get the position and add 200px.
Then if you want a different radius maybe you can make the object a child of the previous object, then do a random rotate, detach the child and reset the rotation of the previous object.

I am not sure if this is what you mean, i hope it helped you out.

Bilz636

  • Playmaker Newbie
  • *
  • Posts: 8
Re: auto generate slides
« Reply #3 on: February 23, 2017, 01:43:21 AM »
i am trying to create a custom editor inspector

with
Slide (cube)= input (if i enter 20 as input then playmaker auto generate 20 cubes)
Distance = input (its spawning distance between cubes)
countdown timer= input ( user stop to for few secs and in timeout delete that cube)

can anyone please help me?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: auto generate slides
« Reply #4 on: February 23, 2017, 03:56:39 AM »
Hi,

 in PlayMaker, you select a variable and you check "Inspector" and it will then show up in the Unity Inspector, you can then control these values from the inspector directly



 Bye,

 Jean

Bilz636

  • Playmaker Newbie
  • *
  • Posts: 8
Re: auto generate slides
« Reply #5 on: February 24, 2017, 03:21:40 AM »
thx Jean

Now i need
How to spawn gameobject (cube) as value given in inspector
and also each spawning cube should have a distance??

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: auto generate slides
« Reply #6 on: February 24, 2017, 03:28:08 AM »
Hi,

 for this you can now use the custom action "iterate" available on the Ecosystem which will let you go through incremental steps.

Check this tweet, it shows a screencast of an fsm using some form of iteration, in your case it should behave the same with the help of "iterate".


then everytime Iterate gives you the next integaer, create an object, and position it where you want, the distance between them can be done with a mathematical relation with the current index which will space even each object.

 Bye,

 Jean
 Bye,

 Jean

Bilz636

  • Playmaker Newbie
  • *
  • Posts: 8
Re: auto generate slides
« Reply #7 on: February 24, 2017, 03:38:56 AM »
i dont get it
can you plz made a demo prefab and share with me so i can view the whole settings and change according to my needs

sorry i am asking too much

Bilz636

  • Playmaker Newbie
  • *
  • Posts: 8
Re: auto generate slides
« Reply #8 on: February 24, 2017, 06:09:45 AM »
ok i did it almost

now i need a action for get position for "object" not gameobject.
i cant find it
plus please look my screenshot i guess i almost made it