Alice Community  

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

Reply
 
Thread Tools Display Modes
How do i make it so That The health on my characters last 10 clicks?
Old
Ibanez
Guest
 
Status:
Posts: n/a
Default How do i make it so That The health on my characters last 10 clicks? - 10-26-2010, 12:04 PM

I haveit so if I click on someone it does damage and they have 10 hp. Yet when i click on them in my game they automaticly die.... I need help.
   
Reply With Quote
Old
Snowfir3
Guest
 
Status:
Posts: n/a
Default 10-26-2010, 12:51 PM

post your document

Last edited by Snowfir3; 10-26-2010 at 01:14 PM.
   
Reply With Quote
Old
SirThorfinn
Senior Member
 
SirThorfinn's Avatar
 
Status: Offline
Posts: 232
Join Date: Sep 2010
Location: Some where Unreal!
Default 10-26-2010, 02:38 PM

here's a simple example i posted a little wile ago, hope it helps.
Health test.a2w


/|..__________________/\_
/ `---___________----_____|]-------<BLAM>------>
/_==o;;;;;;;;_______.:/
), ---.(_(__) /
// (..) ), ----"
//___//
//___//

<Youtube Page> (Not much there but maybe something you'll like) http://www.youtube.com/user/SirThorfinn?feature=mhum
<Xbox Live Gamertag> SirThorfinn

-----Friend of Thor-------------------------------------------
-----Spartans NEVER Die------------------------------------
All most anything on SirThorfinn is me... Almost.
   
Reply With Quote
Old
Akira101
Guest
 
Status:
Posts: n/a
Default 10-26-2010, 04:31 PM

I havn't looked at the world above since i was too lazy , and I'm still new and only been programming for about 1-2 monthes so there maybe better answers but... but how about make it the object have 10 health, and when you click them, they lose 1 health, and decrement it by 1 when you click on it, so its takes 10 clicks for it to die. Or if you would like it to be at 100 health and lose say 10 health per click, make it something like this (this isn't the exact code, this is just off memory):

When mouse clicked on "object"
Set "health" value to ((health) - 10)
   
Reply With Quote
Old
Ibanez
Guest
 
Status:
Posts: n/a
Default 10-27-2010, 03:11 PM

This is my game. I have stuff set up if you can please just tell me how i can make it so i have to click the native american 10 times for him to die. and so if the native american hits me he knocks my hp down to 99 and more. Right now its just a 1 hit kill for the native and the native only knocks the cow boys hp down to 99 and no more... Please help
Attached Files
File Type: a2w Western Momma.a2w (18.60 MB, 3 views)
   
Reply With Quote
Old
Ibanez
Guest
 
Status:
Posts: n/a
Default 10-28-2010, 04:31 PM

okay I'm going to be posting my newish version of the world. I got the idian's hp working correctly now its the cowboys. His health just drops all the time once the idian hits him once and its just ugh ive tried many things. Yet when i dont loop his hp going down it doesnt go down right. So i need my cowboys hp to go down a little when the idian comes in contact with him and i want my 3d graphic numbers on the screen to match up with the amount of hp the cow boy has. 900= 90 in 3d graphic. Help please\?
Attached Files
File Type: a2w Western Momma.a2w (18.64 MB, 7 views)
   
Reply With Quote
Old
Akira101
Guest
 
Status:
Posts: n/a
Default 10-28-2010, 04:34 PM

I didn't look at your program yet, since class ends in about 2 mins and takes a long time for the school to process downloads, like 2 min for 15 MB files. But from what you posted, make it health loop like you did, but just make a pause at the end of the loop, say "2 seconds" so theres enough time for the indians arm or attack to be pullin away so it doesn't loop again until the 2 seconds are up. May not be the best answer, but still works, for the most part.
   
Reply With Quote
Old
SirThorfinn
Senior Member
 
SirThorfinn's Avatar
 
Status: Offline
Posts: 232
Join Date: Sep 2010
Location: Some where Unreal!
Default 10-28-2010, 05:19 PM

Quote:
Originally Posted by Ibanez View Post
okay I'm going to be posting my newish version of the world. I got the idian's hp working correctly now its the cowboys. His health just drops all the time once the idian hits him once and its just ugh ive tried many things. Yet when i dont loop his hp going down it doesnt go down right. So i need my cowboys hp to go down a little when the idian comes in contact with him and i want my 3d graphic numbers on the screen to match up with the amount of hp the cow boy has. 900= 90 in 3d graphic. Help please\?
Well one problem i see is here...
Alice 2010-10-28 17-51-39-09.JPG
The 1000 loop with continue to degrade his health until done. I recommended getting rid of the loop and put the decrement by 1 into a If/Else statement and your cowboy.die into one as well. if you create a boolean variable and name it something like "Cowboy dead" and set it to false, you can place it into the true part of your new If/Else statements then create another if/else into the else of the first and drop the cowboys health counter into it and say if its =0. i have some pictures if you get stuck.
1.JPG
Alice 2010-10-28 18-14-21-21.JPG
Please feel free to ask any questions, my explanation might have sucked...


/|..__________________/\_
/ `---___________----_____|]-------<BLAM>------>
/_==o;;;;;;;;_______.:/
), ---.(_(__) /
// (..) ), ----"
//___//
//___//

<Youtube Page> (Not much there but maybe something you'll like) http://www.youtube.com/user/SirThorfinn?feature=mhum
<Xbox Live Gamertag> SirThorfinn

-----Friend of Thor-------------------------------------------
-----Spartans NEVER Die------------------------------------
All most anything on SirThorfinn is me... Almost.
   
Reply With Quote
Old
SirThorfinn
Senior Member
 
SirThorfinn's Avatar
 
Status: Offline
Posts: 232
Join Date: Sep 2010
Location: Some where Unreal!
Default 10-28-2010, 05:20 PM

I'll help you with the counter in a bit i'll be back on in a few...


/|..__________________/\_
/ `---___________----_____|]-------<BLAM>------>
/_==o;;;;;;;;_______.:/
), ---.(_(__) /
// (..) ), ----"
//___//
//___//

<Youtube Page> (Not much there but maybe something you'll like) http://www.youtube.com/user/SirThorfinn?feature=mhum
<Xbox Live Gamertag> SirThorfinn

-----Friend of Thor-------------------------------------------
-----Spartans NEVER Die------------------------------------
All most anything on SirThorfinn is me... Almost.
   
Reply With Quote
Old
jediaction
Senior Member
 
jediaction's Avatar
 
Status: Offline
Posts: 5,064
Join Date: Jul 2009
Location: Bel Air, Maryland
Default 10-29-2010, 08:22 AM

Gosh! Im not sure if you need my help this time. Sorry, mabye i'll just let the others take over.


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