Be a Supporter!
Response to: "Tsunami = Karma for Peal Harbor" Posted March 13th, 2011 in General

quit making americans look like dick fuck ass holes, i don't want the japanese giving me looks of disgust when i visit their country.

Response to: as2 character movement problem Posted February 23rd, 2011 in Game Development

At 2/23/11 10:50 AM, Shadowii2 wrote: Player._x += speed;

As simple as that, granted that positive is right and negative is left. When the speed goes below zero, it tries to do "Player._x + (-speed)" equation, which is the same as "Player._x - speed". Likewise if speed is below zero, and it tries to do "Player._x - (-speed)", it is the same as "Player._x + speed".

Thanks for explaining it, I got it working a while ago but couldn't understand why it did. =)
Here's what i ended up with. The character eases left and right without the annoying slippery effect

speed=0;
maxSpeed=14;
onEnterFrame = function() {
guy._x+=speed;
if(Key.isDown(Key.RIGHT) && !Key.isDown(Key.LEFT)) {
	if(speed < maxSpeed) {
		if(speed<0){
			speed=0;
		}else{
		speed+=2;
		}
	}
} else if(Key.isDown(Key.LEFT) && !Key.isDown(Key.RIGHT)) {
	if(speed > -maxSpeed) {
		if(speed>0){
			speed=0;
		}else{
		speed-=2;
		}
	}
} else {
speed=0;
}
}

Thanks again guys, now i just need to work the slide/stumble animation in there

Response to: as2 character movement problem Posted February 23rd, 2011 in Game Development

At 2/23/11 08:36 AM, Shadowii2 wrote: if(holdingRight && !holdingLeft) {
if(speed < maxSpeed) {
speed++;
}
} else if(holdingLeft && !holdingRight) {
if(speed > -maxSpeed) {
speed--;
}
} else {
if(speed < 0) {
speed++;
} else if (speed > 0) {
speed--;
}
}

Hmm how do i use the variable when it goes into the negatives?

if (going right){
character._x+=speed;
}
if (going left){
character._x-=speed;
}

Thanks for the help though, the variable easing works at least =P

as2 character movement problem Posted February 23rd, 2011 in Game Development

I'm working on a side scroller, and i'm using eased movement, so....

speed=0
maxspeed=14
if (speed<maxspeed){
speed++;
}

Now, speed is set to 0 whenever the arrow keys are either both pressed at the same time, or not pressed at all. The problem i'm having is, there's the instance where you can press left (or right) exactly after letting go of right (or left), wich bypasses both hitting the keys at the same time as well as not pressing either.
is there a way to set speed to 0 whenever you turn around like this?

Response to: as2 collision detection issue Posted October 19th, 2010 in Game Development

At 10/19/10 09:13 PM, Fion wrote: You are right about it being because they are using the same iterator 'i', see in this case you test if enemy1 is touching bullet1, if enemy2 is touching bullet2 and so on like that only testing one bullet against one enemy.

Thanks man, i think i got this now =)

as2 collision detection issue Posted October 19th, 2010 in Game Development

So i'm working on a platforming game, and i can't get my bullets to collide with my enemies properly.
Here's what i'm using:

for(i=0;i<99;i++){
if (_root["enemy"+i].hitTest (_root["bullet"+i]._x, _root["bullet"+i]._y, true)){                      
_root["bullet"+i].removeMovieClip();
	}
}

This works fine on the walls, but not enemies. Is it because they're both using the same variable"i"? I tried adding another "for" loop to see if i could give a different variable to the bullets, but the test lagged so bad i couldn't even see if it worked =(
The strange thing is the collision does work once, but only on the enemy at the edge of the map. After that one shot works the rest just go right through, it's driving me crazy!

Response to: Documentary & Cup Car Updates Posted July 29th, 2010 in NG News

dang this site is getting serious.
on an unrelated note, dungeon fighter is the best online game evarrr, thanks for advertising it, i never would have checked it out otherwise

Response to: I Have Another Problem With As 2.0 Posted May 15th, 2010 in Game Development

At 5/15/10 04:30 PM, physicpebble wrote: Actually one second. If that was the AS for the stop button, what would be the AS for the play?

Sorry if I sound stupid, but I've been trying to find out how to get the play button to work with no luck.

Thanks for the help so far, though.

ah that script is for pausing/ playing with a single button.
pause button:

on(press){
	_root.subtitles.stop();
}

play button:

on(press){
	_root.subtitles.play();
}

and you won't be needing that substop=true; on the main timeline anymore

Response to: I Have Another Problem With As 2.0 Posted May 15th, 2010 in Game Development

At 5/15/10 03:30 PM, physicpebble wrote:
Also wouldn't that mean that whenever the stop button is pushed it would stop it. What would I put for the coding for the play button-and for that matter, where would I place it?

oh woops, i should finish reading peoples posts XD
here's what i would do:
put this in the button

on(press){
	if(_root.substop==true){
	_root.subtitles.stop();
	_root.substop=false;
}
else if(substop==false){
	_root.subtitles.play();
	_root.substop=true;
}
}

and put this on the main timeline

substop = true;
Response to: I Have Another Problem With As 2.0 Posted May 15th, 2010 in Game Development

At 5/15/10 03:30 PM, physicpebble wrote:

actually, you can just add this to your button lol

on(press){
	_root.subtitles.stop();
}
Response to: I Have Another Problem With As 2.0 Posted May 15th, 2010 in Game Development

can't you just put this in on your subtitles movieclip?

onClipEvent(enterFrame){
if (your show button is pressed)){
this.stop();
}
}
Response to: Settings menu AS2 Posted May 13th, 2010 in Game Development

woops, how do you post a code without the forum fking it up? like this?

onClipEvent(load){
active = false;
space = 1;
}
onClipEvent(enterFrame){
 if(Key.isDown(Key.SPACE)&&space==1&&active==false){
   _alpha = 100;
  active = true;
 }
 if(!Key.isDown(Key.SPACE)&&active==true){
	 space=2;
 }
 if(Key.isDown(Key.SPACE)&&space==2&&active==true){
  _alpha = 0;
  active = false;
 }
 if(!Key.isDown(Key.SPACE)&&active==false){
	 space=1;
}
}
Response to: Settings menu AS2 Posted May 13th, 2010 in Game Development

i just started programming a couple weeks go, so this is probably the noobiest fix ever:

onClipEvent(load){
active = false;
space = 1;
}
onClipEvent(enterFrame){
if(Key.isDown(Key.SPACE)&&space==1&&acti ve==false){
_alpha = 100;
active = true;
}
if(!Key.isDown(Key.SPACE)&&active==true)
{
space=2;
}
if(Key.isDown(Key.SPACE)&&space==2&&acti ve==true){
_alpha = 0;
active = false;
}
if(!Key.isDown(Key.SPACE)&&active==false ){
space=1;
}
}

Response to: as2 hittest coordinates help Posted May 13th, 2010 in Game Development

damn there goes my plans for the hittests. It'll probably work better if i use invisible mc hittests rather than having a bunch of loops running though


i can't seem to figure out how this should work. What i'm trying to do is create a hittest that's a certain length and not just a single coordinate.
if(this.hitTest(_root.box._x, _root.box._y>0, true)&&this.hitTest(_root.box._x, _root.box._y<50, true)){
this.dosomethingcool("pls");
}
with this script, instead of the guy hitting the coordinates of the box, it's only reacting to the coordiantes of the stage. How do i use greater than and less than for stuff like that?

as2 hittest coordinates help

Response to: pc's and spacebar+left arrow? Posted May 5th, 2010 in Game Development

At 5/5/10 10:53 AM, Neo-13 wrote: Works fine for me. I think the problem may lie in your keyboard, as every keyboard has a limit to how many keys it can detect at once. I can't remember what it's called (for some reason 'ghosting' comes to mind). My keyboard is supposed to be able to deal with 10 at once, and most cheap keyboards I think can usually manage three, so I guess this might not be the problem. I have had issues with the space bar in Flash games I started developing when I first started learning Flash, but never since.

I know it's not a flash issue for me, i have this same problem when playing Rumble Fighter (mmo game) with both of my computers, and one of them is only a year old.
oh well, that's what custom key settings are for i guess =P


So i spent a good 2 days pouring over my script trying to find out why my character wouldn't jump while holding LEFT, SPACE, and pushing UP at the same time. Then i found out the code works perfectly fine if i replace SPACE with any other key, and found out my computer doesn't respond to that key combination, nor does my other laptop wich is also a pc.
-----------
Test this please
http://spamtheweb.com/ul/upload/050510/3 8430_ngtest.php
------------
and let me know if the key combination is letting the character jump or not, I find it strange that both my computers have the same problem.

Response to: do frame labels cause lag? as2 Posted May 2nd, 2010 in Game Development

At 5/2/10 06:24 AM, Doomsday-One wrote: Flash changes most frame labels into numbers when you make the .swf file anyway, so there is often no difference.

Oh good =D Thanks for the reply


I'm making a game and trying to be super careful about any lag issues. So i was wondering, will too many frame labels cause lag?

so instead of gotoAndPlay("comboAAA");
i'd just use gotoAndPlay(4);

The game has 16 combos and overall 46 different attacks i want to put labels on, but not if it will cause lag. Anyone experiment with this before?
I'm using as2

Response to: Origional games? Posted September 17th, 2009 in Game Development

the wind effects are crazy in storm, how did he do that?

Response to: My walk cycle Posted August 25th, 2009 in Game Development

huh, so that's what seizure skipping looks like

Response to: Cigarette's or Hookah? Posted August 22nd, 2009 in General

At 8/22/09 05:18 AM, dirtshake wrote: I love smoking out of a hookah once in a while. It is a calm, relaxing, and social activity that I do with my friends once in a while and it is a blast. It is one of the healthier things to smoke and not addicting if done in moderation (as all things in life should be). I usually go with my girlfriend or a couple of friends to a hookah lounge and we spend a couple hours smoking, eating, and drinking. Very chill and very relaxing.

and that's the way to do it. everyone here freaking out about tobacco is thinking of the chain smokers who do it way too much for the wrong reasons, smoking to me is a social thing that everyone should experience at least once (i recommend the hookah though)

Response to: Need Artist for: Revert to Growth Posted June 29th, 2009 in Game Development

what the heck is this? are you selling art?

Response to: sword trail Posted June 10th, 2009 in Game Development

did you mean something like this? http://spamtheweb.com/ul/upload/3808/539 07_sword.php

Response to: Most epic sand art ever Posted May 30th, 2009 in Art

school assignment? are you in 2nd grade?

Response to: How to make this more pirat-ish ? Posted May 20th, 2009 in Art

only a true pirate uses hair ties on his mohawk pubes!

Response to: Anime Posted April 20th, 2009 in Art

some jerks at iscribble kept ruining my beautiful picture

Anime

Response to: Draw an Expression :) Posted April 15th, 2009 in Art

do we have to use your template?

Response to: Anyone Interested In Making A Game? Posted April 5th, 2009 in Game Development

this is for a taekwondo club right? so the moves will be taekwondo?