Stick Page Forums Archive

Making Another Sniper Game

Started by: AsSeenOnTV | Replies: 55 | Views: 2,536

Scarecrow
2

Posts: 9,168
Joined: Oct 2005
Rep: 10

View Profile
Jan 17, 2010 4:53 AM #537566
Quote from AsSeenOnTV
My brain just melted and drained out of my ears.

This is what I've been trying before, why doesn't it work?
http://www.truploader.com/uploads/634363flashelp.png


what do you want it to do?

my code doesn't have anything to do with the aiming or anything, it just makes it so that you can't shoot a target for 100/[game framerate] seconds after firing


also, it looks like you're trying to apply button script to a movieclip, which won't work. also, if you're trying to make your cursor in to a button, you won't be able to shoot anything that's covered by the cursor. you can only click one button at a time and you'll be making sure that that button is your cursor every time.

what's the instance name of that there "symbol 8"?
AsSeenOnTV
2

Posts: 989
Joined: Dec 2008
Rep: 10

View Profile
Jan 17, 2010 4:57 AM #537571
I'm just trying to make the aimer jump when you shoot. It's such a simple idea, but so challenging.
Scarecrow
2

Posts: 9,168
Joined: Oct 2005
Rep: 10

View Profile
Jan 17, 2010 5:00 AM #537573
have you got msn?

i'll have a look at your whole flash file if you like
Arch-Angel
2

Posts: 9,496
Joined: Jan 2007
Rep: 10

View Profile
Jan 17, 2010 5:22 AM #537583
I would say come up with a way where when you click, the cursor goes into an animation where it does the kickback as well, but while it's doind the kickback, it doesn't have the clickable feature to it.

Also work on your hit test, I could barely click on the stick figures :/ I would get about one or two in an entire run.
Scarecrow
2

Posts: 9,168
Joined: Oct 2005
Rep: 10

View Profile
Jan 17, 2010 5:38 AM #537588
var clickListener:Object = new Object();
clickListener.onMouseDown = function () {
_root.symbol8.play();
};
Mouse.addListener(clickListener);


man
AsSeenOnTV
2

Posts: 989
Joined: Dec 2008
Rep: 10

View Profile
Jan 17, 2010 5:41 AM #537590
Quote from Scarecrow
have you got msn?

i'll have a look at your whole flash file if you like

I have AIM. AsSeenOnTV9.
I'm on quite a bit and I'll be home all day tomorrow.
Here's the latest http://www.truploader.com/view/248769
Criticize on what you wish and thanks for the help.
zer0gravity
2

Posts: 490
Joined: Oct 2009
Rep: 10

View Profile
Jan 17, 2010 10:50 AM #537636
I was thinking... how could you fix this... it came to me.

give the aim/scope thing an instance name and then on the frame make a link to it. like this

onMouseDown = function () {
_root.aim.play();
};


onMouseDown = function () {

making it recognise that a click is a function

_root.aim.play();

making a link to your modified cursor, and putting play after it will make it play (the modified corsor has an instance name of aim)

};

closing the action




anyways... AsSeenOnTv, I gave you a download link to make it more clear

EDIT: just looked at scarecrows last code and its pretty much the same, just mines simplified and explained =)
zer0gravity
2

Posts: 490
Joined: Oct 2009
Rep: 10

View Profile
Jan 17, 2010 11:41 PM #537869
New post cos I need help... when my question is answered ill take it away.

arch-angle or scarecrow, PLEASE HELP

I made an enemy and he walks across the screen because I put in a tween and made him into a movie clip that has him walking inside of it... when you click him he falls over but he keeps moving because of the tween... how can I stop the tween when he is clicked?
AsSeenOnTV
2

Posts: 989
Joined: Dec 2008
Rep: 10

View Profile
Jan 17, 2010 11:50 PM #537874
I have the same question. It would be better for me to figure this out for myself, but I need to know too.

Update!
Making a nice game, can't get the buttons to even function, you can pick up the knife, the end.
http://www.truploader.com/view/604413
Tortuga
2

Posts: 548
Joined: Sep 2009
Rep: 10

View Profile
Jan 18, 2010 12:04 AM #537881
Wow, when he picks up the knife that looks really good but is there a reason you make your games wobbly?
Vendetta

Posts: 1,238
Joined: Oct 2009
Rep: 10

View Profile
Jan 18, 2010 12:09 AM #537883
Pazzaz .
zer0gravity
2

Posts: 490
Joined: Oct 2009
Rep: 10

View Profile
Jan 18, 2010 12:10 AM #537884
its his style ^_^
RUiN
2

Posts: 930
Joined: Jul 2007
Rep: 10

View Profile
Jan 18, 2010 12:58 AM #537901
Everyone know's wobbly's the new sexy.
Scarecrow
2

Posts: 9,168
Joined: Oct 2005
Rep: 10

View Profile
Jan 18, 2010 1:18 AM #537914
Quote from AsSeenOnTV
I have AIM. AsSeenOnTV9.
I'm on quite a bit and I'll be home all day tomorrow.
Here's the latest http://www.truploader.com/view/248769
Criticize on what you wish and thanks for the help.


i made some changes, and i commented everything i made adjustments to

works the way you wanted it to now, plus the added functionality of a cooldown time between shots is available

still somewhat inefficient because you used buttons, but it works.

swf:
http://www.truploader.com/view/383855

fla:
http://www.truploader.com/view/227799


[EDIT]

made code much more efficient. you can also adjust the number of buttons in the code without having to go through changing numbers for lines and lines of it - all you have to do is change "numberofbuttons"

NEW fla:

http://www.truploader.com/view/463771
AsSeenOnTV
2

Posts: 989
Joined: Dec 2008
Rep: 10

View Profile
Jan 18, 2010 2:24 AM #537944
Sorry, Scarecrow. I found a better way to do it before you posted
Swf: http://www.truploader.com/view/210872
Fla: http://www.truploader.com/view/790162
Website Version: 1.0.4
© 2025 Max Games. All rights reserved.