well ive spent most of the afternoon touching up the game i want to create and so far it seems to be going well. however, the weapons! big problem! i have an inventory list and everything is working fine, except for one part.
_root.onEnterFrame = function() {
if (Key.isDown(Key.END)) {
weapon += 1;
_root.currentWeapon = _root.weapons[weapon];
_root.char.attachMovie(_root.currentWeapon, "weapon", 1);
if (weapon>weapons.length) {
_root.currentWeapon = _root.weapons[0];
}
}
if (Key.isDown(Key.HOME)) {
weapon -= 1;
_root.currentWeapon = _root.weapons[weapon];
_root.char.attachMovie(_root.currentWeapon, "weapon", 1);
if (weapon>weapons.length) {
_root.currentWeapon = _root.weapons[0];
}
}
};
now the only thing that doesnt work is the attachMovie. when pressing End or Home i want the gun from the variable to be attached to my main character whos Instance Name is “char”. everything works good apart from this. can anybody help me please? any help much appreciated
~binime