Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Swamp Witch on Sat 17/09/2005 04:51:26

Title: Can't move object and drag & drop
Post by: Swamp Witch on Sat 17/09/2005 04:51:26
Move Object
I am trying to move an object and it won't move.  I have this:
object[1].Move(98, 77, 4); defined under the "run script" for the interaction.  This is a first person game using two characters.

Drag and Drop
Can someone tell me how to do this with 2.7 code.  I've tried several things and they are not working:

http://www.adventuregamestudio.co.uk/yabb/index.php?topic=14984.0
Title: Re: Can't move object and drag & drop
Post by: Scummbuddy on Sat 17/09/2005 14:12:56
They're not up to 2.7, but hopefully, they'll give some ideas:

Drag and Drop function: http://www.adventuregamestudio.co.uk/yabb/index.php?topic=14984.0

How to Grab and Use Object with Cursor: http://www.adventuregamestudio.co.uk/yabb/index.php?topic=18626.0

How to script click and drag puzzle pieces into place?: http://www.adventuregamestudio.co.uk/yabb/index.php?topic=9963.0
Title: Re: Can't move object and drag & drop
Post by: Swamp Witch on Sat 17/09/2005 16:24:46
Thanks Scummbuddy, I'll take a look at these.

I am curious about this "move" statement though.  It won't work for me.  I unchecked "Enforce object-based scripting" in my general settings and scripted:
MoveObjectDirect (2,77,140,5); and the object moves

If I use:
object[2].Move(77,140,5); for 2.7, the object doesn't move.  I don't get it. 
Title: Re: Can't move object and drag & drop
Post by: Ashen on Sat 17/09/2005 16:53:00
I'd guess, since it works with MoveObjectDirect it's because you're not using walkable areas.
Try:
object[2].Move(77, 140, 5, eNoBlock, eAnywhere);

(Look in the manual for fuller descriptions of the optional parameters.)
Title: Re: Can't move object and drag & drop
Post by: Swamp Witch on Sat 17/09/2005 22:33:00
Ah, the eNoBlock, eAnywhere did it.  Thank you!!!!