playMaker

Author Topic: How to create a chain reaction of objects lighting up?  (Read 2076 times)

frogwise

  • Playmaker Newbie
  • *
  • Posts: 49
How to create a chain reaction of objects lighting up?
« on: April 25, 2015, 07:00:50 PM »
Hey all! First post here.

So what I'd like to do is have a "flower" bloom when my player is near it. This is easy enough by setting a larger trigger and listening for a trigger event. However, with a "field" of flowers, what I'd like to happen is that if you trigger a flower's bloom at the edge of the field, the flowers surrounding that one will bloom, then the ones surrounding those will bloom etc, creating a chain reaction.

I am trying to come up with some playmaker logic but cant seem to get it to work. Any ideas?

Thanks so much in advance.

sebaslive

  • Hero Member
  • *****
  • Posts: 572
    • Frame Tale Studios
Re: How to create a chain reaction of objects lighting up?
« Reply #1 on: April 25, 2015, 07:51:31 PM »
How about a ray caddy that if it detects a flower next to it it will send an event to that flower to bloom, and then that one will send a ray caddy and look for another to bloom and so on.
All my VR games use Steam VR Playmaker Toolkit: http://u3d.as/u20
And Oculus Touch Playmaker Toolkit: http://u3d.as/QT5


Follow me @sebasRez

frogwise

  • Playmaker Newbie
  • *
  • Posts: 49
Re: How to create a chain reaction of objects lighting up?
« Reply #2 on: April 25, 2015, 07:56:28 PM »
Pardon my ignorance, but what is a ray caddy?

I'm using the triggers on the indidual flowers to test for the player entering, but it sounds like you're suggesting I shouldn't use the triggers to detect bloomed nearby flowers?

frogwise

  • Playmaker Newbie
  • *
  • Posts: 49
Re: How to create a chain reaction of objects lighting up?
« Reply #3 on: April 26, 2015, 05:07:28 PM »
Any other ideas? I am also doing this for mobile. Would the raycast method be too expensive?

sebaslive

  • Hero Member
  • *****
  • Posts: 572
    • Frame Tale Studios
Re: How to create a chain reaction of objects lighting up?
« Reply #4 on: April 27, 2015, 03:27:40 PM »
Sorry, meant raycast. I think my phone thought it was a typo.
-You can have a manager that sets it on a timer to go down its children one by one and bloom.
-A trigger event idea would be to have an invisible cube that is the width of the screen slowly go across the field and touch each flower to have it bloom on impact.
-You can try the raycast system and check the profiler to see if it is costing too much.

I guess it depends on the trigger system for blooming.


All my VR games use Steam VR Playmaker Toolkit: http://u3d.as/u20
And Oculus Touch Playmaker Toolkit: http://u3d.as/QT5


Follow me @sebasRez