playMaker
Home
Store
Showcase
Tutorials
Forums
Manual
Wiki
About Us
Playmaker Forum
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Join our
Discord Channel
Home
Help
Search
Login
Register
Playmaker Forum
»
PlayMaker Help & Tips
»
PlayMaker Help
(Moderator:
600
) »
Get child action for a variable GameObject?
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: Get child action for a variable GameObject? (Read 733 times)
SawyerK
Junior Playmaker
Posts: 93
Get child action for a variable GameObject?
«
on:
August 16, 2020, 01:06:16 PM »
Hi!
I have an "engine_hinge" that holds the engine of the vehicle. This engine can be taken out and be swapped for another engine. Therefore the "engine_hinge" checks if it has a child and stores this child as an "engine" variable. My only problem with this, is that i have to swap and install the engine gameobject twice for the Get Next Child action to store the new gameobject variable.
Is there a better way to handle this? Because there are a lot of FSM's and variables that have to get this new child gameobject variable when its attached to the "engine_hinge".
Logged
djaydino
Administrator
Hero Member
Posts: 7616
Re: Get child action for a variable GameObject?
«
Reply #1 on:
August 16, 2020, 03:14:46 PM »
Hi.
When you start, have the current engine in the variable 'Current Engine'
To know if there is a engine stored, you can use 'Game Object Is Null'
When you Place a new engine store directly into the 'Current Engine' variable
Logged
Join the PlayMaker Discord Channel!
SawyerK
Junior Playmaker
Posts: 93
Re: Get child action for a variable GameObject?
«
Reply #2 on:
August 16, 2020, 03:50:34 PM »
Thank you!
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
Playmaker Forum
»
PlayMaker Help & Tips
»
PlayMaker Help
(Moderator:
600
) »
Get child action for a variable GameObject?