
01-29-2012, 02:05 AM
if you don't want to be able to block and attack at the same time, you will need an if/else statement and two variables(you can do it other ways as well but in this case i'll explain it this way), the best variable to use in this case would probably be a boolean variable. if you are not sure what that is. a boolean variable says whether or not that piece of data is true or false. so for your if/else statement, you would have
"if block == true"
set attack variable to false
do blocking animation
else:
set attack variable to true
What that means is if the "blocking" variable is true, only blocking will be allowed to happen, and for the else section, it means if the "blocking" variable becomes false, it will set your "attack" variable to true allowing to attack but not block.
If you are stuck on a project, check out the tutorials I made here at this link:
http://alice.org/community/showthread.php?p=36778#post36778
There are lots of tutorials on it so far, including some youtube videos, check it out
Or..
Go to my youtube channel to check out my alice 2.2 tutorials I have there..
http://www.youtube.com/user/sfunk1992?feature=mhsn
|