Page 1 of 1

avoid when in motion

PostPosted: Wed Nov 20, 2013 6:20 am
by barney12345
Hello every one
I know I keep on posting that I will make a game of some random type but then a week later I post saying that im working on a new game. So im just going to say it now so I don't continue to blab on, ive started a new game, mainly due to the fact that no one responds to any thing asking for help. So im doubtful that someone will respond to this. Still, here I go. I'm working on a tablet game which has elements similar to tower defence games but is different. Ive got the very basic start in the file which has no proper graphics yet. As you can see when playing though, the bad1 actor won't avoid the wall even though it is set to in move to. Aside from all other things, can anyone see if they can come up with a way to fix it. I will give points to the first response. Thanx in advance

Re: avoid when in motion

PostPosted: Wed Nov 20, 2013 8:20 am
by skydereign
barney12345 wrote:mainly due to the fact that no one responds to any thing asking for help

Really? I know I respond to pretty much every gE related question that is asked (that isn't already answered). I can't create assets for people as I don't have the time though, which I see was your last unanswered post. Anyway, the reason your game is messing up is that the bad1 actor is not set to avoid the wall. This means bad1 will not try to move around it, even though it can't move through the wall actor. In addition to that, the security guard, which it is supposed to avoid, will catch up, and eventually force the bad1 actor to stop moving. So, changing the MoveTo to avoid the wall will help.

Re: avoid when in motion

PostPosted: Wed Nov 20, 2013 8:27 am
by barney12345
the securityguy is meant to catch up, but when I change the bad1 to avoid wall, he still runs right into it. What is wrong now?

Re: avoid when in motion

PostPosted: Wed Nov 20, 2013 8:49 pm
by skydereign
barney12345 wrote:What is wrong now?

Oh, forgot to mention, that is because your wall is a framed region. Wireframes and filled regions aren't avoided by MoveTo. Even tiled actors have problems, so if you really want to use MoveTo you will need to use wall clones.

Re: avoid when in motion

PostPosted: Thu Nov 21, 2013 5:21 am
by barney12345
thanx

Re: avoid when in motion

PostPosted: Thu Nov 21, 2013 5:32 am
by barney12345
Last question then, is it possible to avoid multiple actors(not wire frame regions) with the move to event or must it be coded?

Re: avoid when in motion

PostPosted: Thu Nov 21, 2013 6:11 am
by skydereign
barney12345 wrote:Last question then, is it possible to avoid multiple actors(not wire frame regions) with the move to event or must it be coded?

Easy answer would be no it must be coded, but you can cheat a little to make it work. If for instance you do use a small avoid actor, that you clone to make the walls, you could attach one to the security guards. That way it is still avoiding one actor type, but that actor type attaches to other actors that you want to be avoided. That being said, MoveTo's avoid doesn't really mean avoid like avoiding an enemy. It just means don't go straight through those objects.