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 - test84

Pages: 1 2 [3] 4 5 ... 9
41
help / Capturing a string input.
« on: Sat, Mar 24, 2012 »
Hi,

How I can capture a string input in flixel games? I don't have a box or textfield or somethin, I just want to capture the string as the player types, for cheat codes mainly (and easter eggs ;) while playing the game and in playstate.

-tnx

42
help / How to do the "fade in" effect?
« on: Sat, Mar 24, 2012 »
Hi,  :)

I know how to do the fade out with FlxG.fade but I'm yet to know how to do the fade in effect.

-tnx  :-*

43
help / Keeping a music playing after each death.
« on: Mon, Mar 12, 2012 »
Hi,

When my player dies, I "reset" the current state but I wanted to know if it's possible not to play the music from scratch on each revival of player and music would playback on its own, unless a level changes.

I think I have to do it outside of FlxState to do so but that would complicate things a little here.

What do you reckon?

-tnx

44
Hi,

I have a kinda small tile that I'm using for one of layers of my background and I was wondering, if it's better to have it small image that is projected on like 150s of FlxTiles or have it as a big 1000x80 image file and project it into one big FlxTile?

-ty

45
help / Problem with FlxParticles.
« on: Sat, Mar 10, 2012 »
Hi,

I emit my particles with this:

Code: [Select]
package 
{
import org.flixel.FlxParticle;
import org.flixel.FlxPoint;

public class HealthHeart extends FlxParticle
{

public function HealthHeart()
{
super();

loadGraphic(AssetsRegistry.HeathHeart7x7PngClass, false, false, 7, 7);

//addAnimation("spin", [1, 2, 3, 4, 5, 6], 12, true);

exists = false;
}

override public function onEmit():void // Important part of this class. It is called when this single particle is emitted.
{
elasticity = 0.8;
drag = new FlxPoint(4, 0);

//play("spin");
}
}
}

And they don't kill themselves after a set time and stay on the screen forever unless player picks them up.

Problem is when their bounciness finishes: they do a very small and annoying one pixel moving up and down and it never stops. So basically particles never stop from moving and staying completely stationary.

-tnx

46
help / Position of collision on collidee.
« on: Thu, Mar 8, 2012 »
Hi,

For an enemy I want just a small part of it to just be able to get hit. So I was wondering if it's possible to detect the position of collision on the collidee.

-tnx

47
help / Adding features to a FlxTile?
« on: Wed, Mar 7, 2012 »
Hi,

Is it possible to change a tile type by setTilePropery? I have a class of destructable tiles that work perfectly, has health and different animations but I want it to be a tile, not a sprite. So is it possible to add functionality of a DestructableTile to a FlxTile?

Thanks.

48
Hi,

When I set a callback function with setTileProperty for a tile, whatever I do in the call back function doesn't seem to affect the tile. I think the parameter is passed by value and thus whatever I change do into it doesn't affect the original value:

Code: [Select]
public static function overlapBulletWithSomething(CollidedObject:FlxTile, bullet:Bullet):void
{
CollidedObject.visible = false;
}

49
help / animated tiles?
« on: Tue, Mar 6, 2012 »
Hi,

Does anyone know how to have animted tiles for FlxTiles?

-tnx

50
Hi,

As Arkeus suggested, I'm trying to have destructable tile with FlxTiles, I can get the exact effect I want with FlxSprites but when my character jumps and wants to go through the sprites, it gets stuck there so I'm switching to tiles.

So after I load my level, I use:
Code: [Select]
setTileProperties(155, 0x1111, overlapBulletWithDestructableTile, Bullet);so it would catch any collision with bullet and it does, with this:

Code: [Select]
private function overlapBulletWithDestructableTile(collideeTile:FlxTile, bullet:Bullet):void
{
collideeTile.exists = false;
}

problem is, whatever do inside that callback function, such as collideeTile.exists = false;, it doesn't have any effect on the game!

What am I missing here?

-tnx


51
help / Problem with movement and justTouched method.
« on: Tue, Mar 6, 2012 »
Hi,

I'm doing my patrol of enemies with this code:

Code: [Select]
protected function patrol():void
{
if (justTouched(LEFT))
{
setFacing(RIGHT);
}
else if (justTouched(RIGHT))
{
setFacing(LEFT);
}

else if (stayOnPlatform)
{
if (overlapsAt(x + _facing_sign * width, y + 1, Registry.CurrentLevel.hitTilemaps))
{
// we'll still be on the floor in one width's time; keep walking
}
else
{
// we'll fall off in a width's time; turn around
setFacing(facing == LEFT ? RIGHT : LEFT);
}
}
}

and it's work great.

Problem is if I don't do that patrol method repeatedly and want to do something and then resume that patrol method, it won't work and problem lies with the justTouched method that won't return correct result.

That's because of "touching" variable. When my enemy is stuck to a tile on left of his and his direction is left, touching has value of 4096, which is down. I'm wondering what I'm doing wrong that causes "touching" to have a wrong value.

52
Hi,

I wanted to prevent my FlxSprites from going on edges of the level and going into nowhere, I know a bad way to add this check to ALL flxsprites but I bet there is a better way to do it.

And while we are at it, how I can extend it to detect if FlxSprites fell down into a hole or something and dropped down out of the game? Like how to prevent when a player drops into a gap but it's bottom is empty so he will go down forever and kill him at some point.

53
help / Seamless music loops?
« on: Sat, Mar 3, 2012 »
Hi,

In order to have gapless and seamless (a.k.a. perfect) music loops for flash games, I've read that you can generate SWC files with Flash IDE, but I don't own one. I tried Mp3Loop but albeit the result is good, I can tell the gap between loops.

So how you people do it?

54
help / SecureSWF settings for Flixel projects.
« on: Fri, Mar 2, 2012 »
Hi,

A- I'm messing with the trial version of SecureSWF but most of the times I try to protect my work with it, the result is broken and blank screen or flash player saying something about broken keyboard stuff. I googled a lot and found out that I have to add org.flixel.* to Configuration Rules and put everything on disabled and exclusion. That just changed errors.

So what are most secure options to use with flixel projects while keeping the file working?

B- In Identifier Renaming tab, on the left window when I select a class, it doesn't select all it's members on the right panel. Why is that? Is there anything wrong with my classes or did I put any specific option that caused these to get unselected?

C- While processing, sometimes it lists a lot of my strings and says that if I don't deselect them, probably the output will be unusable but I need them to be renamed. BTW sometimes that panel doesn't show up at all.

Best regards,
test84.

55
Hi,

I was wondering if anyone tried OGG in their flixel projects. If yes, how and how does it take to load into memory. I tried downloading FOGG from launchpad but it seems it's targeted HaXe users and couldn't find how to use it withing AS3/Flixel.

-tnx

56
Hi flixi people,  :-*

For debugging flxTilemap.ray, I usually need to see the ray that I cast on other objects. I googled around our forum and found some ways that kwarp and funstrom once talked about but couldn't get them to work. It was something about writing into camera buffer I think.

-tnx

57
help / in-game cutscene.
« on: Tue, Feb 28, 2012 »
Hi,

I don't have a scripting system or anything fancy but I would to have a simple in-game cut-scene for the intro of my game. Does anyone have any idea?

-tnx

58
help / Quick question regarding speed/acceleration.
« on: Mon, Feb 27, 2012 »
Hi,

I've done this before but I'm after a more robust way.

With some condition, I need to make my enemy faster and when that condition is not true, make it to move at normal speed.

So one way is to assing that speed to the enemy always and if that condition is true, then add more speed to it. What I don't like about this approach is that you have check if the speed is negative, you add negative speed and if it's positive, do accordingly. And maybe you need to change acceleration too, maybe.

Do you have any better idea?

59
help / Simple line of sight for a dasher enemy.
« on: Sun, Feb 26, 2012 »
Hi,

I want to have Line of Sight (LoS) but when I googled around, people talk about it for really complex situations while I need a simple approach and really don't have time and such deep methods are over-engineer for what I need.

So I basically need to know if my patrol enemy can "see" my player. In more detail: I can easily check if player and enemy face each other and I think can determine if they are on same platform but checking their X value against each other but I don't know how to check for like 5-6 tiles in front of my enemy to see if he can see the player.

I was thinking of checking 5 tiles ahead of enemy and if player's tile position are from those, then they can see each other but I though asking you guys first and see what you think of. And please let me know if Flixel has any function that can help me do this.

Regards.

60
Hi,

I have a FlxSprite that I want to after "kill"-ing it, change it's animation and have it stay on the screen but won't accept collision checks. Like enemies in AAA games like Call of Duty that when they are alive they get collided with bullets but once they are dead, they are visible but bullets do not collide with them.

I tried messing with Exists and Visible and Alive properties but couldn't get the result I just described.

-tnx

Pages: 1 2 [3] 4 5 ... 9