Be a Supporter!
Response to: Make an MC move when another does. Posted May 5th, 2011 in Game Development

Ooh! Parallax scrolling! I love this one!
Okay, so what I usually do is first get the far BG to stay with the camera, just to get it to work.
Then, I set it up so it goes to the camera's x and y divided by 1.1 to 2, depending on how close I want it to seem. Well, this works but the BG will be a little off. So you have to add or subtract a little from the x and y variables. So essentially you end up with this... (AS2)

onClipEvent(enterFrame){
	//throw this on your BG movie clip and make sure it IS a movie clip
	//also make sure the vcam's instance name is "camera", else it won't work

	this._x = _root.camera._x/1.5 + 300
	this._y = _root.camera._y/1.5 + 450

	//if your BG is a bit off in testing, play around with what your adding/subtracting from the x and y
}

Hope this works. I have to look at one of my files to make sure that's what the code was.
Same thing works with foreground, just multiply instead of dividing.

Response to: Changing Movieclip Frames via Var. Posted May 5th, 2011 in Game Development

Did you try using quotes when you set and check your variables?
Like this:

if(one condition or another){
	playerColor = "Red"
}

//blah blah other code blah

if(playerColor == "Red"){
	gotoAndStop(2)
}
Response to: Space Key On Key Release? (as2) Posted May 5th, 2011 in Game Development

At 5/5/11 04:07 PM, JohnCamPro wrote: Some of your syntax was off there so I fixed it up a bit, still didn't work though, any ideas?
I get what you're trying to do with the code, logically it should work, but it's not. Any way to fix it or anyone got an alternative.

I think it's because I wrote just nextFrame, which will only apply to the movie clip it's in. Should be changed to _root.nextFrame.

I'll try to get it to work, just give me a bit.

Response to: Space Key On Key Release? (as2) Posted May 5th, 2011 in Game Development

I would give it a timeout. In other words, if the space bar is still down, wait until a certain number of frames to pass, then go to the next frame.

Example:

OnClipEvent(enterframe){
	if(timeoutVar < 0){
		if(Key.isDown(Key.SPACE)){ //this way we only check the space bar if are timer is less than zero
			nextFrame
			timeoutVar = 10 //then reset the timer to give us ten frames between flips
		}
	}
	timeoutVar -- //and then we decrease the timer so it will eventually be less than zero
}

A bit of a cheat, but it works. I think.

Honestly I just wrote that from my head, so things may be a little off.
Response to: Complete this sentence. Posted May 4th, 2011 in General

I needed a sack for my sack.

Response to: Osama Got His Comeuppance Posted May 3rd, 2011 in NG News

Well, we got him. Problem is, the terrorists are bound to be pissed and dissorganized. Mostly pissed.

Also, I remember an FPS game where Bin Laden was in a liqour store with a hostage and soft drinks were drunken in first person. Anyone remember that one?
Response to: Phrases that sound dirty. Posted April 26th, 2011 in General

Better yet, we were outside, and I came back to get water, but there was no hose; just the spigot. So when my buddies came back there, I told them, "There's no hose. I had to use my hands."

We all busted out laughing. This was years ago, BTW.
Response to: platform game jumping problem. Posted April 26th, 2011 in Game Development

Well, I looked at the code, (can't right-click on a phone) and maybe the touchingGround boolean should only be true when your gravity speed is more than zero.
That or make your main ground one MC and your platforms that you jump up to in a separate MC, and a touchingPlatform variable that only applies when gravity is more than zero, and the rest of the code is similar, just with the platforms MC.

Sorry if you have a hard time understanding this.
Response to: Dubstep Mix! Posted April 26th, 2011 in General

Hey newbie, you know there's an audio portal here, right?
Here's the audio subit page. Since you're new, you'll have to await judgement, to make sure your stuff's original. (Just a side note, using all pre-made loops doesn't cut it here.)
Also, there's the audio forum for future posts about music. Make sure you check the rules and stuff, be aware of zero bombers, and, uh, welcome to Newgrounds.

Response to: Phrases that sound dirty. Posted April 26th, 2011 in General

When there's a party in your mouth and everyone's invited...

Also, nice catch.
Response to: You, Yes You! Posted April 26th, 2011 in General

...

I'm gonna need a burger first...

And a rock it lawn chair.
Response to: Manly vehicles! Posted April 25th, 2011 in General

At 4/25/11 02:49 PM, steph2568 wrote: I always thought Hummers were pretty manly.

Only the Humvee and H1.

Mostly the Humvee; a lot better than the H1 because it's 2000 lbs lighter, more fuel effecient too. Plus they come standard with .50 cals or TOW rocket launchers.
Response to: Manly vehicles! Posted April 25th, 2011 in General

Toyota Hilux.

With standard armament.

Manly vehicles!

Response to: So I joined the Army Posted April 23rd, 2011 in General

You should be a ranger.

Response to: Review Request Club Posted April 21st, 2011 in Clubs & Crews

I wouldn't mind a couple more reviews on my first flash submission...

  • Got Credit?
    Got Credit? by cdjproductions

    Click to view.

    Type
    Movie
    Rated
    Everyone

Thanks guys!

Response to: AS2 duplicated MC instance number? Posted April 21st, 2011 in Game Development

Nah. (Plus it was a rocket launcher projectile.) I wanted to try to do the x,y stuff from the explosion MC, but since the duped rocket MC is removed in the same frame, I can't do that. So what I needed to do was take the ID of the duped explosion that was created for that particular rocket and position that specific one. I found what I was looking for though.

_root.expl[+id]._x//wrong

_root["expl"+id]._x//right

I wish I found the AS: Main section earlier.

Okay, now I'm trying to get an explosion MC to be duplicated when I have a rocket hit the ground before removing the duped rocket MC. Well, I'm not really trying to duplicate the explosion MC; already got that figured out. But my problem is getting the instance name+number thing. Here's a psuedo-code for example...

if(_root.ground.hitTest(blahblahyouknowthatstuff){
	ec = _root.explosionCount
	duplicateMovieClip(_root.origExpl,"expl"+ec,ec)
	//fun part... right here. I don't think it's right.
	//what I want is for it to go to where the rocket MC was
	_root.expl[+ec]._x = this._x
	_root.expl[+ec]._y = this._y
	//and to test crap...
	trace(_root.expl[+ec]._x)//comes back "undefined"
	removeMovieClip(this)
}

Basically what I'm trying to do is name the instance number of the duplicated explosion. Like "expl1202" and get its data like _root.expl1202._x
But instead, I just put the name (expl) and the number (+ec) somehow.

If you can understand any of what I'm trying to get across, any help is appreciated guys.

Response to: The Average Newgrounder Posted April 20th, 2011 in General

Guess I'm not an average NGer.

Above average in knowledge, talent, and procrastination. Ftw.
Response to: AS2 platformer "while" slow script? Posted April 15th, 2011 in Game Development

At 4/15/11 10:13 AM, Redshift wrote: Hm, wouldn't you want to increment 'y'? (because down is positive)

No, I want it decremented until he's not hitting the ground. Because I don't need hin sinking into the ground.

I shoulda posted that in the first place. DX

I'm working on the (simple) platforming part of my game, where the player's MC code tells it to push the player MC back up if it gets a hitTest back from the terrain, but it slows down. A lot.
This is from the player MC code (onClipEvent(enterFrame))...

while(_root.ground.hitTest(this._x, this._y+(this._height/2), true)){
this._y--
}

It works fine when I use "if" but when I use while, it gives me the slow script error. Help?

How many of you can run a mile... Posted April 2nd, 2011 in General

in less than 5 minutes?

I know I can! (1st place)

How many of you can run a mile...

Response to: Bacon Posted March 30th, 2011 in General

At 3/30/11 02:26 AM, Lorkas wrote: Bacon sucks man.

DEATH TO THE BACON HATER!!!

Oh, and bacon is awesome too. Especially on those eggandcheese sandwiches with pancakes for bread.
Response to: Your 'location' Posted March 29th, 2011 in General

Better yet, "On top."

Response to: Your 'location' Posted March 29th, 2011 in General

Somewhere else.

Lost.

One of those.

Response to: Dropping a Penny... Posted March 29th, 2011 in General

Wouldn't kill you, although major brain damage would ensue.

Mythbusters FTW
Numerical Dyslexia? Posted March 15th, 2011 in General

Is there such thing? For example, I'm pretty good at math, maybe one of the best in my class, yet, I'll occasionally have trouble with simple operations, like flipping signs, using the wrong symbols, or mixing digits up. This ever happened to any of you?

Response to: The legality of guns. Posted March 10th, 2011 in General

Well, like a bunch of people above me said, criminals will get their hands on firearms whether they're legal or not. You might as well let the victims have access to at least a pistol so they have somewhat of a chance to defend themselves. Plus there's the whole psycho-breaking-into-your-house-to-rape-
your-daughter type situation...


Hey guys, I need some help with this. You know those sidescrolling race games, where you typically drive a truck or dirtbike over various terrain and avoid flipping and stuff? Anyone know anything about this or any related tutorials related to the physics of it? Any help is appreciated!

Also, I already tried googling. Spent the last hour doing so with no luck.
Response to: Insult me!!! Posted February 23rd, 2011 in General

Your mother was a hamster and your father smelled of elderberries.

Response to: The Ng Tank Real World Counterpart? Posted February 23rd, 2011 in General

At 2/23/11 04:25 PM, Wolfos wrote: Why does it have a second (smaller) dick?

Bad cockjoke.