Be a Supporter!
Response to: Pop Enemies, and end with 0 health Posted February 17th, 2009 in Game Development

At 2/17/09 11:30 AM, Dragonberry wrote: Well, I need two things:
Random Enemy Occurences
Well, on the screen, I have like 3 or 4 little "bunkers", let's call them instances

bunker 1-4

. I want the enemy, let's call him instance

McCain

, to at random times, and from random bunkers, come out for let's say 5 seconds.
-and-

Ending The Game When Health Is 0
Well, basically, I need the game to end when the instance

Health

is 0. As for my health, I have it dropping at a base of 5 when the player gets shot.

Thank You in Advance

In terms of timing (5 seconds, random intervals):

AS: Timeout by Inglor
AS: Intervals by Inglor
Just set the interval until McCain appears using (eg) 5000+random(5000); (5-10 seconds) and the time until he disappears again as 5000 (5 seconds)

In terms of the bunker, create McCain at the entrance of _root["bunker"+(random(4)+1)];

In terms of health, if(Health<=0){GAMEOVER();}and create a function GAMEOVER to do whatever you want at endgame

Response to: 15 second flash is over 500MB Posted February 17th, 2009 in Game Development

Most likely scenario is that you have either a massive wav file or several huge bmps imported. Either way, they'll be compressed when you export the swf, see File>Publish Settings>Flash tab > JPEG Quality/Audio Stream/Audio Event to adjust that

If you want to keep the fla size down, import jpeg/gif/png rather than bmp (use Gimp or Paint.NET (free) to edit/export externally), or import mp3 rather than wav - although it'll never loop as well.

Response to: loadMovie help..? Posted February 13th, 2009 in Game Development

Using _root within a loaded swf will refer to the holder swf, you'll need to replace _root.var with this.var or _parent.var within the loaded file

Response to: Alpha not showing... Posted February 13th, 2009 in Game Development

Make sure it isn't hiding behind the original...? Otherwise, dunno without seeing the project file

Response to: The Flash 'Reg' Lounge Posted February 13th, 2009 in Game Development

At 2/12/09 11:58 PM, Johnny wrote: Denvish, Me... in that order, I think... are the old fogies. I'm going to be 30 this year, and Denvish will be 160 or so.

Indeed, my 161st birthday was last month and I now rely on L'Oreal anti-aging bullshit (with pore target technology, ceramide, dermatide, penta-peptides, botocillin, a-zone targetting and various other made-up words) to keep me looking as fresh as a daisy.

Response to: Wrong Language Posted February 13th, 2009 in Game Development

Yeah from what I read on Google, there's no way to do it once it's installed. Un- and re-install

Response to: An Mc Following Another One (as2) Posted February 12th, 2009 in Game Development

AS: Rotate and Follow Mouse by UnknownFury

You'll have to change _xmouse, _ymouse to be mc._x, mc._y but it's the same principle

Response to: I Need Actionscript Help Please!! Posted February 12th, 2009 in Game Development

At 2/12/09 09:49 PM, DawnOfDusk wrote: How much of that did you actually code?

Much of it looks strangely familiar :)

@Topic starter: the problem you have is, if you look at the main timeline code, the bullets are actually named 'bullet1000' up to 'bullet1100'.

Now, I don't know where you're running your original hitTest, but it should be running on each bullet - as in the commented section of my code //if(hitTest(_root.enemy)){ blahh; }

Change that line to:

if(this.hitTest(_root.enemy1)){
_root.enemy1.removeMovieClip();
}

Response to: Detecting mouse click? Posted February 12th, 2009 in Game Development

That'll work with AS2. Just paste it on a frame in a new fla, publish and click/release the mouse to see the traces.

Response to: Random Number Generator Posted February 12th, 2009 in Game Development

The problem you have is not so much the random generator as the date/time issue, since the 'clock' will only run while a user is viewing the swf file. Since there's no guarantee they'll have it open every Sunday at 12 pm for your 'random' code to run, the only feasible way to do this is to do something with the Date & getTime() methods, and probably sharedObjects for saving/loading data to/from a user's PC.

I may be thinking with more complexity than is necessary, but what you want isn't as simple as it may seem. I'll have a think about it while I work for a bit and try to come up with a solution a bit later, assuming no-one else does so first.

Response to: 3D animation tutorial? Posted February 11th, 2009 in Game Development

I've used Swift for 3D models before. It's not anywhere near as advanced as Maya or 3DS Max, but it's designed to be compatible with Flash. For a basic chair, it should be fine, just read the help files for the program.

Response to: Making a Preloader Using Flash Posted February 11th, 2009 in Game Development

At 2/11/09 02:40 PM, robocopisback wrote: Have you ever had a problem when you want to submit a game or movie on Newgrounds.com? Your file is to big when Newgrounds.com can only take a 10mb. That is why you make a preloader for your game or movie so that the site doesn't have to download it. All the preloader does is downloads the movie or game for you to watch it.

Eh? This doesn't make sense. A preloader doesn't shrink the size of your swf, and if you're talking about loading a movie into a shell, that's a whole different bunch of AS. Besides, chances are that if the filesize is over 10mb, it means the game or movie hasn't been compressed or optimised well enough

if (pc == 100 && !isNAN(pc)){

if(pc>=100){ would do the job, not sure why you're bothering to check for isNAN

Response to: remove movie clip help Posted February 11th, 2009 in Game Development

At 2/11/09 09:53 AM, ColdLogic wrote: for(a=1;a<10;a++) {
_root["enemy-2-"+a].removeMovieClip();
removeMovieClip(_root["enemy-2-"+a]);
}

Try
_root["enemy-2-"+a].removeMovieClip();

Response to: Does anybody use Swish. Posted February 11th, 2009 in Game Development

I'd recommend getting Flash. I've used Swish on occasion because it's great for quick cool text effects, but it doesn't have a fraction of Flash's capabilities. If you want to make games or animations, you're going to need something more powerful than Swish

Response to: Making a background selection? Posted February 11th, 2009 in Game Development

At 2/11/09 03:49 AM, kokonut10 wrote: I am trying to make a game where you can choose from eight different backgrounds, but I don't know how to make it work. I've got two buttons for next and back, and the backgrounds, but I'm not sure how to get it all to work. Can someone give me some help?

Put them on separate frames inside a movieclip. Put the movieclip on stage and give it the instance name 'BG'. On the forward button, use
on(press){BG.nextFrame();}
on the back button:
on(press){BG.prevFrame();}

Response to: Cheaters! Posted February 10th, 2009 in Game Development

At 2/10/09 07:34 PM, Loganmypwnmaster wrote: I have a maze game that I made from a tutorial, but if you click and hold the mouse you can go past all the obstacles so I am wondering how I would make it so that if the player holds the mouse button for 2+ seconds it sends them to a different frame.

You should code the game so that it will detect whether the mouse is held or not, by using onMouseDown and onMouseUp to set booleans (true or false). Then your enterFrame code should use this boolean when performing hitTests/collision detection.

If you really want to create such a timer, you're still going to have to trigger/stop it with onMouseDown/onMouseUp. The best bet on that would be to use setTimeout, which is documented in the Flash help or here (for AS2): AS: Timeout by Inglor

Response to: Looking for work Posted February 10th, 2009 in Game Development

At 2/10/09 04:17 PM, zuperxtreme wrote: *puts on flame resilient coat*

I'm 90% sure I'll get flamed to hell, but whatever, I'm broke and need some cash:

Is anyone looking for a programmer?

I can code both in AS2 and 3. I don't have a portfolio and I haven't completed a game, so nothing to show. The only thing that is online that I did was the "portafolio" of this website: http://www.buddah.com.ar (XML's for MKT Interactivo/TV aren't there yet, hence why the links don't work).

Other than that, I'm just leaving myself to your will NG.

I'm obviously not going to waste my time, so serious replies... if that's possible here. I've tried looking around the freelance websites but those are always filled with Indians or Pakistanis and have 2000 bids the minute it's posted...

Anyways... Hit me up if you've got any work you're willing to pay for.

Ah, and since we're on topic, maybe we could make this a "hire a programmer" thread. I'm sure I'm not the only one looking for work.

*hides*

TBH, although you have no proof, I believe you do know coding. However, speaking from personal experience, you NEED a decent portfolio if you want to tempt employers, even if it's just a cool 45-line demonstration of API drawing (although a full-blown game or interactive/dynamic site would be better). Until you have something public to demonstrate your skills, you're unlikely to find anyone willing to pay for them.

Response to: Is there a way...? Posted February 10th, 2009 in Game Development

At 2/10/09 04:43 PM, ReN0 wrote: I'm eighteen years old, I have plenty of time to learn and improve and I can't already give it up before I even try it out. Makes perfect sense to me and thanks guys for what you have to say.

And possibly, possibly, expect something from me in the future! Time to learn.

Well, that kind of attitude is a great start. I don't know too much about the artistic side myself, but there are plenty of people in here who do, and would most likely be happy to help. I supect that the coding side is not going to be your cup of tea, but if I'm wrong, check out the Basic and Useful Links section of AS: Main for some beginner tutorials.

Response to: Expert Programmers/Artis ts for $$$ Posted February 10th, 2009 in Game Development

At 2/10/09 06:34 PM, Joelasticot wrote:
At 2/10/09 04:08 PM, zuperxtreme wrote:
Note to self: Read threads before replying...
Congratulations, you just understood the fundamentals of internet forums

Wait, what, you're supposed to READ them? Damn, I was wondering what I was doing wrong.

Response to: Spritesheets makes flash crash/lag Posted February 10th, 2009 in Game Development

Free graphics programs for external spritesheet editing:

Paint.NET
Gimp

Never used either, but I recommend exporting as gif/png with transparent background if you can

Response to: Is there a way...? Posted February 10th, 2009 in Game Development

At 2/10/09 01:24 PM, ReN0 wrote: I just asked because as Flash Animations get larger and larger that it makes less sense for one person to do it all by himself. I guess I was just comparing it to TV shows, there is a creator of the show and let's just say he's the head writer too but he hires others along with him to contribute and take some of the slack off.

It's true for big companies, but the majority of Flash coders/artists are still working solo on their projects, or with a small group of friends, and they're not getting paid for it (maybe sponsorship, if they're good enough). If they're lucky enough to find employment using Flash, they work for a company that already has creative types on board (usually the graphic artists). You clearly feel you have a creative or inspirational streak, but you need to be able to offer something besides ideas - a practical skill of some kind... unless you're lucky enough to have the financial backing and people skills to start your own company.

If you really want to get involved, bite the bullet and start working to master either the graphics side or the coding one. Even a small amount of skill would be appreciated by potential co-authors, and people with ideas but no skills are not going to find many Flash users interested in working with them.

Sorry to put a downer, but I've seen to many 'idea people' shot down in flames because that's all they have to offer.

Response to: How do i write text into a txt file Posted February 10th, 2009 in Game Development

At 2/10/09 02:27 PM, prut97 wrote: LIES, I did it with AS2 b4.

Well I suggest you rack your memory and try and remember how then

Response to: How do i write text into a txt file Posted February 10th, 2009 in Game Development

You can't write directly to txt from Flash (although you CAN pull data in). To output data, you'll need to go through a PHP/ASP/CGI script first, which means basically running/having a server.

For AS2:
AS: Flash & PHP by shazwoogle
AS: Flash > ASP > Txt
AS: Load External Data/Cross-Domain
AS: Loading/Unloading Data by shazwoogle

If you want to simple save and load variables, you can use Flash cookies (sol files):
AS: Save and Load

Response to: I Need Basics!!! I N33d H3lp Posted February 10th, 2009 in Game Development

The program used is Adobe/Macromedia Flash
All the information you'll ever need, better get reading :)

Flash Newbie Help by -ArcticHigh-
Flash (noob) tutorial by -hellraiser-
Starting with Flash by Otacon

NG's best tutorial movies
Flash tuts list by AGH

Flashkit
actionscript.org
AS: Main
Kirupa
good-tutorials.com

Response to: globalToLocal(); syntax? Posted February 10th, 2009 in Game Development

lol PMT much Gust?

Response to: Control Every Instance Posted February 10th, 2009 in Game Development

At 2/10/09 10:19 AM, tcc85811 wrote: Is it possible to assign an instance name to every instance of an MC in the library, no matter how deeply nested?

Unfortunately I don't think so. You could use

for(var i in mc){
mc._name="blabla";
}

once they're on stage, but that would name things randomly. I think you're probably going to have to head in to each MC and do it manually :(

Response to: Clock Countdown Posted February 10th, 2009 in Game Development

At 2/10/09 09:45 AM, liaaaam wrote: Fantastic coding style by the way, I guess doing it for a job it just comes natural.. commenting so meticulously.. unless you only did that for the guys benefit ^_^

Nah, they're both functions I re-use for quite a few of the games I make, I learnt the hard way that going back into old projects is a LOT harder without comments

Response to: Clock Countdown Posted February 10th, 2009 in Game Development

Countdown clock (fla)
AS: Clock by Glaiel_Gamer