avoid when in motion

Talk about making games.

avoid when in motion

Postby barney12345 » Wed Nov 20, 2013 6:20 am

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
Attachments
mallsecurityipad.zip
(363.11 KiB) Downloaded 139 times
Darth Vader called... he wants his cookies back
User avatar
barney12345
 
Posts: 122
Joined: Wed Nov 07, 2012 6:52 am
Location: A land down under
Score: 4 Give a positive score

Re: avoid when in motion

Postby skydereign » Wed Nov 20, 2013 8:20 am

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.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: avoid when in motion

Postby barney12345 » Wed Nov 20, 2013 8:27 am

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?
Darth Vader called... he wants his cookies back
User avatar
barney12345
 
Posts: 122
Joined: Wed Nov 07, 2012 6:52 am
Location: A land down under
Score: 4 Give a positive score

Re: avoid when in motion

Postby skydereign » Wed Nov 20, 2013 8:49 pm

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.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: avoid when in motion

Postby barney12345 » Thu Nov 21, 2013 5:21 am

thanx
Darth Vader called... he wants his cookies back
User avatar
barney12345
 
Posts: 122
Joined: Wed Nov 07, 2012 6:52 am
Location: A land down under
Score: 4 Give a positive score

Re: avoid when in motion

Postby barney12345 » Thu Nov 21, 2013 5:32 am

Last question then, is it possible to avoid multiple actors(not wire frame regions) with the move to event or must it be coded?
Darth Vader called... he wants his cookies back
User avatar
barney12345
 
Posts: 122
Joined: Wed Nov 07, 2012 6:52 am
Location: A land down under
Score: 4 Give a positive score

Re: avoid when in motion

Postby skydereign » Thu Nov 21, 2013 6:11 am

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.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest