The Enchanted Cave 2
Delve into a strange cave with a seemingly endless supply of treasure, strategically choos
4.39 / 5.00 38,635 ViewsGhostbusters B.I.P.
COMPLETE edition of the interactive "choose next panel" comic
4.09 / 5.00 15,161 ViewsI'm making a game and I need a code that places a lock over a button if the the kills are't high enough. In the lock movie clip I have these actions
onClipEvent(enterFrame){
if(kills < 10){
this._x = US._x;
this._y = US._y;
}
}
And on the frame I have this
stop();
kills = 0;
What am I doing wrong?
onClipEvent(enterFrame){
if(kills < 10){
this._x = US._x;
this._y = US._y;
}
}
try changeing the if to:
if(_root.kills <10){
At 5/4/09 04:20 PM, AwesomeIam wrote: I'm making a game and I need a code that places a lock over a button if the the kills are't high enough. In the lock movie clip I have these actions
onClipEvent(enterFrame){
if(kills < 10){
this._x = US._x;
this._y = US._y;
}
}
And on the frame I have this
stop();
kills = 0;
What am I doing wrong?
The MovieClip does not see the variable in the main frame. You need to make it a global variable, which is not usually recommended because it slows the program down if it is big. But instead of kills = 0 put...
_global.kills = 0
Put that on the frame, and also in the if statement. (of course without the = sign though, you know)
_global.kills The Game
At 5/4/09 04:33 PM, wasup12 wrote:
The MovieClip does not see the variable in the main frame. You need to make it a global variable, which is not usually recommended because it slows the program down if it is big. But instead of kills = 0 put...
_global.kills = 0
Put that on the frame, and also in the if statement. (of course without the = sign though, you know)
_global.kills
I tried that and I also tired ColdLogics method. Even a combinations of the two. It just doesn't seem to work... = [
no no no! Wait wait! I figured it out! Thanks guys.
No... you don't put _root. in front of a variable, I am sure of that, try just _global.kills
The Game
At 5/4/09 04:53 PM, wasup12 wrote: No... you don't put _root. in front of a variable, I am sure of that, try just _global.kills
No, it's _root.
I've tested it, it works.
hurray for me! now i have to drink a beer.
At 5/4/09 04:54 PM, 4urentertainment wrote:At 5/4/09 04:53 PM, wasup12 wrote: No... you don't put _root. in front of a variable, I am sure of that, try just _global.killsNo, it's _root.
I've tested it, it works.
Really? By golly now I can properly define global variables! lol
var speedGuy:Number = 3;
Cheers.
The Game