ForumsProgramming Forum[Need Help] Attaching movie clips (my weapons).. etc

115 37130
Voidcrystal
offline
Voidcrystal
138 posts
Nomad

Hello!

1.I need help with some scripting that i can't really do, i need to attach my weapon to the character, i have made the weapon and i can rotate it and here is the script:

onClipEvent (enterFrame) {

_rotation = ((Math.atan2(_root._ymouse-_y,_root._xmouse-_x)/(Math.PI/180))+90)
}

2.I would also like to make the buttons 1, 2, 3, 4, 5 as weapon buttons, as an example: 1: glock, 2: uzi, 3: mp5, 4: Sniper, 5. bazooka. But i don't want the people to have them all at the beginning, i want them to buy them for kills at the end of the level.

3. How do i make my enemies have more hp or less hp? And how to make the the weapons shoot faster and slower, more dmg and lesser dmg.

I know this is kinda much but this is all the things i don't really understand atm, thanks for reading and if you can help, please do.

  • 115 Replies
Voidcrystal
offline
Voidcrystal
138 posts
Nomad

and where is the class script?
Where is it so i can put the script in there ^^?

AbnormalIdiot
offline
AbnormalIdiot
110 posts
Nomad

Right click on mcMain in the library, click properties, check the box labelled export for Action Script, set the class name to mcMain. Then press ctrl + n and select actionScript file then put in that code.

Voidcrystal
offline
Voidcrystal
138 posts
Nomad

Classes may only be defined in external ActionScript 2.0 class scripts. WHERE? :S

AbnormalIdiot
offline
AbnormalIdiot
110 posts
Nomad

Where did you put that code?

Voidcrystal
offline
Voidcrystal
138 posts
Nomad

ahh i see thx, but do i have to create a new flash document o.O?

Voidcrystal
offline
Voidcrystal
138 posts
Nomad

and how do i connect that script to my flash docu :S?

AbnormalIdiot
offline
AbnormalIdiot
110 posts
Nomad

If you have both open and saved into the same folder it will do it automatically if you have the mcMain on the stage. btw when you save it make sure you save it as "mcMain"

Voidcrystal
offline
Voidcrystal
138 posts
Nomad

before you said that i made a flash project and attached my flash to it and i got like 15 errors, when i deleted my fla from the project i still get 15 errors :S!!

AbnormalIdiot
offline
AbnormalIdiot
110 posts
Nomad

huh? did you save them to the same folder?
did you export it, begin the code with, and save it as mcMain (all with same spots capitalized)

Voidcrystal
offline
Voidcrystal
138 posts
Nomad

well i fixed the errors but it is some bugs i have to fix and then i'll do the glock thing :P, for an example: i delete the script on my mcMain but it still does the script i deleted haha

AbnormalIdiot
offline
AbnormalIdiot
110 posts
Nomad

did you save?

Voidcrystal
offline
Voidcrystal
138 posts
Nomad

ahh i found the script, i scripted it in 2 places hihi

Voidcrystal
offline
Voidcrystal
138 posts
Nomad

Ok... Let's begin with the scripting again

Voidcrystal
offline
Voidcrystal
138 posts
Nomad

mcMain.as: Line 16: Unexpected '}' encountered
}

Error from ur script :P, btw brb 10 min

AbnormalIdiot
offline
AbnormalIdiot
110 posts
Nomad

Sorry, delete the last line.

Showing 46-60 of 115