F
FadedSketch
Guest
I'm currently working on a Point & Click adventure type game, and in need of some help. I'm trying to get the player to 'hold' an item overhead, meaning, I need the collided instance of said object to have the same x and y of the player. I hope I'm making sense. And need any other instances of the same object to NOT follow overhead, but stay in their places.
Here's the object's info:
(btw 'Girl' is the player object, 'Object' is the item I want the player to hold. )
I've tried doing it a few other ways, but given the same result. Any advice you guys could give me? Any and all is appreciated. If you need more info than I've given, just ask and I'll do my best to give sufficient info! ^^
Here's the object's info:
(btw 'Girl' is the player object, 'Object' is the item I want the player to hold. )
Code:
Information about object: Object
Sprite: spr_Object
Solid: false
Visible: true
Depth: -9
Persistent: false
Parent:
Children:
Mask:
No Physics Object
Step Event:
execute code:
if (place_meeting(x, y, Girl))
{
if (global.has_item = true)
{
x = Girl.x;
y = Girl.y - 16;
}
}
Collision Event with object Girl:
execute code:
//Set Has_Item accordingly.
if (global.has_item = false)
{
global.has_item = true;
}