playMaker

Author Topic: Random Position For GameObject + Timer  (Read 1379 times)

Jones

  • Playmaker Newbie
  • *
  • Posts: 7
Random Position For GameObject + Timer
« on: January 05, 2020, 08:54:46 AM »
Hey guys, I just started studying the Playmaker and I really like it. I want to do a small project and I'm faced with an idea that I can't solve.  I really need some help. There are many objects in the scene, each object has a random time of existence when the time of existence ends, the object is destroyed.  Along with this, there is common game time, a timer.  What do I need in the end? I need to implement in a way that after time has elapsed, another game object (crystal on screenshot) appears on the surface of one of the remaining objects (any, random). For example, after 5 minutes, another object is created on the surface of one of the remaining objects (any, random). How can I better implement the binding of the created object to the list of all remaining objects?  Is there some kind of action, in the properties of which you can write a list of objects on the surface of which it can appear? As far as I have understood for the beginning all necessary objects should be placed in an array. I will be glad to receive any help. Thank you in advance!






« Last Edit: January 05, 2020, 03:16:09 PM by Jones »

heavygunner

  • Sr. Member
  • ****
  • Posts: 344
Re: Random Position For GameObject + Timer
« Reply #1 on: January 06, 2020, 04:13:39 PM »
I couldn't understand your requirements. What you did and what you need to do ?

1.If you wanna destroy an object after random time, Simply use Wait/Random Wait action. Once Wait is over destroy it.

2. For common time, Use Countdown Timer action from Ecosystem browser.

Jones

  • Playmaker Newbie
  • *
  • Posts: 7
Re: Random Position For GameObject + Timer
« Reply #2 on: January 06, 2020, 05:24:07 PM »
Thank you for the answer, I've dealt with it, now it's more important for me to understand it... "I need to implement in a way that after time has elapsed, another game object (crystal on screenshot) appears on the surface of one of the remaining objects (any, random)."

Athin

  • Full Member
  • ***
  • Posts: 163
Re: Random Position For GameObject + Timer
« Reply #3 on: January 06, 2020, 09:50:00 PM »
Heya,

This should be a fairly easy set up for you. What you can do is have each surface added to an array (preset or by playmaker actions depending on what you need).  The crystal can have a timer on it counting down. once it finishes counting, have it pick a random object in the array (there is a action just for this I believe but forget what its exactly called off hand). With this set up, you can add/remove surfaces as you want from the array for them to have a chance for the crystal to spawn on.

Jones

  • Playmaker Newbie
  • *
  • Posts: 7
Re: Random Position For GameObject + Timer
« Reply #4 on: January 08, 2020, 09:12:15 AM »
Heya,

This should be a fairly easy set up for you. What you can do is have each surface added to an array (preset or by playmaker actions depending on what you need).  The crystal can have a timer on it counting down. once it finishes counting, have it pick a random object in the array (there is a action just for this I believe but forget what its exactly called off hand). With this set up, you can add/remove surfaces as you want from the array for them to have a chance for the crystal to spawn on.
Thank you very much for the answer, I created a post a little higher with a problem that comes from this one, 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.