Hi I am back, because of some sad times over the last 2 weeks I did nothing here, but I am back again.
Need Parent from actions and not Invoker, Player or GameObject.
Why? In simple words I need for any actions to point to its parent and not Invoker.
- Because of action reusability. If you do not get what I mean here then I will make a video.
Example 1 (this is how it is done now and why it is not good)
- A door in the scene should open and close on left mouse click
- On the door add a trigger as component and not as child object.
- Add a condition as child object.
- As child of condition add a local variable bool called toggle.
- In condition check toggle bool is false THEN action translate rotation and action toggle bool.
- ELSE toggle bool action and translate rotation again to start.
- In the actions set the target to Invoker.
Now this works as the trigger is the Invoker and is a component of door. But I cannot just copy the condition object with all children to another door as the trigger is on the door object directly.
Example 2 how it should work.
So now instead if I had the trigger and all actions as a child of the door it will not work as the invoker is now the trigger and not the door. So what we need here is in the drop down list instead of Invoker we need Parent. That way this code can be prefabed and reused on other doors as the Trigger, conditions and actions are 1 object as child of door, (door just has a box collider set as trigger)are looking for the parent to rotate and not the invoker which would be trigger..
In simple words I need for any actions to point to its parent and not Invoker.
Customer support service by UserEcho