The Enchanted Cave 2
Delve into a strange cave with a seemingly endless supply of treasure, strategically choos
4.36 / 5.00 33,851 ViewsGhostbusters B.I.P.
COMPLETE edition of the interactive "choose next panel" comic
4.09 / 5.00 12,195 ViewsWhat my problem is I have a score but I need it to follow the player so it has to be a separate movie clip
but won't affect anything outside of the movie clip (or vice versa) is there anyway to fix this?
My KKK name is Imperial Warrior
My KKK name is Imperial Warrior
We need a more detailed explanation. Draw us a diagram of what you're looking to do, and post your current code.
Perpetually looking for time to return to the arts.
Can code inside a movie clip affect things outside of it
I have a variable and when you touch the object the variable goes up by whatever this works but when I convert the Dynamic Text Box into a movie clip so a code can be applied to it that makes it's x the players x the code that increases the number or says what the number is doesn't work
"Coin Code"
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.score += 1;
unloadMovie(this)
}
} My KKK name is Imperial Warrior
Make your game's vcam visible, and place the HUD items on that. Just make the square's alpha 0.
~1.1
At 12/12/09 01:50 PM, A-star wrote: Make your game's vcam visible, and place the HUD items on that. Just make the square's alpha 0.
I did that first off but it's not that its that as soon as the Text box is in a mc it no longer works
My KKK name is Imperial Warrior
well give the mc an instance name and use _root.movieclipinstancename.textbox
Can you elaborate on what I'm supposed to do with this I have a intermediate knowledge of action script
(probably can't tell from my terrible example "Lone Inavader") but I'm not sure exactly what to do with this.
My KKK name is Imperial Warrior
I think your entire problem is scope, and how movieclips communicate with one another.
A movieClip needs an "address" of the movieClip it needs to talk too, and can only do so one step at a time.
For example, if you have 2x movieClip on the main stage (mc1 and mc2) mc1 could communicate with mc2 through the stage like this:
mc1_.x = _root.mc2_.x; //_root is 1 step away from each.
If you had a 3rd mc (mc3 INSIDE mc2) you could access that from mc1 like this;
mc1._x = _root.mc2.mc3._x;
or from the _root by doing;
variableOnRoot = mc2.mc3._x;
Perpetually looking for time to return to the arts.
I think its pretty much explained but simply this is the way I do it
-If the text box had the var of score and you want it to say 5
_root.score=5;
-If you stuck the text box inside a movie clip with the instance name of "scoreMC"
_root.scoreMC.score=5;
If you want the score to follow the character round the stage say your characters instance name is "hero" put this AS on your scoreMC
onClipEvent (enterFrame) {
if (_root.hero._x>_x) {
_x += 1;
}
if (_root.hero._x<_x) {
_x -= 1;
}
if (_root.hero._y>_y) {
_y += 1;
}
if (_root.hero._y<_y) {
_y -= 1;
}
} ...
_root.scoreMC.score=5;
thanks this was what i was looking for something that would control the DTB inside th MC thanks much
My KKK name is Imperial Warrior
Yup 100% functional thanks much too bad it took almost 2 days!
My KKK name is Imperial Warrior