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 variable value from object that collided with me? [SOLVED]
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: Get variable value from object that collided with me? [SOLVED] (Read 1231 times)
NewbNinja
Playmaker Newbie
Posts: 15
Get variable value from object that collided with me? [SOLVED]
«
on:
May 25, 2022, 10:08:02 PM »
I'm trying to get the damage variable from the bullet that collided with me. How would I get the bullet.damage variable and give it to my enemy.damagereceived variable?
Thanks in advance x
«
Last Edit: May 26, 2022, 01:13:06 AM by NewbNinja
»
Logged
NewbNinja
Playmaker Newbie
Posts: 15
Re: Get variable value from object that collided with me?
«
Reply #1 on:
May 26, 2022, 01:12:42 AM »
Figured this out myself too. You pass the GameObject in the trigger event under the setting "Store Collider". This saves the gameobject and you can use the "Get FSM Int" function to specify the game object you saved.
I called mine collider. So I did the following:
Hope this helps someone.
-NewbNinja
Logged
djaydino
Administrator
Hero Member
Posts: 7618
Re: Get variable value from object that collided with me? [SOLVED]
«
Reply #2 on:
May 26, 2022, 10:18:23 AM »
Hi.
Instead of a 'Conditional Expression' you can also use 'Int Compare' .
But this works fine as well
Logged
Join the PlayMaker Discord Channel!
NewbNinja
Playmaker Newbie
Posts: 15
Re: Get variable value from object that collided with me? [SOLVED]
«
Reply #3 on:
May 28, 2022, 02:35:45 PM »
Thanks dude.
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
Playmaker Forum
»
PlayMaker Help & Tips
»
PlayMaker Help
(Moderator:
600
) »
Get variable value from object that collided with me? [SOLVED]