Recent posts by Zach71 on Kongregate

Flag Post

Topic: Game Programming / Collision, and Next Frame

i dont understand what you mean

 
Flag Post

Topic: Game Programming / Collision, and Next Frame

var upPressed:Boolean = false;
var downPressed:Boolean = false;
var leftPressed:Boolean = false;
var rightPressed:Boolean = false;


Person_mc.addEventListener(Event.ENTER_FRAME, fl_MoveInDirectionOfKey);
stage.addEventListener(KeyboardEvent.KEY_DOWN, fl_SetKeyPressed);
stage.addEventListener(KeyboardEvent.KEY_UP, fl_UnsetKeyPressed);

function fl_MoveInDirectionOfKey(event:Event)
{ 
	if (upPressed)
	{
		Person_mc.y -= 5;
	}
	if (downPressed)
	{
		Person_mc.y += 5;
	}
	if (leftPressed)
	{
		Person_mc.x -= 5;
	}
	if (rightPressed)
	{
		Person_mc.x += 5;
	}
}

function fl_SetKeyPressed(event:KeyboardEvent):void
{
	switch (event.keyCode)
	{
		case Keyboard.UP:
		{
			upPressed = true;
			break;
		}
		case Keyboard.DOWN:
		{
			downPressed = true;
			break;
		}
		case Keyboard.LEFT:
		{
			leftPressed = true;
			break;
		}
		case Keyboard.RIGHT:
		{
			rightPressed = true;
			break;
		}
	}
}

function fl_UnsetKeyPressed(event:KeyboardEvent):void
{
	switch (event.keyCode)
	{
		case Keyboard.UP:
		{
			upPressed = false;
			break;
		}
		case Keyboard.DOWN:
		{
			downPressed = false;
			break;
		}
		case Keyboard.LEFT:
		{
			leftPressed = false;
			break;
		}
		case Keyboard.RIGHT:
		{
			rightPressed = false;
			break;
		}
	}
}
 
Flag Post

Topic: Game Programming / Collision, and Next Frame

ok i will post my movement code thats all i really have so far for this part of the game.

 
Flag Post

Topic: Game Programming / Collision, and Next Frame

I have Flash CS5.5 and I am making a game on AS3. It is a stick person game. So the collision part of my question. How can I add it so when the character tries to go off the sidewalk how do I make it so collision is there. Could you give me a code snip where it allows for collision but is wrote for keyboard movement with the arrow keys.
My other question is how do i make it so when my guy walks off the stage it automatically goes to next frame.

 
Flag Post

Topic: Game Programming / Collision, and Next Frame

collision also didnt work

 
Flag Post

Topic: Game Programming / Collision, and Next Frame

The stage thing didn’t work and I am trying the sidewalk thing right now

 
Flag Post

Topic: Game Programming / About a Sniper Game

Ok you didnt give me the whole code snippet for the scope you have to you use code snippets from Flash to make a custom mouse cursor and thats what i did. but how to make the moving offscreen one to work.

 
Flag Post

Topic: Game Programming / Collision, and Next Frame

I have Flash CS5.5 and I am making a game on AS3. It is a stick person game. So the collision part of my question. How can I add it so when the character tries to go off the sidewalk how do I make it so collision is there. Could you give me a code snip where it allows for collision but is wrote for keyboard movement with the arrow keys.
My other question is how do i make it so when my guy walks off the stage it automatically goes to next frame.

 
Flag Post

Topic: Kongregate APIs / Integrating API into my game

i dont have a preloader unless it comes automatically with flash CS5. I am new to game development so i dont know what im doing

 
Flag Post

Topic: Kongregate APIs / Integrating API into my game

so frame 1?

 
Flag Post

Topic: Kongregate APIs / Integrating API into my game

I am working on a sniper game on flash and I am going to put the Kongregate API on my game. But I don’t know where to put the code. Let me reword that. Obviously it goes in the “Actions” box but I do not know what frame to put it under.

 
Flag Post

Topic: Game Programming / About a Sniper Game

I have two questions that I cant seem to find the answer to. My first one seems like it would be simple but i dont know i cant find it. It is can i make it so when my character (using the arrow keys) scrolls off the frame, can i make it so it automatically goes to a certain frame?
My other question is how to set-up the actual shooting part. I want it to be like as if your looking through the scope and that with the mouse is how you move the scope, but i dont know how.

 
Flag Post

Topic: Kongregate APIs / AS3 -- Flash

I am working on a sniper game on flash and I am going to put the Kongregate API on my game. But I don’t know where to put the code. Let me reword that. Obviously it goes in the “Actions” box but I do not know what frame to put it under.

 
Flag Post

Topic: Kongregate APIs / AS3 -- Flash

I am working on a sniper game on flash and I am going to put the Kongregate API on my game. But I don’t know where to put the code. Let me reword that. Obviously it goes in the “Actions” box but I do not know what frame to put it under.
I have a couple more questions that I cant seem to find the answer to. My first one seems like it would be simple but i dont know i cant find it. It is can i make it so when my character (using the arrow keys) scrolls off the frame, can i make it so it automatically goes to a certain frame?
Another question and sorry to overwhelm you guys but I cant go any farther in the game until i get these answered. My question is how to set-up the actual shooting part. I want it to be like as if your looking through the scope and that with the mouse is how you move the scope, but i dont know how.