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

115 37132
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

button is on frame 657
mcMain is on 51

Voidcrystal
offline
Voidcrystal
138 posts
Nomad

hello? :S

AbnormalIdiot
offline
AbnormalIdiot
110 posts
Nomad

Oh, I think I got it now, You need to have mcMain on the frame with the shop, but it needs to be invisible or hidden under it. And in the EnterFrame function put:

if(_root.shop._visible == false)
{
//insert the rest of the enterFrame code here
}

Voidcrystal
offline
Voidcrystal
138 posts
Nomad

Well when i do it, the script think it's 2 different persons :/

AbnormalIdiot
offline
AbnormalIdiot
110 posts
Nomad

huh?

Voidcrystal
offline
Voidcrystal
138 posts
Nomad

yeah the things that changes on the char in 657 frame does not effect him in 51 :S

AbnormalIdiot
offline
AbnormalIdiot
110 posts
Nomad

Oh. This might be difficult since it seems like you have a different instance of mcMain in each frame. Do you want your character to be able to move?

Voidcrystal
offline
Voidcrystal
138 posts
Nomad

yep

Voidcrystal
offline
Voidcrystal
138 posts
Nomad

it alrdy does

AbnormalIdiot
offline
AbnormalIdiot
110 posts
Nomad

Ok I think I know how to do this, make a layer for only your character (if you haven't already) and make every frame in that layer part of one keyframe, instead of several keyframes. This way you will have one instance of mcMain for the whole game. Now it should work.

Voidcrystal
offline
Voidcrystal
138 posts
Nomad

Cool! I'll try

Voidcrystal
offline
Voidcrystal
138 posts
Nomad

when i click the button he gets it visible, so far so good... But when i click start his attached stuff gets invisible again :S

AbnormalIdiot
offline
AbnormalIdiot
110 posts
Nomad

Isn't it good that it stays invisible except for the one gun that you want to be visible?

Voidcrystal
offline
Voidcrystal
138 posts
Nomad

Can we ask a pro :P? Maybe we can make a new thread and ask one, because it does not look that any pro but you is reading this thread :/

Voidcrystal
offline
Voidcrystal
138 posts
Nomad

What do you mean it's good, i want the hair i selected to be at frame 51 :P

Showing 76-90 of 115