Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Reply
 
Thread Tools Display Modes
How to make intelligent AI and a better firing system
Old
Forsaken
Junior Member
 
Status: Offline
Posts: 4
Join Date: Feb 2012
Default How to make intelligent AI and a better firing system - 02-28-2012, 08:21 AM

I have to make a Alice game for school, and I wanted it to be a FPS/Zombie survival. (Overused, I know...) I'm having some trouble making the zombies face me and move towards me. I followed sfunk's tutorial, but the zombie now follows me everytime I turn left or right and I cannot get him out of the camera's view. Also, I was wondering how to make the shooting methods in Resident Penguin?
   
Reply With Quote
Old
x2495iiii
Super Moderator
 
x2495iiii's Avatar
 
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
Default 02-28-2012, 10:06 AM

How fast is the zombie? It needs to move towards the penguin and turn to face the penguin constantly, but it needs to be moving slower than the penguin if you don't want the penguin to be smothered when it catches up to it.

As for shooting, which pieces did you need?

There's the targeting system, which highlights the zombies red

The actual firing of the gun, which is just animation

Then there's the behind the scenes stuff, which checks to see what zombie you hit, tips the zombie over, gives you points, etc


(')>
   
Reply With Quote
Old
Forsaken
Junior Member
 
Status: Offline
Posts: 4
Join Date: Feb 2012
Default 02-28-2012, 06:12 PM

The zombie is slower than the player right now. However, I set the zombie to follow cube 1, which follows cube 2, which follows the camera. So every time I try and move, the zombie moves with me/the camera. So it's never out of view. (You can't turn around and run). And by firing system I meant how you(or actually, Alice) were able to see which zombies were hit. I was playing your game, and every time I clicked, I saw the firing animation, but how would you know whether the gun was facing zombie 1 or zombie 2 when it fired so that the correct zombie would die?
   
Reply With Quote
Old
x2495iiii
Super Moderator
 
x2495iiii's Avatar
 
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
Default 02-28-2012, 09:41 PM

Okay, so why did you vehicle the zombie to anything? He can be vehicled to the world, then just turn to face the penguin and move forward a small amount at the time with a duration of 0 seconds.

As for the target checking, what I did was I used no bullet object at all, but instead calculated if the penguin was aiming at a zombie, then highlighted that zombie red if he was. Then I made a method that, when the gun was fired, checked to see if any of the zombies were red, and acted accordingly.

Would you like me to write an example? I can do that, but there are problems with the system. For example, you'll need to think of a way to handle more than one zombie in range of the bullet. I handled it by prioritizing the targets (i.e. if zombie 1 is in range, turn red, else if zombie 2 is in range, etc.). The problem is that he won't target the closest zombie most of the time with this system.


(')>
   
Reply With Quote
Old
Forsaken
Junior Member
 
Status: Offline
Posts: 4
Join Date: Feb 2012
Default 02-29-2012, 07:13 AM

Yes, I would greatly appreciate it if you could write an example. And as for the closest zombie problem, I can find some way to work around that. Also, as for the zombie-vehicle thing, it works with one zombie, but when I try to create a list of zombies as a variable and did "For all together", it doesn't work. I've attached my in progress game below, I'd appreciate it if you could look at it and tell me what was wrong.
Attached Files
File Type: a2w FPSGame.a2w (5.77 MB, 15 views)

Last edited by Forsaken; 02-29-2012 at 07:55 AM.
   
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2019, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.