Alice Community  

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

Reply
 
Thread Tools Display Modes
Decrementing health?
Old
A.Haak
Guest
 
Status:
Posts: n/a
Default Decrementing health? - 04-25-2009, 05:52 AM

Hi.

I am making a simple FPS game for my class. I want to know how to make it so that one of the monsters has, say, 5 'health' and everytime you shoot it decrements by one. When it hits 0 I want it to change opacity to 0 or do a 'die' method (haven't created it yet). I'm guessing you make a number variable in 'properties' for whatever character you want to do it with but I can't find the decrement value in Alice.

Thanks for any help.

Oh yeah, while i'm posting here I might as well ask another question.

How do I make objects 'solid' so my character (which is the camera, I have just made the camera the vehicle for my gun) does not walk through them like they aren't there? Kind of makes it hard to make sure whoever plays the game doesn't stuff up straight away and throw the whole thing out of whack.
   
Reply With Quote
Old
pingu
Guest
 
Status:
Posts: n/a
Default 04-28-2009, 06:21 PM

i have no idea. but, i do know that there have been numerous posts about this kind of thing. however, i'm not sure that they've all been answered. just have a look and see what you can find, or check with a senior member (like Dr Jim)

pingu
   
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 04-29-2009, 01:34 PM

Simply make the variable under the properties tab, then drag the variable out into your script. A pop-up with 3 options will appear, one of them being decrement variable by 1. Click it and it will appear in the script.


(')>
   
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.