playMaker

Author Topic: How to "RePlay" all components of the GameObject upon ReActivation?[SOLVED]  (Read 1111 times)

Neikke

  • Full Member
  • ***
  • Posts: 134
Hey guys,

how do I force replaying all of the components/scripts that are on the gameobject when object is ReActivated after being DeActivated by the action?

I have a few objects in a scene that I just Activate and Deactivate from time to time, and each time they're getting ReActivated - I want them to perform everything they do when I'm entering Runtime. Is it possible?
« Last Edit: June 17, 2019, 04:14:11 AM by jeanfabre »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7614
    • jinxtergames
Re: How to "RePlay" all components of the GameObject upon ReActivation?
« Reply #1 on: June 15, 2019, 08:19:27 AM »
Hi.
Disabling/enabling fsms/game objects will restart the fsm (unless changed in the fsm settings)

but it will not refresh its values.

to do this use set int/float/etc Value. @ the 1st state and set the default values there.

Neikke

  • Full Member
  • ***
  • Posts: 134
Re: How to "RePlay" all components of the GameObject upon ReActivation?
« Reply #2 on: June 16, 2019, 03:16:43 AM »
This sounds good! 👍 Thanks for this info!