Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Foxtacy

Pages: [1]
1
help / Doubt about killing
« on: Tue, Jan 24, 2012 »
Good day guys!

Despite the name of the post, this is not a psycopath question.

The thing is.

What happens when i group.kill() ?

does it automatically kills all the objects inside my group or, does it kill the group but keeps the object within alive?


2
GUYS!

Important tip!

At some point on your game, you might want to overwrite the kill() method of FlxSprite.

Assuming you will use the "object pool" idea as a good practice, here's a killer tip:

When creating the group, you will have to turn the object off (alive = false, exists = false). AND FOR GOD'S SAKE! DO NOT CALL YOUR OVERWRITTEN kill(), or it might turn out killing you, of a heart attack caused by stress.

If you do not do this, and forget to turn the objects off, strange things might happen.

I'm telling you this, because i just wasted 4 hours of my life trying to correct a strange null pointer exception that made NO SENSE, and because i do not want any of you guyz to suffer over this.

Hope that helps!

3
chat / Global Game Jam 2012 is comming!
« on: Mon, Jan 23, 2012 »
Hello everybody i hope you're all having a great day!

So,

Who's going to participate into Global Game Jam 2012 and who's using flixel on it?

In advance, i'll wish everyone success, i hope everyone succeeds in making their games during the jam and not letting it die.

Aaaand That's it flixel community :)

Thanks for all the help so far, and i hope i'm able to help everyone with anything, (anything at all) on flixel :)

4
help / Doubt with Collision between groups
« on: Wed, Jan 18, 2012 »
Hello everybody! Hope you're all having an awesome day!

I have a doubt here about collisions between groups

Ok, so, on my game i have the following scenario.

I have:

- a FlxWeapon on my Player class (which has a group of bullets)
- a group to manage the enemies on the screen.

Which is the propper way to test the collision between a single bullet, and a single enemy?

Because, this is what i have in mind:

If i check collisions like this: FlxG.overlaps(enemyGroup, player.weapon.group), when a bullet collide with an enemy, i can't tell which instance of enemy in enemyGroup the bullet collided with.

In that case, how do i figure out which instance of enemy on enemyGroup took the bullet? and how do i get the instance of the bullet that has collided with a single instance of enemy?

Pages: [1]