playMaker

Author Topic: Activate/Disable Game Component  (Read 53 times)

Farwest

  • Playmaker Newbie
  • *
  • Posts: 2
    • View Profile
Activate/Disable Game Component
« on: February 10, 2018, 07:37:17 AM »
Hi,
We have Add Component and Destroy Component actions, however we don't have Activate and Disable Component actions.

Details, Where and Why I need to use:
I have a main map and cubes with battle-scenes attached (with trigger). Player moves to battle scenes, fight battles and after it returns to main map again. I use a Persistent Save script that keeps Player transform position before going to a battle-scene. After player finishes that scene and returns to main map scene, cube stays at same place with a trigger. So Player returns to same spot on trigger, which creates loop to re-enter to battle scene. To prevent this, I use 2 triggers (outer and inner), which outer one will disable Persistent Save script and inner one Loads the scene. So when Player returns to Main Map, it spawns on the point which Persistent Save script was disabled at that position.

Currently, I tested this with "Destroy Component" and it works as intended. However, after Player is spawned, it doesn't have the component, so I am unable to save the transform position of the Player anymore. Therefore I need a Activate/Disable Game Component action to solve this issue.

Also "Add Component" action brings the Component with default state, but I need that "Persistent Save script" component with its modified state on inspector, therefore if a future Activate/Disable Component action keeps the component state, that would be wonderful.

Thanks!

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 2657
    • View Profile
    • jinxtergames
Re: Activate/Disable Game Component
« Reply #1 on: February 10, 2018, 05:38:04 PM »
Hi.
You can find a 'Activate Component' (and many more) action on the Ecosystem

Farwest

  • Playmaker Newbie
  • *
  • Posts: 2
    • View Profile
Re: Activate/Disable Game Component
« Reply #2 on: February 17, 2018, 01:19:43 PM »
Thanks, however that isn't the solution I am looking for, because Activate Component action in Ecosystem (and others) don't provide same component slots. Kindly if you can check the image you will understand better:



For example in "Destroy Component" action, we choose Game Object and we are able to select the component attached on it. However the action "Activate Component" in Ecosystem don't have similar slots or feature. This is what I request as Action.

If there is a simple way to reach to a specific attached component in "Activate Component" like we do in "Destroy Component", I will appreciate if you can help me. Thanks.
« Last Edit: February 17, 2018, 01:23:04 PM by Farwest »