Page 1 of 1

moveto avoid only on rectangle, any workarounds?

PostPosted: Sat Dec 01, 2007 3:12 pm
by G.o.D
Hello,

i am trying to make a point&click adventure like control. so what i have is a player, that on mouseclick should walk towards to mouse coordinates avoiding stuff standing around in the room.

i tried to achieve this, by making a 'walk-map' where i just made every area where the player should not walk on visible, whereas all areas where the player can walk on are transparent. my plan was now, to make a event on the player with move to, mouse position, avoid walk map. but the problem is, avoid is ignoring transparency/collision, it just sees the whole walk map as one rectange to avoid.

so what i would need is a 'avoid with correct collision detection' or as alternative to tell the player to avoid a group of actors of different sizes, which i then would spread around everywhere the player is not allowed to walk.

i have not found anything how to do this, except clone a 'walk' map object 20-30 or even more times per screen, but this is not useful as you have to set them all to transparent and position them. a lot of work (for every screen) for a thing that could be achieved in a single step if collision detection would work on avoid

is there any way to achieve such a behaviour, or are there tutorials which just use a completely other way to achieve a point&click adventure control?

thanx in advance

Re: moveto avoid only on rectangle, any workarounds?

PostPosted: Sat Dec 01, 2007 7:09 pm
by speckford123
hey i dont know much about avoid, but maybe this would help.
instead of clones an alternative is to use tiles which are fast and easy.
hell still avoid it and you can transparent the whole thing at once.
if you need something else, the forums will be glad to help.

Re: moveto avoid only on rectangle, any workarounds?

PostPosted: Sun Dec 02, 2007 7:18 am
by G.o.D
great, this works, thank you very much