Recent posts by DrunkenOrc on Kongregate

Subscribe to Recent posts by DrunkenOrc on Kongregate

avatar for DrunkenOrc DrunkenOrc 108 posts
Flag Post

Topic: Game Programming / Problems resetting a level. (AS2)

Ok, this has been bugging me for a while. In my current project, when you die, the level will reset by going to a blank frame (Frame 2) near the beginning of the flash, then going back to the last saved frame (In this case frame 4 since I haven’t even started making more levels.) This will cause the “Level” movie clip to be back to its original position, and, thanks to some other actions taken when you die, you’ll be back where you started to.

Here’s the code for the related parts of the file. I removed most of the stuff about moving and jumping so you don’t have to read through it.


class Guy extends MovieClip {
	var resetcount;
	var savedlevel;
	function onLoad() {
		resetcount = 0;
		savedlevel = 0;
                //Here are the variables resetcount (For pausing so you can admire your corpse after you die) and savedlevel (To keep track of where you were).
	}
	function onEnterFrame() {
		if (_root._currentframe !== 2) {
			savedlevel = _root._currentframe;
		}
                 //This should cause the variable savedlevel to become whatever frame of the game you're on, I.E. what level you're on. Unless you're on frame two, which is the blank frame you go to when you die so that the level can reset.
                if (dead == true) {
			resetcount += 1;
			jumpspeed = -10;
			gotoAndStop(7);
                // This causes you to float into the air and become a ghost when you die. It also starts the reset counter, so a few seconds after you float off the screen the next if statement becomes true and activates.
		}
		if (resetcount>=150) {
			stopAllSounds();
			_root.gotoAndStop(2);
			_root.gotoAndStop(savedlevel);
                        //This SHOULD cause you to go to the blank frame, (2) and then go to the last frame you were on.
			resetcount = 0;
			dead = false;
			_y = 377;
			jumpspeed = 0;
			jumping = false;
                        //Then this will cause you to be standing in the middle of the screen.
		}
	}	
}

The problem is, for some reason, you go to the second frame and sit there without going back. Kind of a game breaker. I’ve tried removing and editing parts of the code to no avail, and any help would be appreciated. I feel like I’m missing something really obvious here but I’m not sure what.

 
avatar for DrunkenOrc DrunkenOrc 108 posts
Flag Post

Topic: Kongregate / KONG ROCKS

I DO TOO, IT’S A PRETTY COOL SITE THAT GIVES ME MONEY FOR BEING A LAZY BUM.

WHY ARE WE TALKING IN CAPS LOCK?

 
avatar for DrunkenOrc DrunkenOrc 108 posts
Flag Post

Topic: Off-topic / The ultimate tournament.

Characters have been updated. Also, please don’t name characters that have already been listed. You don’t play as any one character, you just make their actions in the battle if you so choose.

Also, it will probably start in a day or two. Or if I stop getting any character ideas.

 
avatar for DrunkenOrc DrunkenOrc 108 posts
Flag Post

Topic: Off-topic / The ultimate tournament.

Originally posted by Mysterymason:

Ill join. Just tell me were to sign.

Did you read the first post?

 
avatar for DrunkenOrc DrunkenOrc 108 posts
Flag Post

Topic: Off-topic / The ultimate tournament.

Originally posted by Jabor:

and they will be added to the rooster

Is this a giant man-eating rooster or something?

Damn, my plan has been spotted.

Seriously though. I’d like to get this rolling.

 
avatar for DrunkenOrc DrunkenOrc 108 posts
Flag Post

Topic: Serious Discussion / Furries

All I can really say is, you cannot say “Furries are…” Or “Furries always…”. They aren’t clones of eachother, they’re all different.

I don’t consider myself furry, but if I had the opertunity to become a house cat I would totally do it. Lazy bastards get to eat and sleep all day.

Also, the porn is hot. There, I said it. Does this make me a bad person? Probably.

EDIT: Also, I have to say I dislike furries who act overly defencive or people who whine about furries too much. It’s futile. The more you hate something, the stronger it becomes.

 
avatar for DrunkenOrc DrunkenOrc 108 posts
Flag Post

Topic: Off-topic / The ultimate tournament.

Concept: This is a multiversal scale tounement to find out which person, creature, entity, sentient, or ectoplasmic form (Or anything else) is most talented in the art of badassery. It will take place in four stages.

Stage one: The entry. I have made a small list of characters who will be fighting. Name anyone and what they are from, and they will be added to the rooster. A brief description will be needed for anyone who is not well known. We will do this for however long I feel like it. NOTE: Anyone added MUST be a single being. No groups of people or hive minds allowed. They must also be able to fight or do something somewhat similar to fighting, such as dancing or jumping jacks.

Stage two: The arrangement. I will personally arrange all of the matches in a way that I deem fair.

Stage three: The brawl. Matches will go though one by one. I will randomly pick someone to start, and say what their first action will be. Another person must respond with how the opponent would counter that action, and the next person responds to that post with the ac- blah blah blah. You get it. This continues until one character performs an action that cannot be countered, and defeats their opponent. I will determine when someone is dead, don’t post saying “And then he uses so and so attack, killing so and so character. Next match pl0x.” If you do, I will personally order and old woman to come to your house and complain about political issues to you.

Stage four: The winner. You must bow down to the winner of the tournament.

Rooster:
(EXCUSE MY TYPOS, IT IS ELEVEN THIRTY AT NIGHT AND I AM VERY TIRED. D:)
Castlevania:
Brauner. (Vampire, makes his paintings come to life and attack.)
Dracula.
Half-life:
Gordan Freeman.
Harry Potter:
Harry Potter.
Lord of the rings: (Because we know someone would have said it sooner or later.)
Aragorn.
Gandalf.
Witch King.
Mario:
Bowser.
Kammy Koopa.
Luigi.
Mario.
Metroid.:
Dark Samus IV. (Metroid prime 2)
Mother Brain (Original Metroid.)
Samus Aran (Gravity suit).
Misc:
Bob the builder.
Michel Jackson’s ghost.
Satan.
Ratchet and Clank:
Ratchet.
Starcraft:
Sarah Kerrigan (Zerg).
Star wars:
Darth Revan. (Jedi knight turned Sith lord turned jedi master.)
Luke Skywalker.
Darth Vader.
Kyle Katarn. (Mercenary/Jedi knight from star wars.)
The Emperor.
Watchmen:
Dr. Manhattan.
The Comedian.
Zelda:
Gannon.
Link.
Skull kid.

BANNED FROM THE TOURNIMENT: (Because they’re too awesome.)
Chuck Norris.
God.
Greg.

Currently we are doing stage one. Read the rules on it.

 
avatar for DrunkenOrc DrunkenOrc 108 posts
Flag Post

Topic: Game Programming / (AS2) Game slowing down badly.

Originally posted by skyboy:

is index a function? and you have to splice before removing it, otherwise it will not get spliced because you removed it before the code to splice it could execute

No, index is not a function. I thought I was simply supposed to put that there. Also, thanks. I moved the splice before the removal. Although it still doesn’t work properly.

Originally posted by Tidenburg:

‘or’ is outdated for starters, use ‘||’ instead.

Second, you must be running through some kind of for loop right? the index in the first field of splice should be the index for that loop. You should also run the loop through backwards now that you are removing elements to prevent “jumping” of instances on the screens.

I only used a for loop when checking to see if it has touched an obstical. (Wall, enemy, etc.) For moving off the screen I only used If (_x blah blah blah _y blah blah blah) etc.

Or maybe I have no idea what you mean by that.

 
avatar for DrunkenOrc DrunkenOrc 108 posts
Flag Post

Topic: Game Programming / (AS2) Game slowing down badly.

Ok, well, I put this into the bullet code.

if (_x>=800 or _x<=-250 or _y<=-150 or _y>=550) {
			this.removeMovieClip();
			Array.splice(index(_root.TheCharacter.basicbullets), 1);
		}

But that just gives me a whole lot of errors.

 
avatar for DrunkenOrc DrunkenOrc 108 posts
Flag Post

Topic: Game Programming / (AS2) Game slowing down badly.

Oh, that makes sense. Unfortunetly I am a complete noob to action script and I have no idea how to do that. Can anyone give me the basic code, and how I would apply it?

 
avatar for DrunkenOrc DrunkenOrc 108 posts
Flag Post

Topic: Game Programming / (AS2) Game slowing down badly.

So, in my current project in AS2, the game seems to slow down more and more as you continue to shoot your various weapons. At first, I assumed that my script to make the bullets disapear when they fly off the screen was failing. But I zoomed out to check, and it was not.

Here is the code to delete bullets:


if (_x>=800 or _x<=-250 or _y<=-150 or _y>=550) {
this.removeMovieClip();
}

Again, that seemed to be working.

Here’s the code for spawning them:


if (Key.isDown(Key.SHIFT) && guntimer>=15 && laserlevel == 1 && currentweapon == 1) {
var BasicLaser = root.attachMovie(“BasicLaser”, "BasicLaser"+root.getNextHighestDepth(), root.getNextHighestDepth());
basiclasers.push(BasicLaser);
BasicLaser.
x = x;
BasicLaser.
y = _y+Vspeed/2;
guntimer = 0;
}

Yes, I did rip a good portion of this out of shootorials. Don’t worry, I’m not making another rip off of shoot. :)

If anyone has any idea why my game is slowing down, please inform me. If you need me to post some other bit of code or information, I’ll try to supply that as well.

 
avatar for DrunkenOrc DrunkenOrc 108 posts
Flag Post

Topic: Technical Support / Sound problems.

The file is… 9.04 MB.

I tried extracting and converting again. Didn’t work.

 
avatar for DrunkenOrc DrunkenOrc 108 posts
Flag Post

Topic: Technical Support / Sound problems.

Nope, I used IE. That’s not it.

 
avatar for DrunkenOrc DrunkenOrc 108 posts
Flag Post

Topic: Technical Support / Sound problems.

I’m trying to upload a song I just made (Go me), but whenever I upload it, all I get is a blank audio file five seconds long that won’t play or make noise. I extracted the song from my music program as a .WAV, then converted it to MP3. I tried playing the MP3 file off my computer, but it played fine.

Does anyone know why it won’t play on the site? If you need any more information, I’ll be happy to answer.

 
avatar for DrunkenOrc DrunkenOrc 108 posts
Flag Post

Topic: Kongregate / Why do YOU want to be a mod?

I want to be a mod because I am a mod.

WAIT

 
avatar for DrunkenOrc DrunkenOrc 108 posts
Flag Post

Topic: Game Programming / Starting sounds from classes.

Ah, that was the problem. Thank you.

 
avatar for DrunkenOrc DrunkenOrc 108 posts
Flag Post

Topic: Game Programming / Starting sounds from classes.

I tried changing the var name to hitnoise, but that did nothing.

class RedTower extends MovieClip {
	var hitnoise:Sound;
	function onLoad() {
		hitnoise.attachSound('lowbuzz');
	}
	function onEnterFrame() {
		if (this.hitTest(_root.TheCharacter._x, _root.TheCharacter._y, true)) {
			_root.TheCharacter.redtouch = true;
			hitnoise.start(0, 1);
		}
	}
}

Any other ideas?

 
avatar for DrunkenOrc DrunkenOrc 108 posts
Flag Post

Topic: Game Programming / Starting sounds from classes.

Alright, to be frank, I have no idea how to make a sound play from inside of a class.


class RedTower extends MovieClip {
	var lowbuzz:Sound;
	function onLoad() {
		lowbuzz.attachSound('lowbuzz');
	}
	function onEnterFrame() {
		if (this.hitTest(_root.TheCharacter._x, _root.TheCharacter._y, true)) {
			_root.TheCharacter.redtouch = true;
                                      // The above line has nothing to do with the sound.
			lowbuzz.start(0, 1);
		}
	}
}

I patched together this sound emmiting code from some AS2 tutorials and it doesn’t work. Frankly, I’m not supprised. Can anyone give me a hand?

 
avatar for DrunkenOrc DrunkenOrc 108 posts
Flag Post

Topic: Game Programming / Script not compatable with macs?

Erm.

I dunno? How would I go about doing that?

 
avatar for DrunkenOrc DrunkenOrc 108 posts
Flag Post

Topic: Game Programming / Script not compatable with macs?

Hello.

I am in the process of making a game (As usual), and I sent a demo of it to my friend. However, he cannot seem to click on the continue button to get back the introduction of the story. Due to previous similar problems, I believe that the script I am using for the continue button may not be compatable with macs.

Here is the code:


class ButtonContinue extends MovieClip {
	var Timer
	function onLoad() {
		Timer = 0
                          // The timer is so that you can't accidently click the button
                          // twice in a row and skip the story.
	}
	function onEnterFrame() {
		Timer += 1
		if (Key.isDown(1)) {
			if (Timer >=10) {
			_root.nextFrame();
			_root.MessageFade.gotoAndPlay(1);
                                      // That above script will make the next frame fade in
                                      // instead of suddenly appearing.
			Timer = 0
			}
		}
	}
}

Can anyone comfirm my suspicions, and tell me what I can do to fix this? Or possibly give another explination?

(And yes, I do know that you can click anywhere and the button still registers. That is intentional.)

Thanks in advance, Orc.

 
avatar for DrunkenOrc DrunkenOrc 108 posts
Flag Post

Topic: Game Programming / A rather specific problem.

’Ello.

Here is my difficulty. In the game I am currently making, (AS2) At the begining of every level, there is a sign that you can read. To read it, you just walk up to it and click. Then the message is displayed. Here’s the problem: There are going to be several different messages, and some levels skip messages entirely. I’m trying to find a way to be able to change the text displayed for each level without making 40ish different movie clips. Does anyone have any ideas?

Unrelated problem: How can I save data to someones computer, so their statistics will be saved?

 
avatar for DrunkenOrc DrunkenOrc 108 posts
Flag Post

Topic: Game Programming / Further Collison Problems.

So, since I’m using AS2, I change my code from

if (this.hitTest(_root.TheCharacter)) {

to

if (this.hitTest(_root.TheCharacter, true)) {

? Or is that still incorrect?
(“TheCharacter” is the instance name of what I’m hitTesting against.)

 
avatar for DrunkenOrc DrunkenOrc 108 posts
Flag Post

Topic: Game Programming / Further Collison Problems.

And, ah, call me an idiot, but how would I change the parameters of something?

 
avatar for DrunkenOrc DrunkenOrc 108 posts
Flag Post

Topic: Game Programming / Further Collison Problems.

Ok, so here’s the basic idea: I want to have a beam of light that sends you back to the starting point of the level when you touch it. It works fine, except for one thing. The “Tower” part of the light beam, where the light is projected from, shoots light in more then one direction. As we all know, symbols are treated as a large rectange, the result being that if you get anywhere near the lights you get sent back to the start.

I’ve thought of one possible solution for this: Make the beams narrower, and only have one beam of light shooting out at a time, making it a general rectangle shape anyways.

It would be a huge pain to change everything to work like that, so I’d rather find some other way. Does anyone have any suggests as to what I could do? Perhaps change where the linkage is coming from? I’m stumped for a solution.

 
avatar for DrunkenOrc DrunkenOrc 108 posts
Flag Post

Topic: Kongregate / Fixes for new chat

Can we please bring formatting on profiles back?

Please?