playMaker

Author Topic: Static game objects [Solved]  (Read 1592 times)

jgalvezpa

  • Junior Playmaker
  • **
  • Posts: 58
Static game objects [Solved]
« on: November 30, 2013, 01:26:10 AM »
Hello how can i put to Static a game object in the FSM, im doing like a freezing effect i put the object to sleep but when they collide to others objects they wake up and i want that.

i want to put them to static so they cannot interact with others objects.
« Last Edit: November 30, 2013, 09:56:15 PM by jgalvezpa »

Breadman

  • Full Member
  • ***
  • Posts: 185
  • Derp
Re: Static game objects
« Reply #1 on: November 30, 2013, 01:45:31 AM »
If I understand correctly, you're trying to create an object that interacts with other objects only during certain time intervals, or events.

If that's true, you could create an FSM attached to the game object where it's "idle" and has no collider component attached (other objects will pass through this object).

When something happens that you want to "wake up" the object, add a state that is triggered by whatever "wakes" it - a character collides with it, maybe. On this event, the FSM would switch to a new state, using the "add component" PlayMaker action. Inside this action, choose "box collider", "mesh collider", or whatever type of collider you need!

When it's time for the object to return to the idle state (perhaps the character stops touching the object, for example), add the "destroy component" action to remove the collider when it returns to the previous state.