Alice Community  

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

Reply
 
Thread Tools Display Modes
(FPS game) Mobs and hit detection problems
Old
TheTerran
Junior Member
 
Status: Offline
Posts: 2
Join Date: Oct 2012
Question (FPS game) Mobs and hit detection problems - 11-29-2012, 08:06 PM

Hello everyone, I need help for my FPS project.
My questions are as follows:


1. How do you create many duplicates of mobs and have one set of code govern them all? I do not wish to have to individually program every single mob in the game, so this is important...

2. This game uses the A key to shoot, and I have attempted to use a box that quickly moves forward and back quickly as the function which carries out damage to anything that is comes in contact with, but it seems that the proximity If/then statement couldn't detect that damage value fast enough. Is there a solution for this?

3. Is it possible to put all the mobs in a list and have them all respond to a damage value individually as you shoot at them? Alice doesnt seem to have that function...

4. is it possible to create a simple AI to govern all the mobs to avoid collision with buildings?


Thank you for reading all this, I appreciate it!
Attached Files
File Type: a2w FPSFinal.a2w (1.99 MB, 17 views)

Last edited by TheTerran; 11-29-2012 at 08:17 PM.
   
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 11-29-2012, 08:47 PM

All those problems can be fixed, but it's somewhat complicated.

1. AI for mobs can be done with well-coded methods and the use of parameters, though you'll still need an event for every enemy you add (to support simultaneous execution). This can be simplified by attaching the event to the object itself, then when the event is complete, duplicating the object, which will duplicate the event as well.

2. Either the collision checker isn't run enough times, or the threshhold is too small. First, make sure the collision method is run constantly, as long as the bullet is in play, then try making the number larger. be careful, as larger numbers mean a greater chance for a hit registered for near misses.

3. My old RP4 prototype had an example of individual damage values for similar enemies. Subparts included, even.

4. Same as the first: parameters for identical objects. As long as each enemy is a duplicate of the same object (e.g. a horde of zombies that are all duplicates of the zombie object), they can all be passed in as object parameters to a method that deals with them all individually, but can deal with them all simultaneously and uniformly as needed. In fact, if the actions are simple enough (e.g. disappear, move forward, spin around), the objects don't even have to be duplicates.

Clear as mud, right?


(')>
   
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 ©2017, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.