WalkTo Interactions(solved)

Started by Construed, Sun 29/12/2013 21:02:04

Previous topic - Next topic

Construed

Does anyone know if there is a way to use the WalkTo function for all interactions gamewide with the EmodeWait feature?
I felt sorry for myself because I had no shoes.
Then I met the man with no feet.

Dualnames

You mean be able to walk to objects and characters the same way you walk to hotspots?
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

Construed

Yes, It seems unrealistic to click things and have a reaction from across the screen, yet there must be a better way that doing walktox,y a thousand times?
I felt sorry for myself because I had no shoes.
Then I met the man with no feet.

Khris

You can calculate an appropriate position. Pretty straightforward for characters, and for objects the center is at x = object.X + Game.SpriteWidth[object.Graphic] / 2;

Now you have the position of the object / character. The next step is to find a suitable location near them with a reachable walkable area. Or just make the game walk to x, y + 10, that's a pretty good rule of thumb. (Avoid this if the player character is clickable, I hate having to move out of the way to click an object after trying to do something to it.)

To actually implement this, use GetLocationType and the .GetAtScreenXY functions in on_mouse_click().

Construed

I felt sorry for myself because I had no shoes.
Then I met the man with no feet.

SMF spam blocked by CleanTalk