View Full Version : help with damaging a monster
Ghettobird
June 10th, 2006, 05:21 PM
heya can anyone help me with a thing please?
i cant get the "magic" attack hit a monster
thanks :)
fla included: (right Click-> save as)
http://members.lycos.nl/deathlysticks/r3.zip
Ghettobird
June 10th, 2006, 06:44 PM
Srry i had to link it, The .fla is bigger that 74k =(
Joppe
June 10th, 2006, 06:56 PM
Uhm, your zip is corrupt :/
edit: oopsiedoo I downloaded it like you said, i had to copy and paste the link into an new window ;)
on the monster thingy have this
onClipEvent (enterFrame) {
for (var i = 0; i<_root.dep; i++) {
if (_root["attack"+i].hitTest(this)) {
hit = random(30);
_root.monterhealth -= hit;
trace(_root.monsterhealth-=hit);
}
}
}
on rochy
if (Key.isDown(Key.SPACE) && _root.mana>25) {
_root.dep = _root.getNextHighestDepth();
_root.attachMovie("attack", "attack"+_root.dep, _root.dep);
_root["attack"+_root.dep]._x = _root.rochy._x;
//make balls aper at rochy's x and y
_root["attack"+_root.dep]._y = _root.rochy._y;
_root.mana -= 24;
}
and on main frame
_root.mana = 500;
_root.monsterhealth = 100;
Ghettobird
June 11th, 2006, 04:03 AM
it works =D
thanks alot (K)
^^
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.