Alice Community  

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

Reply
 
Thread Tools Display Modes
Making an unlock method
Old
DamonDragon13
Junior Member
 
Status: Offline
Posts: 10
Join Date: Mar 2012
Location: Andrews Farm
Question Making an unlock method - 10-02-2012, 06:28 AM

I am making a game using Alice for my Multimedia Gaming class, and I am making a method that lets you unlock abilities. I have three to unlock, and they are unlocked with experience points that the player can accumulate when they beat an enemy. I have set it so if the button to unlock the ability is clicked on with the mouse it will unlock, and also the experience amount must be 30, but that means the amount of experience would have to be exactly 30, and that is hard to do, because it is quite easy to get more, and will go over 30 easily, so I would like to know how to make it possible that the player can have either 30 or more experience points to unlock the ability.
   
Reply With Quote
Old
arty-fishL
Senior Member
 
arty-fishL's Avatar
 
Status: Offline
Posts: 1,878
Join Date: Mar 2008
Location: In the corner of your eye
Default 10-02-2012, 12:40 PM

I've replied to the other thread regarding those functions you didn't understand; this is a case where you would use them.

rather than:
if (xp == 30) ...
which you have right now, use
if (xp >= 30) ...
instead


█░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█
█░░▓░░░░░░░▓░░░░░░░░░░░▓▓░░▓░░░░░░▓░░░▓░░░░█
█░▓░▓░▓▓▓░▓▓▓░▓░▓░░░░░░▓▒▒░░▒░░▓▓░▓▓▓░▓▒░░░█
█░▓▓▓▒▓▒▒▒░▓▒▒▓▓▓▒▓▓▓░▓▓▓░░▓░░░▓▒▒▓▒▓▒▓▒░░░█
█░▓▒▓▒▓▒░░░▓▓░░▒▓▒░▒▒▒░▓▒▒░▓▓░▓▓▒░▓▒▓▒▓▒░░░█
█░▓▒▓▒░▒░░░░▒▒▓▓▓▒░░░░▓▓▒░░░▒▒░▒▒░░▒░▒▓▓▓░░█
█░░▒░▒░░░░░░░░░▒▒▒░░░░░▒▒░░░░░░░░░░░░░░▒▒▒░█
█░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█

I have mostly moved on from Alice, but may still respond to messages if important [¬º-°]¬
   
Reply With Quote
Old
DamonDragon13
Junior Member
 
Status: Offline
Posts: 10
Join Date: Mar 2012
Location: Andrews Farm
Default 10-02-2012, 04:50 PM

Thank you so much Arty, this helps me a bunch. I have been stuck on this for quite a while, and because I didn't understand the logic methods I didn't know how to do it, so thank you for replying to both of my posts.
   
Reply With Quote
Reply


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