youd think more people would post here.anyway i tried to make a "turret"out of the arm of a stick figure thats holding a gun.but it doesnt work because no matter how i convert it into an mc it always puts the cursor at the shoulder.any ideas?
youd think more people would post here.anyway i tried to make a "turret"out of the arm of a stick figure thats holding a gun.but it doesnt work because no matter how i convert it into an mc it always puts the cursor at the shoulder.any ideas?
The turret tracks my mouse, but for some reason won't shoot. Why is this?
Is there any way to modify this script to make the gun follow a movie clip?
I'm using it for a cannon in a game i'm making with Taro Nuke
At 7/24/06 02:46 AM, Hoeloe wrote: Is there any way to modify this script to make the gun follow a movie clip?
I'm using it for a cannon in a game i'm making with Taro Nuke
switch all the _xmouse and _ymouse 's for movieclip._x and movieclip._y
!PLEASE RESPOND!
The hittest that was posted before worked, but i want (_x,_y,true) hittest but it wont work. Help me.
how do I make enemys come out randomly from the sides
My gun had dislexia, my mouse is in a totally different positon than the tip of my gun, therefor, the bullet comes out of the handle =(
Denvish, the world needs you.
What if I wanted to make a walking dude that holds said turret?
Is it possible to make the bullet to hit something like a enemy? then how?
My gun is inside a movieclip that you can control and move..
Hoever, the gun does not follow the mouse? Can anyone fix this problem?
The gun just goes crazy and spins in completely oposites directions ect..
At 10/3/06 03:05 AM, Claytron wrote: My gun is inside a movieclip that you can control and move..
Hoever, the gun does not follow the mouse? Can anyone fix this problem?
The gun just goes crazy and spins in completely oposites directions ect..
Ive got the same problem, if you change: _rotation = int((radAngle*360
to _rotation = int((radAngle*720
Then its better it spins around half way not just a quarter, however putting it up any more makes it really hard to control.
If anyone can find a better fix then please help.
Maybe it's a little late... when the turret is in an MC change this:
Xd =_root._xmouse-_x; //Get _x distance from gun to mouse
Yd =_root._ymouse-_y; //Get _y distance from gun to mouse
into this:
Xd =_parent._xmouse-_x; //Get _x distance from gun to mouse
Yd =_parent._ymouse-_y; //Get _y distance from gun to mouse
Now it's following correctly but i couldn't get it to fire... :(
Hey i got your action script too work and everything, but wheres a tutorial that will show me how to make them explode or die when I hit an emeny with the bullets and possibly add points to my score.
just make the person a movie movie clip.
one the first frame have a button with them on it and the as to be
stop();
on the button put
on (release){
gotoAndPlay(2);
}
then make 2-whatever
the person dyiing a horrible blood filled death
I want my bullets to kill with hit.test and its not working can you help me with that?
Denvish,now that you made this how about making one about enemies?I mean what if some people(like me) wan't to make enemies?I suggest you do it.
Yeah and I need the bullets able to kill enemies too.You know what I mean:shoot bullet at enemie,enemie dies.Help me out here.
At 10/29/06 04:42 PM, Kaneyedoit wrote: Denvish,now that you made this how about making one about enemies?I mean what if some people(like me) wan't to make enemies?I suggest you do it.
You'll be lucky to find Denvish much around here now :( Plus, AS: Main is not being expanded anymore. And, there's already a tutorial on that :)
At 10/21/06 07:33 PM, sherbert2 wrote: Hey i got your action script too work and everything, but wheres a tutorial that will show me how to make them explode or die when I hit an emeny with the bullets and possibly add points to my score.
Ditto.
Denvish how do you get the hit Test to work in the bullet MC.I tried but it won't work.Need help some one look at this and help me.
At 9/6/05 04:54 PM, liaaaam wrote: Click me plz
How did you get the platformer to scroll!?!?
TO SOLVE EVERYBODY'S PROBLEMS:
- Turrets inside MCs screwed up:
Change MC coordinates to global coordinates. Look it up in Flash Help.
- Tracks mouse perfectly but faces wrong direction:
Turret needs to face UP.
- Turret doesn't rotate on center:
MCs rotate on the REGISTRATION POINT, which is the little black + in them. You have to move the entire MC graphic to center on the +.
- Turret is screwed up:
Make sure you copied the rotate to mouse bit PERFECTLY.
-Turret doesn't shoot:
Check that the instance name of the turret is "gun" without quotes, the bullet is "bullet" without quotes, and make sure you got ALL the code in the RIGHT place.
duh.
I hope you're going to spend some time actually understanding the code, rather than just copy/pasting it...
It's gonna be changed a lot but.............
how could I do this
_root.onKeyDown=function(){
and tell it to use the (0) key?
I love this code and however there is one problem that I had. I want the bullets to start their path at the end of the gun barrel. What I did was make the tip of my cannon into a movie clip which i gave the instance name "barrel", then i changed the starting bullet coordinates to _root.gun.barrel._x and _root.gun.barrel._y .. however the bullets will not show up when I do this. I suspect it has something to do with global vs MC coordinates, but I am not sure how to fix this? anyone know how?
At 9/6/05 05:05 PM, Denvish wrote:At 9/6/05 05:03 PM, T-H wrote: What does int() do ? I've never used it.Converts up or down to nearest integer.
There's a Math. function that does the same thing, I think, but I prefer int().... less to type, cos I'm a lazy bastard.
I believe it's the Math.rint() function.
E.G.: var someVar:int = Math.rint(2.336);