Alice Community  

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

Reply
 
Thread Tools Display Modes
How do I make my enemy die?
Old
crick_head
Guest
 
Status:
Posts: n/a
Default How do I make my enemy die? - 08-13-2008, 12:26 PM

I'm a beginner with Alice just testing it out for a camp I work at... I'm trying to create a small project where I have a Snowman who throws snowballs that kill these sun enemies. I've tried multiple methods, and I've gotten it so my enemy does die, but then no matter where i shot, my enemy would always die. Now i've tried a different method which I think should work but it does not. So, I've uploaded my project in hopes that someone can tell me what I've done wrong and how to fix it.

Snowman World.a2w
   
Reply With Quote
Old
DrJim
Guest
 
Status:
Posts: n/a
Default 08-13-2008, 04:59 PM

I'm afraid this is just a case of the program doing what you tell it to do instead of what you want it to. (If you ever overcome that problem, let me know and we'll both be richer than Bill Gates. )

Also, with so many events - and no comments at all - it is difficult to understand what you're actually trying to do. Maybe the attached will help - it seems to be a little closer to what you want. The things I changed were to only fire one shot at a time - it's easier to see what happens on each shot - and to change the distance before the sun disappeared.

I think the last may be the real problem - too small and you always miss - too large and the sun always dies when the snowman gets anywhere close.

I suggest you go back a step and write out what you want to do in storyboard/pseudo code form - and make sure exactly what conditions make the sun disappear.

If things still don't seem to work - you might try moving the collision test to a method instead of an event. The exact time events get evaluated is, for all practical purposes, indeterminate - a fact that can cause problems for while statements. Haven't heard of it being a problem with the "when" event - but also haven't used it much.
Attached Files
File Type: a2w ModSW.a2w (552.7 KB, 106 views)
   
Reply With Quote
Old
crick_head
Guest
 
Status:
Posts: n/a
Default 08-13-2008, 05:40 PM

alright thanks, i think i have a better idea now about how things work in alice, i'll post back if i encounter any more problems.
   
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.