Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Fekix on Fri 28/05/2004 13:24:07

Title: Set walk-to point for objects?
Post by: Fekix on Fri 28/05/2004 13:24:07
I can set walk to points for hotspots but i can't set this for objects (and for characters). I really need this because my character moves to the GetHotspotpointX and Y and GetObjectX and Y but for the Object i can't set the point :(
Title: Re: Set walk-to point for objects?
Post by: strazer on Fri 28/05/2004 13:48:22
Quote from: Pumaman on Sat 03/04/2004 18:43:50Noted. This will probably be implemented with the more generic 'Locations' rather than object-specific walk-to points.
Title: Re: Set walk-to point for objects?
Post by: Fekix on Fri 28/05/2004 14:58:37
sorry i should have used the search fuction  :-[ but maybe the function will now be implanted
Title: Re: Set walk-to point for objects?
Post by: Happyhelmet on Fri 28/05/2004 15:58:44
what you could possibly do is to set an x and a y as a property for each object and then use the GetObjectProperty to tell the character where to walk to. the walkto point for objects would be really useful i agree, but alas i resort to custom scripting each walkto point for each object and character. this way i have better control of what happens, i hope it gets implimented in the future :)
Title: Re: Set walk-to point for objects?
Post by: timmle on Thu 31/07/2008 18:59:06
Could someone please let me know in basic terms how to walk to an object to pick up the object, as at the moment it looks a bit silly just standing there and it disappears. I'm only just starting to create the game and would love it if someone could tell me what scripting if any is necessary to add a walk to point for an object. I want to be able to do this with pretty much every object in the game.

Thankyou.
Title: Re: Set walk-to point for objects?
Post by: Shane 'ProgZmax' Stevens on Fri 01/08/2008 03:54:55
Depending on the name you've given the object, it's simple.

cEgo.Walk(oThing.X,oThing.Y,eBlock,eWalkableAreas) will walk cEgo to object oThing.  After that you can run an animation of cEgo picking it up or just make it disappear.  The key values you need here are the object X and Y properties.  Also, bear in mind that unlike characters, objects have their x/y coordinates relative to the upper left corner of the image so you will want to account for this by adding in an offset.
Title: Re: Set walk-to point for objects?
Post by: TheMagician on Sat 02/08/2008 10:27:54
^^Also, the manual includes a tutorial which explains exactly what you're looking for.