At 7/24/08 04:29 AM, Thomas wrote: Except for some reason after the redesign my level went up.
Really? My level went down. weird.
At 7/24/08 04:29 AM, Thomas wrote: Except for some reason after the redesign my level went up.
Really? My level went down. weird.
At 7/24/08 09:48 AM, MrMacro wrote:At 7/24/08 04:29 AM, Thomas wrote: Except for some reason after the redesign my level went up.Really? My level went down. weird.
It wouldn't have gone down. Everyones levels went up. Before the redesign there were 30 levels now there are 60.
At 7/24/08 09:54 AM, UnknownFury wrote:At 7/24/08 09:48 AM, MrMacro wrote:It wouldn't have gone down. Everyones levels went up. Before the redesign there were 30 levels now there are 60.At 7/24/08 04:29 AM, Thomas wrote: Except for some reason after the redesign my level went up.Really? My level went down. weird.
Yeah, even Luis got caught in it :P
At 7/24/08 10:01 AM, Paranoia wrote: Yeah, even Luis got caught in it :P
Ahhh, the good ol' days of the level 1 mod :P
At 7/24/08 09:54 AM, UnknownFury wrote: It wouldn't have gone down. Everyones levels went up.
I believe there were some people within a certain EXP-range that actually did level down, those on the "lower part" of level 9 I think.
At 7/24/08 12:31 PM, knugen wrote: I believe there were some people within a certain EXP-range that actually did level down, those on the "lower part" of level 9 I think.
I remember when I made an other account, it was level 2 to begin with.
Warning: rubbish actionscript ahead
i have a bit of a problem with some code I'm working on, which I hope you guys can help me with. It's pretty much the first substantial piece of AS3 I've ever wrote so bear with me here.
I have declared a few variables for directional purposes, gravity and such like so:
var ax:Number = 0;
var ay:Number = 0;
var vx:Number = 0;
var vy:Number = 0;
var gravity:Number = 0.15;
var friction:Number = 0.9;
var jump:Boolean = false;
I have an enter frame function that, as of now, does little else than calling the function for character movement:
function gameLoop(event:Event) {
characterMovement();
}
The characterMovement function looks like this:
function characterMovement():void {
if (inAir() == true) {
friction = 0.99;
}
else {friction = 0.9;}
if (jump == true) {
ay = -20;
jump = false;
}
else {ay = 0;}
vx += ax;
vy += ay;
vy += gravity;
vx *= friction;
hero.x += vx;
hero.y += vy;
checkGroundCollision();
checkWalls();
}
There's a function to check which key has been pressed:
function onKeyIsDown(event:KeyboardEvent):void {
switch (event.keyCode) {
case 87 :
if (inAir() == true) {
jump = false;
} else {
jump = true;
}
break;
case 65 :
ax = -1.5;
break;
case 68 :
ax = 1.5;
break;
case 83 :
break;
default :
break;
}
}
The inAir function checks whether or not the main character is in the air (yeah, really):
function inAir():Boolean {
if (hero.y < ground.y - ground.height / 2 - hero.height / 2) {
return true;
} else {
return false;
}
}
Last but not least there's a groundCollision function that checks whether the character has hit the ground, and it sets the 'jump' Boolean to false if it has.
function checkGroundCollision():void {
if (hero.hitTestObject(ground)) {
hero.y = ground.y - ground.height / 2 - hero.height / 2;
jump = false;
}
}
The actual problem :/
When I press the 'w' key I get different results. Sometimes the character jumps very high, sometimes the character jumps very low. I thought when the W key is pressed it called the EnterFrame function every time, meaning that it would only 'jump' only once (because of the 'jump' boolean), apparently it doesn't. What am I doing wrong here?
Here's the .swf so you can see it for yourself.
I haven't used AS3 like at all, but my guess is that this might have something to do with it:
case 87 :
if (inAir() == true) {
jump = false;
} else {
jump = true;
}
I don't really get why you would set jump as false if the character is in the air and the jump key is pressed? What happens if you do this instead:
case 87 :
if (!inAir()) {
jump = true;
}
At 7/24/08 01:51 PM, knugen wrote: I got a new name
Man. i still think it was a horrible idea changing your name, i'm so not used to it, i dont know how to pronounce it and I liked the old name better >=( copyright or not.
Change it back, or else Ill have to change my name to Coolio.
I want to change my name to just "Wurmy" but some meany took it long ago :c
On another note today I finally beat solitaire and minesweeper for the first time ever. How very exciting my life is c:
At 7/24/08 02:12 PM, Wurmy1029 wrote: On another note today I finally beat solitaire and minesweeper for the first time ever. How very exciting my life is c:
Just played minesweeper for the first time in years. Completed it in 104 seconds on beginner.
At 7/24/08 01:51 PM, knugen wrote: I don't really get why you would set jump as false if the character is in the air and the jump key is pressed?
That's the result bad choice for variable naming.
The jump boolean is set to true when the W-key is pressed. The characterMovement function checks whether or not jump is true. When it is true, 20 is added to the y-velocity of the character. After 20 is added the boolean is set to false so the next time characterMovement is called 20 won't be added to vy. By using the boolean I thought it would only add the y velocity to the vy-variable once, when the w-key is pressed and the character is on the ground.
The inAir function only checks whether or not the character is on the ground. Basiaclly it makes sure you can't jump whilst the character is still in mid-air. So that works, I just can't figure out how I can fire the jumping part only once.
What happens if you do this instead:
It doesn't do anything :). Thanks for trying to help though.
At 7/24/08 02:31 PM, SpamBurger wrote: We should have a NG Ashkinsripturs Collab 2 (first one here). Who agrees?
I'm down ;D
At 7/24/08 02:31 PM, SpamBurger wrote: We should have a NG Ashkinsripturs Collab 2 (first one here). Who agrees?
postcount +=1;
Newgrounds Photoshop Headquarters || Don't use MS Paint! Use Aviary!
SING US A SING YOU'RE THE PIANO MAN
At 7/24/08 02:31 PM, SpamBurger wrote: We should have a NG Ashkinsripturs Collab 2 (first one here). Who agrees?
ASHKINSKRIPT THREE POINT OH
Seriously though, we should make an effort for it. Not to the extent of actually learning to draw - maybe just something like the massively underrated MGS Funnies collab.
At 7/24/08 03:23 PM, Paranoia wrote:At 7/24/08 02:31 PM, SpamBurger wrote: We should have a NG Ashkinsripturs Collab 2 (first one here). Who agrees?ASHKINSKRIPT THREE POINT OH
WHAT NOW?
Seriously though, we should make an effort for it. Not to the extent of actually learning to draw - maybe just something like the massively underrated MGS Funnies collab.
Agreed.
COOLS 3DS PARTICLE WHAT
Why is it so smooth?
http://www.dangries.com/Flash/Experiment s/Particles/bitmap3D_twoPics.html
24356? 233442? shit, what was that kids name again?
Remember that person once upon a time, who drew really bad sigs, but someone told him they were great, and then everyone joined in the joke, until eventually he figured it out and left ng? Im trying to find the sig he drew me..
At 7/24/08 02:09 PM, Coolio-Niato wrote: Man. i still think it was a horrible idea changing your name, i'm so not used to it
You will be :)
i dont know how to pronounce it
Why would you pronounce it?
and I liked the old name better >=( copyright or not.
Oh well..
Change it back, or else Ill have to change my name to Coolio.
I can't say that "threat" has any bigger impact on me.. Especially so because coolio is already taken ;)
At 7/24/08 02:31 PM, Xeptic wrote:At 7/24/08 01:51 PM, knugen wrote: What happens if you do this instead:It doesn't do anything :). Thanks for trying to help though.
No problems man, hope you work it out :)
At 7/24/08 04:23 PM, x-factor11 wrote: 24356? 233442? shit, what was that kids name again?
The first one I came to think of when I saw those numbers was 23450, but considering your description I guess it's not him?
The first one I came to think of when I saw those numbers was 23450, but considering your description I guess it's not him?
nah its definitely not 23450, but his name was a random sequence of numbers, I think it began with 0..its hard to remember, but another thing about him is that I think the first one to make a joke out of him was hashbrown..
At 7/24/08 05:34 PM, SpamBurger wrote: ITS ON!!!1
I might join in the next one if there is another..
:'(
At 7/24/08 05:43 PM, SpamBurger wrote:At 7/24/08 05:40 PM, Treerung wrote:Why not this one?At 7/24/08 05:34 PM, SpamBurger wrote: ITS ON!!!1I might join in the next one if there is another..
Im too busy and the coding seems a little tough for me.
:'(
At 7/24/08 04:57 PM, knugen wrote:
Change it back, or else Ill have to change my name to Coolio.I can't say that "threat" has any bigger impact on me.. Especially so because coolio is already taken ;)
It's inactive so I'm sure Tom wouldnt mind. People misprint my name most of the time anyway, usually
Coolio-Natio or even Coolio-Nation(wtf).
At 7/24/08 04:57 PM, knugen wrote: At 7/:
i dont know how to pronounce itWhy would you pronounce it?
and I liked the old name better >=( copyright or not.Oh well..
Change it back, or else Ill have to change my name to Coolio.I can't say that "threat" has any bigger impact on me.. Especially so because coolio is already taken ;)
lol I laughed so hard..
Sory for double post
Tom be back..stupid pm..
I just got this pm from somebody i don't know, you might have gotten it to...
I was lurking around on the internet when I stumbled upon a game that redefines the gaming experience. That game is called 4Chan Fandango. The graphics don't beat those of professional studios, but the gameplay is where this gem really shines. Due to the loose controls, unbridled freedom, and innovative design, the game captures your attention and refuses to let it go. Personally, I've almost finished the game and I can say that I enjoyed every second that I played. Before I attempt to finish this epic game, I'm going to lock my door and hang up a sign on it that reads: "Door's closed, due to 4Chan Fandango."
like wtf ?
At 7/24/08 07:17 PM, zrb wrote:At 7/24/08 07:12 PM, patu1 wrote: like wtf ?Its a virus.
Yeah, I got one a few days ago too. We've been here before with fake .swf decompilers. I wasn't gullible enough to actually download anything, but come on.
It's a pretty impressive amount of effort to go to just to be an asshole, all the same.
At 7/24/08 07:50 PM, Paranoia wrote: It's a pretty impressive amount of effort to go to just to be an asshole, all the same.
It's actually sad that these people have nothing better to do with their lives than try to create some e-drama. These people really need to get outside more.
At 7/24/08 08:07 PM, Kirk-Cocaine wrote:At 7/24/08 07:50 PM, Paranoia wrote: It's a pretty impressive amount of effort to go to just to be an asshole, all the same.It's actually sad that these people have nothing better to do with their lives than try to create some e-drama. These people really need to get outside more.
Hear here.
On the plus side, it's an argument in favour of massive relaxing of underage drinking laws.
At 7/24/08 08:14 PM, Paranoia wrote: On the plus side, it's an argument in favour of massive relaxing of underage drinking laws.
See, while that would remove the hoodies and their 50% extra free bottles of white lightning from parks across the land, it's just going to make what little pubs we have left (over 10 pubs a day close in Britain) even more crowded.
Plus the people in question are probably too socially inept to have friends to go down the pub with anyway =/
Although it's all academic because the limit is gonna get raised to 21 soon, you can see it coming.