L
Linkdeous
Guest
Hello, i'm currently making a game where there is liquids, pump and pipes, but there is going to be a lot of different machines and stuff that may or may not have a internal tank and stuff.
I ask this question becasue i'm making a pump that produce water, and i would need to have a way to find if the instance in the next 4 case (top, bottom, right, left) one have a Tank variable. Is it possible ?
The code (as i don't even know if it's possible) would be like this in theory :
if there is a object on top (return the obj_ asset and name a variable called top accordingly)
{if top have the Tank variable{top.Tank+=5}}
I ask this question becasue i'm making a pump that produce water, and i would need to have a way to find if the instance in the next 4 case (top, bottom, right, left) one have a Tank variable. Is it possible ?
The code (as i don't even know if it's possible) would be like this in theory :
if there is a object on top (return the obj_ asset and name a variable called top accordingly)
{if top have the Tank variable{top.Tank+=5}}