A
AutoLiMax
Guest
Hi, I'm stuck on a little bit of script.
What I'm trying to create is a script that says something along the lines of:
"if the object at this location is not obj_ocean then do something".
I have a parent object named "obj_parentTerrain" and the obj_ocean object is a child of the parent.
This is a section of the script from the destroy event:
For some reason the line "if instUp != obj_ocean" isn't working. scr_autoTile(); runs on the obj_ocean object when it shouldn't.
Does anyone have any insight?
Thanks!
What I'm trying to create is a script that says something along the lines of:
"if the object at this location is not obj_ocean then do something".
I have a parent object named "obj_parentTerrain" and the obj_ocean object is a child of the parent.
This is a section of the script from the destroy event:
Code:
spriteSize = 32;
instUp = instance_place(x, y-spriteSize, obj_parentTerrain);
if instUp != obj_ocean
{
with (instUp)
{
image_index = scr_autoTile();
}
}
Does anyone have any insight?
Thanks!