-
Help with setting variables
I'm making a simple game and i wanna know how id make it so that when i click on a key (and make it dissapear by moving it's frame up by one, movie clip) and then click on the keyhole on a box it will change frames and appear to have opened
right now, if you click on the keyhole before getting the key it says "get the key first" but when i get the key it still keeps saying that
here in the code i have on the keyhole:
on (release) {
if (_root.lockedbox1 = 0) {
with (this) {
gotoAndStop(3);
}
} else {
with (this) {
play();
}
}
}
and this is what i have on the key:
on (release) {
lockedbox1 = 0;
with (key1) {
play();
}
}
can anyone help?
-
bump
sorry guys, but i really need help with this!
-
FK's Geezer Mod
Try changing this line:
if (_root.lockedbox1 = 0) {
To this:
if (_root.lockedbox1 == 0) {
-
I LOVE YOU
im such an idiot! im a c++ programmer and i forgot that if you did "if locked = 0" that im actually SETTING locked TO 0...ugh
thanks soooo much
-
Always do the same mistake, your not the only itiot
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|