Alice Community  

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

Reply
 
Thread Tools Display Modes
What am i doing wrong??
Old
Cyberbemon
Guest
 
Status:
Posts: n/a
Unhappy What am i doing wrong?? - 11-23-2009, 05:33 PM

helllo guys..i'm making an FPS using alice for my project..(which is due this friday )!!...i've gt the camera movement..and everything else..except..shooting part...

i use an if/else statement
so it goes like this

Code:
if bullet is within 0.5 metre of zombie
            zombie set opacity 0%
the problem is its nt wrking...i'll post a scrnshot of the code...

HTML Code:
http://yfrog.com/0446231940j

as u can see this only works for 1 zombie!!..my game has bout 30 zombies n 20 wolfs hw will i make it wrk for all of them??(ie no matter which one i shoot thaey all die!!)...and hw will i programme all the zombies to move towards the player!! do i have to do it individually for all of them??..i know some here has madde a resident pengiun game (sry i frgt ur username..n too lazy to look it up )....could u help me with it??...

thank you!!..
   
Reply With Quote
Old
lanceA
Guest
 
Status:
Posts: n/a
Default 11-23-2009, 07:25 PM

...and you're too lazy to look up the name of the person who made the penguin game, but you are asking for help on an assignment due this Friday?? What's wrong with this picture?

Sorry but I can't help you.
   
Reply With Quote
Old
Cyberbemon
Guest
 
Status:
Posts: n/a
Default 11-24-2009, 08:23 AM

Quote:
Originally Posted by lanceA View Post
...and you're too lazy to look up the name of the person who made the penguin game, but you are asking for help on an assignment due this Friday?? What's wrong with this picture?

Sorry but I can't help you.
yes i was too lazy to look up the name while posting this!!..and have genuine reasons for nt doing the assisgnment....gt any problem with that??..neways his name is x2495iiii ....i didn't say thr is smth wrng with the picture...i posted it thr to show thats hw i did it...!!..i'm not asking to do the enitre assignment for me!..i gt stuck in a part..and couldn't figure it out..so i posted it here..if u can't help...jus bugger off!!...

i thought the users were frndly...n helpful!!!...
   
Reply With Quote
Old
jediaction
Senior Member
 
jediaction's Avatar
 
Status: Offline
Posts: 5,064
Join Date: Jul 2009
Location: Bel Air, Maryland
Default 11-24-2009, 12:39 PM

First, you tell the zombies to turn to face camera "loop infanite" then move toward something abouve the cameras heaed, so the zombies down mvoe into the ground, then put a while something is true for EVERY SINGLE ZOMBIE AND WOLF so when the bullet is within 1 meter of zombie 1, or zombie 2, etc. Tell them to dissapear and move down 5000 meters, that is exactly how to do it.


Website: www.salokingames.com
FaceBook: www.facebook.com/SalokinGames
   
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-24-2009, 12:56 PM

Well, lanceA does have a few points. First, my name's something that really would only take you three twitches of your finger to find out. Second, you're posting in some kind of punctuation-saturated 1337-English-hybrid. Please stop that and post in plain, easily readable English.

Now, since you asked about a specific concept of your world, I can tell you what to do.

First, your if/else if statement should go inside an infinite loop so that your world is constantly checking to see if the bullet has hit the zombie.

Second, it'll need to run through the entire list of enemies to see WHICH one it hit. You could try using a "For all in order" statement with some lists of your enemies, but I seem to remember that generating an error for me when I was making Resident Penguin. The safest (but most tedious) approach is to make on of those if/else if statements for each one of your enemies and throw them all in a do together.

Third, to make the zombies move towards the player, you ARE, unfortunately, going to have to do it individually for all of them. You could make it simple, though, like I did, and have them turn to face the player, then while they're alive, keep moving forward. If your player moves though (unlike the Penguin, he just turns), you'll need to have them keep turning to face the player so they're chasing him.

Important Final Note: having 20 wolves and 30 zombies will probably put too much of a strain on your world in the long run. With that many enemies, you probably won't get a very good game going, however you're welcome to try. There's a reason why I only used 10 zombies in my game, though.

Hope your game turns out nicely.


(')>
   
Reply With Quote
Old
jediaction
Senior Member
 
jediaction's Avatar
 
Status: Offline
Posts: 5,064
Join Date: Jul 2009
Location: Bel Air, Maryland
Default 11-24-2009, 01:02 PM

Hope my help and x2495iiii's help was helpful too


Website: www.salokingames.com
FaceBook: www.facebook.com/SalokinGames
   
Reply With Quote
Old
Cyberbemon
Guest
 
Status:
Posts: n/a
Default 11-24-2009, 02:42 PM

Quote:
Originally Posted by x2495iiii View Post
Well, lanceA does have a few points. First, my name's something that really would only take you three twitches of your finger to find out. Second, you're posting in some kind of punctuation-saturated 1337-English-hybrid. Please stop that and post in plain, easily readable English.

Now, since you asked about a specific concept of your world, I can tell you what to do.

First, your if/else if statement should go inside an infinite loop so that your world is constantly checking to see if the bullet has hit the zombie.

Second, it'll need to run through the entire list of enemies to see WHICH one it hit. You could try using a "For all in order" statement with some lists of your enemies, but I seem to remember that generating an error for me when I was making Resident Penguin. The safest (but most tedious) approach is to make on of those if/else if statements for each one of your enemies and throw them all in a do together.

Third, to make the zombies move towards the player, you ARE, unfortunately, going to have to do it individually for all of them. You could make it simple, though, like I did, and have them turn to face the player, then while they're alive, keep moving forward. If your player moves though (unlike the Penguin, he just turns), you'll need to have them keep turning to face the player so they're chasing him.

Important Final Note: having 20 wolves and 30 zombies will probably put too much of a strain on your world in the long run. With that many enemies, you probably won't get a very good game going, however you're welcome to try. There's a reason why I only used 10 zombies in my game, though.

Hope your game turns out nicely.

first thing thanks a billion!!.yes i know i write in a wierd way but i'm working on it.the reason why i couldn't get your name was because
1. i posted this thread at about 12.30 in the night.
2. i was very tired and was frustrated (Alice kept crashing for no reason!!)
3. i just wanted a solution ASAP.

i'm sorry if i sounded a bit rude!.

thank you jediaction and x2495iiii(is this your fav no.??) for your help!!
   
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-24-2009, 02:47 PM

No problem.

Actually, there's a weird story to my username, but let's just say that I like having a username that I know NO ONE else will pick, so it's always open.


(')>
   
Reply With Quote
Old
Cyberbemon
Guest
 
Status:
Posts: n/a
Default 11-24-2009, 03:09 PM

ohk i'm having a tiny problem.i got the part where no matter which zombie the bullet hit they die.but after that if i press the fire button it won't fire the bullet.(i had to restart each time and try a different zombie).it won't allow me to continue!!..
   
Reply With Quote
Old
jediaction
Senior Member
 
jediaction's Avatar
 
Status: Offline
Posts: 5,064
Join Date: Jul 2009
Location: Bel Air, Maryland
Default 11-24-2009, 03:12 PM

Your welcome, ask me if you have any problems, i could help


Website: www.salokingames.com
FaceBook: www.facebook.com/SalokinGames
   
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 ©2023, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.