Be a Supporter!
Response to: walk animation problem as2 Posted January 24th, 2011 in Game Development

At 1/24/11 07:10 PM, multiple wrote:
it's not supposed to. did you try it? i may have gotten it wrong. i forgot, you also need to add a keyUp that sets walking to false.

Augh! With a few tweaks it worked perfectly! Thanks! So sorry I ever doubted you!

Response to: walk animation problem as2 Posted January 24th, 2011 in Game Development

At 1/24/11 06:32 PM, multiple wrote: if(Key.isDown(Key.LEFT)) {
this._x -= speed;
walking = true;
this._xscale = -50;
}
if (walking == true) {
this.gotoAndStop(2);
}

Doesn't that do what mine does, but in a round-about way?

walk animation problem as2 Posted January 24th, 2011 in Game Development

I don't understand why my walking animation won't play when I press the button... here's the code on the character:

if(Key.isDown(Key.LEFT)) {
this._x -= speed;
this.gotoAndStop(2);
this._xscale = -50;
}

The character's second frame has a movieclip with on it which has the walking animation inside.

Response to: why doesn't this work? Posted January 23rd, 2011 in Game Development

Whoops, This is the actual code:

onClipEvent(enterFrame){
	if(hero.hitTest(_x,_y, true)){
		this._visible = false;
	}
}
why doesn't this work? Posted January 23rd, 2011 in Game Development

onClipEvent(enterFrame){
	if(hero.hitTest(hero._x,hero._y, true)){
		this._visible = false;
	}
}

thanks. :)

Response to: Hittest question Posted January 22nd, 2011 in Game Development

nevermind! figured it out, f***ers! :)

Response to: Hittest question Posted January 22nd, 2011 in Game Development

At 1/22/11 08:33 PM, sasuke2910 wrote:
At 1/22/11 07:07 PM, Finn-McXild wrote:
At 1/22/11 07:05 PM, GodlyKira wrote:
At 1/22/11 06:53 PM, Finn-McXild wrote: 3)Nothing wrong with that! :)
There is so much wrong with that....
There is a lot more wrong with unhelpful people! :O
Dude, no one wants to help you steal others work, if it was a tutorial. Then read it throughly and you should see your problem.

If your just going to copy/paste and not actually learn it then fine, then we won't teach it to you.

okay, cool. thanks. Anyway, The problem isn't addressed in the tutorial which is why I'm seeking help on here.

Response to: Hittest question Posted January 22nd, 2011 in Game Development

At 1/22/11 07:10 PM, Spysociety wrote: Try moving your registration point to the top and bit. If this doesn't solve your problem, try again measuring it, if still doesn't work use BitmapData to perform a perfect collision.

Moving the registration point just makes the 'player' mostly underground. How do I use bitmapData?

Response to: Hittest question Posted January 22nd, 2011 in Game Development

At 1/22/11 07:05 PM, GodlyKira wrote:
At 1/22/11 06:53 PM, Finn-McXild wrote: 3)Nothing wrong with that! :)
There is so much wrong with that....

There is a lot more wrong with unhelpful people! :O

Response to: Hittest question Posted January 22nd, 2011 in Game Development

At 1/22/11 06:48 PM, Spysociety wrote: 1) Where you did the registration point?
2) Did you measured it correctly? (like adding or subtracting values to get the correct point)
3) This is what happens when you just copy & paste from the AS2 Platformer Tutorial

1)Registration point is on the bottom
2)yes.
3)Nothing wrong with that! :)

Hittest question Posted January 22nd, 2011 in Game Development

I have a platform game I'm working on and currently when the "player" jumps beneath a low piece of "ground" he flies through it and then lands on the top. I don't want this! To make it simple, My platforms right now are like 'cloud' platforms and I want them completely solid.

Hittest code on player:

_y += grav;
	grav += gravity;
	while (ground.hitTest(_x, _y, true)){
		_y -= gravity;
		grav = 0;
	}
if (ground.hitTest(_x, _y+5, true)){
	touchingGround = true;
}else{
	touchingGround = false;
}
Response to: As2: Vcam not tracking? Posted January 22nd, 2011 in Game Development

At 1/22/11 05:15 PM, Finn-McXild wrote: okay, There were a few lines in the vcam that I had used // on earlier that I forgot about. I undid that and now the test and the published .swf show up as just grey... Any ideas on that problem? thanks.

nevermind! problem solved.

Response to: As2: Vcam not tracking? Posted January 22nd, 2011 in Game Development

okay, There were a few lines in the vcam that I had used // on earlier that I forgot about. I undid that and now the test and the published .swf show up as just grey... Any ideas on that problem? thanks.

Response to: As2: Vcam not tracking? Posted January 22nd, 2011 in Game Development

At 1/22/11 04:54 PM, sandwich-eater wrote: The _x should be tracking. For the _y though you put = instead of +=
If it isn't working though, the only thing I could think of is wrong instance name.

X isn't tracking. and it _y already is =. checked the instance names and double checked. :(

As2: Vcam not tracking? Posted January 22nd, 2011 in Game Development

I'm trying to make a platform game using a vcam. The vcam isn't tracking the "player," though. any ideas why?

code on vcam movieclip:

onClipEvent(enterFrame){
	_x += (_root.player._x-_x)/4;
	_y = (_root.player._y-_y)/4;
}
Response to: I get knocked down collab Posted September 19th, 2009 in Game Development

At 9/7/09 08:34 AM, Pestilenceproject wrote: Ok so I've been playing the song "I get knocked down" by Chumbawumba for quiite a while now,
I've also wanted to organise a collab now for a while...
anyone see where I'm going with this?

the song is called tubthumping. sounds fun, though.

Response to: gotoandplay problem Posted September 12th, 2009 in Game Development

nevermind! figured it out. thanks to everyone who helped!

Response to: gotoandplay problem Posted September 12th, 2009 in Game Development

At 9/12/09 01:01 AM, K-Guare wrote:
At 9/12/09 12:50 AM, Finn-McXild wrote: I already tried all combinations of frame labels, frame numbers, gotoandplay, and gotoandstop.
Is it inside an enterFrame clip event/function?
I'm thinking that's it.

If it isn't, it only checks if the left key is down ONCE,
immediately when the code is compiled.
Because you want it to continually check for it
it needs to be repeated every single frame.

The game is fully operational.... except this one thing. and yes, it is inside of an enterframe clip event.

Response to: gotoandplay problem Posted September 12th, 2009 in Game Development

At 9/12/09 12:43 AM, Magical-Zorse wrote: It depends,
if you have the walking animation movieclip on the second frame then it would be gotoAndStop(2)
if the animation isn't in a movieclip and it plays from the second frame, then try using a frame label.

I already tried all combinations of frame labels, frame numbers, gotoandplay, and gotoandstop.

gotoandplay problem Posted September 12th, 2009 in Game Development

if (Key.isDown(Key.LEFT)) {
		xspeed -= speed;
		walking = true;
		_root.hero.gotoAndPlay(2);
	}

this is the code I'm using, and i'm wondering why "hero" doesnt go to frame 2 when i press left.
Ideas?

Response to: movieclip trailer Posted May 3rd, 2009 in Game Development

At 5/3/09 04:55 PM, Mattster wrote: I tried your code, and it works just fine.

Make sure you have a

removeMovieClip(this);

script at the end of the dust animation or whatever, so it doesn't repeat.

Strange, are you sure you are using AS2, not AS3 :P?
-Matt

I always use AS2.

movieclip trailer Posted May 3rd, 2009 in Game Development

I'm trying to mak it so that the "enemy" instance of a movieclip get's followed by a trail type thing.
When I test it, though, it just shows the trail image in the middle of the stage. here's my code:

var count:Number = 0;
function doTrail():Void {
	count++;
	var trailer:MovieClip = this.attachMovie("trailer_thrust", "trailer_thrust" + count, count);
	trailer._x = _root.enemy._x;
	trailer._y = _root.enemy._y;
}
_root.onEnterFrame = function(){
	doTrail();
}
Response to: position-based scroll thing Posted April 27th, 2009 in Game Development

At 4/26/09 10:49 PM, Finn-McXild wrote: bump

bump

Response to: position-based scroll thing Posted April 26th, 2009 in Game Development

bump

Response to: position-based scroll thing Posted April 26th, 2009 in Game Development

At 4/26/09 09:47 PM, dragonjet wrote: just answer him! put this in the frame code

onEnterFrame=function(){
mc1._x = mc2._x;
mc1._y = mc2._y;
}

mc1 is the follower
mc2 is the one followed

Completely f'ed up a bunch of my other code for no reason, even though I put it on a different layer... any ideas that involve placing the code on the movieclips?

Response to: position-based scroll thing Posted April 26th, 2009 in Game Development

onClipEvent(enterFrame) {
this._x = _root.sense._x;
}

here is the code I have right now.
"sense" is the object that's x position is mimicked by "this"
It worked when I placed "sense" in a stationary position on the main timeline.
But when I put it into a movieclip that moves based on arrow keys, "this" didn't change position, let alone have the original x position of "sense."

Response to: position-based scroll thing Posted April 26th, 2009 in Game Development

can someone give me an idea?

Response to: position-based scroll thing Posted April 26th, 2009 in Game Development

sorry, sort of impatient after working for so long on such a complex project- only to have this one tiny thing not work.

Response to: position-based scroll thing Posted April 26th, 2009 in Game Development

hello?

Response to: position-based scroll thing Posted April 26th, 2009 in Game Development

At 4/26/09 02:29 AM, wasup12 wrote: This? (By the way, apply to the frame)

keyRight=Key.RIGHT
keyLeft=Key.LEFT

guyMove= function()
{
if(Key.isDown(keyRight)&& (GuyMovingHereBoolean))
{
_root.girl._y+=4
}
{
if(Key.isDown(keyLeft)&& (GuyMovingHereBoolean))
{
_root.girl._y+=-4
}
}
_root.onenterFrame = function()
{
guyMove();
}

there can be no keys involved. I simply need to make one object base it's position (stationary or not) on another's.