Newgrounds.com — Everything, By Everyone.

Checking login status…

USERNAME:

PASSWORD:

Logging in…

Logged in as:
.
Logging out…
Inbox My Account Log Out


Forum Topic: 1st person shooter view.

(196 views • 18 replies)

This topic is 1 page long.

<< < > >>
None

mechias3

Reply To Post Reply & Quote

Posted at: 7/20/08 04:01 PM

mechias3 NEUTRAL LEVEL 04

Sign-Up: 03/28/07

Posts: 135

Is there a way to get flash to move sort of like halo? Where the mouse is always in the middle of the screen and when you move the mouse, the view rotates. I kind of want to do the same thing, but with an airplane game. Where, if you move the mouse right, everything besides your cockpit moves to the left, as your plane goes right. Could someone help me out here?


None

ZealousZephyr

Reply To Post Reply & Quote

Posted at: 7/20/08 05:27 PM

ZealousZephyr NEUTRAL LEVEL 04

Sign-Up: 07/05/08

Posts: 141

That's because it is in 3D. And 3D in Flash is not easy and laggy(if there is a lot of 3D objects). I suggest you start with something simpler(assuming this is your first game).


None

mechias3

Reply To Post Reply & Quote

Posted at: 7/20/08 05:40 PM

mechias3 NEUTRAL LEVEL 04

Sign-Up: 03/28/07

Posts: 135

At 7/20/08 05:27 PM, ZealousZephyr wrote: That's because it is in 3D. And 3D in Flash is not easy and laggy(if there is a lot of 3D objects). I suggest you start with something simpler(assuming this is your first game).

Well, actually, i know that halo is 3-d, and flash is 2-D. I just want everything else to scroll in the opposite direction of the mouse. Let's say there's a building. If you move your mouse Left, then the building would move right. That's what i'm trying to do. If I can do that, then it's total pwnage game, here I come.


None

Wurmy

Reply To Post Reply & Quote

Posted at: 7/20/08 05:42 PM

Wurmy EVIL LEVEL 23

Sign-Up: 06/20/06

Posts: 1,802

At 7/20/08 05:40 PM, mechias3 wrote: Well, actually, i know that halo is 3-d, and flash is 2-D. I just want everything else to scroll in the opposite direction of the mouse. Let's say there's a building. If you move your mouse Left, then the building would move right. That's what i'm trying to do. If I can do that, then it's total pwnage game, here I come.

If you can't do that there won't be any pwnage game.. what you're asking for is very simple :/

hai guyz


None

Suomenkauhu

Reply To Post Reply & Quote

Posted at: 7/20/08 05:46 PM

Suomenkauhu DARK LEVEL 05

Sign-Up: 01/20/07

Posts: 10

Search from the forums, I bet that someone has allready wrote a concluson for that.


None

mechias3

Reply To Post Reply & Quote

Posted at: 7/20/08 05:46 PM

mechias3 NEUTRAL LEVEL 04

Sign-Up: 03/28/07

Posts: 135

Well, I'm mainly a graphics guy, but I'm learning actionscript. Could you please with sugar on top give me the actionscript to do so, or tell me how to do it? Or both?


None

Wurmy

Reply To Post Reply & Quote

Posted at: 7/20/08 05:49 PM

Wurmy EVIL LEVEL 23

Sign-Up: 06/20/06

Posts: 1,802

At 7/20/08 05:46 PM, mechias3 wrote: Well, I'm mainly a graphics guy, but I'm learning actionscript. Could you please with sugar on top give me the actionscript to do so, or tell me how to do it? Or both?

No. If you want to know how, then learn actionscript. What you're doing now is NOT learning how to AS, but just asking other people to AS for you.

If you really want to learn how to AS then google some basic AS tutorials, and learn from the beginning. Start off by making small ( I MEAN SMALL ) games. No really, don't make your first game some super pwnage whatever game because it won't be a super pwnage whatever game.

hai guyz


None

Vorlek

Reply To Post Reply & Quote

Posted at: 7/20/08 05:52 PM

Vorlek LIGHT LEVEL 17

Sign-Up: 12/26/05

Posts: 280

At 7/20/08 04:01 PM, mechias3 wrote: Where the mouse is always in the middle of the screen

You cant control where the mouse goes in flash, and 3d shooters arnt basic things to do, whoever said that.


None

mechias3

Reply To Post Reply & Quote

Posted at: 7/20/08 06:00 PM

mechias3 NEUTRAL LEVEL 04

Sign-Up: 03/28/07

Posts: 135

To wurmy. I am learning actionscript, I can do a bit, but I'm just confused here. And when I'm confused, I ask questions to solve them.

Anyway, I just want to know how to make the background move right when you move the mouse left. It's like having a normal mouse (which is the background), move in the opposite direction as your REAL mouse.


None

Superuberman69

Reply To Post Reply & Quote

Posted at: 7/20/08 06:07 PM

Superuberman69 LIGHT LEVEL 03

Sign-Up: 09/23/07

Posts: 39

he wants his bg to do similar things to sniper games (cant think of any right now

My Sig is Better Than Yours.


None

Vorlek

Reply To Post Reply & Quote

Posted at: 7/20/08 06:10 PM

Vorlek LIGHT LEVEL 17

Sign-Up: 12/26/05

Posts: 280

ah, i know what you are on about now. Sorta like this: http://www.camperstrike.co.uk/bs_play.ph p
Il post again hopefully explaining how to do it if this is what your looking for


None

gankro

Reply To Post Reply & Quote

Posted at: 7/20/08 06:14 PM

gankro EVIL LEVEL 11

Sign-Up: 09/16/06

Posts: 1,136

put everything you want to move into an mc and give it an instance name of "stuff", adjust it so the registration point is at the center of the screen and in the middle of the mc. then put this code on teh frame:

onEnterFrame = function(){
stuff._x = -_xmouse
}

My Coding Portfolio (updated frequently)
If you stay in bed for long enough it will be socially acceptable to go to bed again

BBS Signature

None

mechias3

Reply To Post Reply & Quote

Posted at: 7/20/08 06:26 PM

mechias3 NEUTRAL LEVEL 04

Sign-Up: 03/28/07

Posts: 135

nevermind, i'm doing it a simpler way.


None

Vorlek

Reply To Post Reply & Quote

Posted at: 7/20/08 06:29 PM

Vorlek LIGHT LEVEL 17

Sign-Up: 12/26/05

Posts: 280

For the gun add this code to your gun and it should move across the screen, with your mouse, but it wont move all the way up the screen.

onClipEvent (load)
{
ymovement = this._y;
gunheight = this._height;
}
onClipEvent (enterFrame)
{
this._x = _root._xmouse;
this._y = _root._ymouse / 600 * gunheight + ymovement;
}

None

Glaiel-Gamer

Reply To Post Reply & Quote

Posted at: 7/20/08 06:39 PM

Glaiel-Gamer NEUTRAL LEVEL 26

Sign-Up: 12/28/04

Posts: 6,959

There's no way to lock the mouse using just actionscript.


None

Vorlek

Reply To Post Reply & Quote

Posted at: 7/20/08 06:43 PM

Vorlek LIGHT LEVEL 17

Sign-Up: 12/26/05

Posts: 280

And for the background: Just add this onto your frame actions

this.onEnterFrame = function() {
background._x = scene._x-(scene._x+_xmouse);
background._y = scene._y-(scene._y+_ymouse);
};

the instance name for the background is background obviously


Happy

mechias3

Reply To Post Reply & Quote

Posted at: 7/20/08 06:51 PM

mechias3 NEUTRAL LEVEL 04

Sign-Up: 03/28/07

Posts: 135

I've found a better way to do this. For example, if I went down with the actionscript I was thinking of, it would look like crap because it wouldn't seem like it was looking down, because if the parts only slide, then it's going to look like i'm lowering. Instead, I made the ship fly through a course, and you control the guns, so you shoot planes as they come by. Or, rather, i'm GOING to make it like that.


None

Vorlek

Reply To Post Reply & Quote

Posted at: 7/20/08 06:52 PM

Vorlek LIGHT LEVEL 17

Sign-Up: 12/26/05

Posts: 280

Ah, so you were looking for a rail shooter kind of thing, ok, then, good luck with your game


None

mechias3

Reply To Post Reply & Quote

Posted at: 7/20/08 07:01 PM

mechias3 NEUTRAL LEVEL 04

Sign-Up: 03/28/07

Posts: 135

Thanks, I'd show a screenshot of what I have so far, if I knew how.


All times are Eastern Daylight Time (GMT -4) | Current Time: 11:37 PM

<< Back

This topic is 1 page long.

<< < > >>
You need a Grounds Gold Account to post on the NG BBS! If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!