Recent posts by dragon_of_celts on Kongregate

Flag Post

Topic: Game Programming / GiTD #42 - *Pirates*

Well, since no one has suggested anything yet:

Moods
Surreal
Transmogrify

 
Flag Post

Topic: Game Programming / GiTD #41 - *Congratulations Aesica*

Originally posted by Shake_N_Baker:

I finished my puzzle game and posted it here on kongregate for anyone interested.

“Luner”?

Much improved, though I would suggest two things:
1) Show possible paths for selected hex in light grey (just helps in visualizing possible paths/solutions. Better: dark grey for paths leading to an edge, light grey for paths leading to another hex, and target symbols on spaces where the light grey path terminates), and
2) When player has selected a hex and then clicks on a space that the hex cannot move to and you deselect, show a little message stating that it can’t move there and why (“no blocking piece”) — just be sure that if user clicks a hex then clicks the same hex again that they don’t get a message (deselect “silently” like you do now).

It won’t really change the game play at all, but may help people that are getting frustrated with it and/or don’t quite get it. Also, please separate music mute from sfx mute. While the background music was a decent selection, it does wear thin after a bit, but I still want to hear the piece movement sounds.

It would be nice to have a check for no viable moves left (no hexes can move, because all of their pathways (not immediately blocked by another hex) lead directly to an edge of the board). I’m not sure how useful it would be, though, really (I purposely grouped my hexes just to see if it would).

Levels that are completed in less than the best number of moves should get a silver symbol similar to the gold one you get for best “time” (I completed level 19 in 11 turns, 3 short of best, and it looks the same as untried levels).

Played up to level 23 of the set levels and tried one randomly-generated level. I think I’m played out for now. Might come back to it later, I don’t know.

 
Flag Post

Topic: Game Programming / GiTD #41 - *Congratulations Aesica*

Originally posted by Shalmezad:
Originally posted by dragon_of_celts:

Sorry, guys, I was actually working on something for this one (well, I kind of started yesterday)… In Haxe 3.


Understandable. Even though haxe + openFL is extremely similar to flash, you really need more than this GiTD to get it down (as I found out last time)

Actually, it seemed to be going rather smoothly… until the graphics started doing something that it couldn’t have been doing (or, at least, I couldn’t see how it could be doing it, according to rather simple code that I had looked over several times), so rather than trying to solve the enigma (read: bash my head against the wall), I thought I should just re-do it in Flash.

As for EST, I had noticed it before… then promptly forgot about it.

Brains. Who needs ’em, right?

…apart from zombies…

 
Flag Post

Topic: Game Programming / GiTD #41 - *Congratulations Aesica*

Link to Aesica’s is broken.

Shake_N_Baker – Lunar Hex (not listed for some reason): I don’t get it. It says that hexes slide until they are stopped by another hex, but they don’t slide. Sometimes I can get one to move 1 space, but that’s it… Which makes most of the boards unplayable. I imagine this must be a browser- or flash-version-specific problem???
Edit: Wait, now I can get them to slide to another hex… I’m fairly sure I tried that before and it didn’t work, but maybe I just wasn’t paying attention.

Shalmezad – Pixel Wars: Controls are too touchy, though, making trying to obliterate an enemy an exercise in pixel-perfect precision (pun intended!) — but then, my pixatar had a speed of 20. I could only ever manage to line up to about every third pixel row of the enemy, no matter how I tried. Tried one with a speed of 11, which was still touchy, but at least somewhat manageable (but then I only had 4 HP). Enemies came in waaaaay too fast the vast majority of the time. Got the suicidal blurb. Seeing what builds I got from the names I put in was more interesting than playing the actual game… I think it needs some more variation in enemy movement (other than just speed), but would be somewhat interesting as a PvP/deathmatch/team thingy…?

Aesica – Marisu’s Adventures in Randomonia: Controls are good, except for flying, which is just weird (I know it wasn’t really flying… So why did you keep it in?). Regular enemies were more difficult than the boss, who was really slow and predictable. Could use some items/inventory or something, but a decent play. Congats on your engine achievement.

1st – Aesica
2nd – Shalmezad

Sorry, guys, I was actually working on something for this one (well, I kind of started yesterday)… In Haxe 3. I ended up switching back to Flash too late (plus I didn’t notice this ended at 9 EST, so I was 2 hours off).

 
Flag Post

Topic: Game Programming / GiTD #41 - *Random Generation*

Originally posted by Aesica:

Here’s my thing so far.

Enemies don’t fall through the screen, making it seem like the bottom of the screen is floor… until you step into it and end up in a different room.

Feels kind of like an old NES game (Castle of the Wizard, or something like that, I think… I can’t recall what the name was, exactly).

Personally, I’d have the shots expire at the walls. Rather than have a “hard” range, maybe have the shots diminish in power over distance?

 
Flag Post

Topic: Game Programming / GiTD #41 - *Random Generation*

Originally posted by Shalmezad:

New build: http://www.fastswf.com/r6v-9HE

Not really sure what I’m supposed to be doing (should I be shooting the others — assuming I can shoot?)… There don’t appear to be collisions at the moment. Sometimes tapping a key will make my pixatar go shooting off in that direction, off the screen, and other times it will step.

 
Flag Post

Topic: Game Design / How does it feel?

Originally posted by PanisRahl:

the map is default 10×10 full screen areas, you have to push the space bar while near the edge of the map to swap to the next area.

I know — that’s what I did. Are you saying that the map should’ve actually changed to a different image?… Because it didn’t.

Edit: Ah, I guess that the top/left edges are the top/left of the entire game area (so no map to go to, so it just stays… though it still says it has changed the map) — I was able to change the map by going down or to the right. Picking up items doesn’t seem to work unless the item is to the right or left (above or below gets ignored).

 
Flag Post

Topic: Game Design / How does it feel?

It seems to be responding a bit slow. There is a noticeable delay between clicking and movement.

There isn’t enough room to move to get a good feel for the movement controls apart from that, though I will point out that the avatar often goes into a hyper back-and-forth movement if you click somewhere it can’t get to.

Also, I assume that there is actually only one map…? I “changed areas” (and it said I did), but the map was the same, so I can’t tell if it really did. Having to press space on open-area maps to change areas does feel a bit clunky, but it may be one of those controls that you get used to. May I suggest a “safety toggle”: when the safety is on, player has to press space to change areas; otherwise, walking to the edge automatically changes areas. Of course, whether or not that is feasible depends on your game.

 
Flag Post

Topic: Game Programming / Forsaken Uprising New MMFPSG

Originally posted by ForsakenUprising:


[…]cows will produce manure […] as a fuel source for creating top tier equipment.

I’ve heard of steampunk, but… dungpunk?!?

 
Flag Post

Topic: Game Programming / Show us a screenshot of what you're working on!

Originally posted by Aesica:
The numbers are resistances. I originally had text saying “Resistances” however it looked really awkward so I removed it. Mousing over any of them explains clearly what they are. The crossed swords is indeed attack power, which is actually a general indication of overall attack power based on both base stats and equipped items. The game’s mechanics are such that listing individual attack power values for each damage type is relatively pointless; all damage is based on the attack power value.

Sorry if I’m being dense, but… what? How do you have specific resistance types without similar specific damage types? If I have 30 attack power, how does that relate to the resistances? If I attack a creature with 30 ice resistance and -5 fire resistance, and I have a “Maul of the Venomous Commentary” equipped, how much damage do I do (30 poison/sarcasm damage shouldn’t be diminished by ice resistance, nor augmented by fire susceptibility — if they are, then having individual resistance types doesn’t make sense; if they aren’t, then aren’t you using specific damage types that the player would then [potentially] want to know?… so I assume I’m missing something here or I’ve misinterpreted what you wrote)…

Originally posted by dragon_of_celts:

If you don’t want to overlay numbers on the images, at least make the spacing such that the smaller spacing represents the pairing (right now, the larger spacing does, which draws the eye to the wrong pairs at a glance: 1 and the red thing, 0 and the blue thing, etc). Since you are right-justifying an unknown number of characters (3 max, I imagine), it would be easiest to shift the numbers to the left side, so that the static side is always close.

Originally posted by Aesica:
Interesting that you thought the accessories and weapons were paired, because they’re not supposed to be. I guess that shows that having them so close was something I really, really overlooked and need to address.

Eh, I think that was just me doing sloppy editing. I was refering to the resistances and their numerical values (assuming you meant the above section I quoted).

 
Flag Post

Topic: Game Programming / Show us a screenshot of what you're working on!

Are the images/numbers on the right resistances or attack (if there are resistances of particular types, there must be attacks of each type as well, and vice versa)? Obviously the crossed swords indicate attack (or possibly physical damage rather than “elemental” damage), but how does that apply towards resistances? If I’m not completely misinterpreting that, maybe use an attack/defense system (e.g., 0/-10 dark would indicate no dark attack and 10 susceptibility to dark damage)… Also, consider showing item stat adjustments when showing info for item, if you’re not doing that already (e.g., “Shlong of the Sun” sword increases light damage +1 over what the currently-equipped “Dawnbringer” gives, plus +2 fire damage, but -1 to the currently-equipped necklace’s ice defense). If you don’t want to overlay numbers on the images, at least make the spacing such that the smaller spacing represents the pairing (right now, the larger spacing does, which draws the eye to the wrong pairs at a glance: 1 and the red thing, 0 and the blue thing, etc). Since you are right-justifying an unknown number of characters (3 max, I imagine), it would be easiest to shift the numbers to the left side, so that the static side is always close.

Depending on the depth and complexity of inventory, tabs for item types might be good (one section for each of the equip types and one for consumables). Being able to sort the items by specified criteria would be good (maybe clicking on the attack side of the fire icon would sort current inventory page by which items have the highest fire damage)… Obviously that would take a bit to implement, but I think your players would appreciate it (or maybe it wouldn’t be worth it, I don’t know — I really think it depends on just how potentially large and diverse your inventory gets).

I’m assuming the item descriptions are explained somewhere (for instance, what does the [31] mean? Is it the item’s “catalogue number”, level, durability…? What does power mean in relation to attack, “elements”, etc? Is it a damage multiplier/modifier, how much energy/MP/AP it takes to use, a stat modifier…?).

 
Flag Post

Topic: Game Design / 2030 story, correct my english please

Use clasher235’s version, it is much better. No need to add me to the credits, but thanks, anyway.

 
Flag Post

Topic: Game Design / Game Released-Feedback For Sequel

Originally posted by kantieno:

I feel as though the xp web, while maybe a nice idea, is a bit impractical and not very user friendly. It may be better to just have a more standard level up screen involving different perks[…]

Well, as I said, I liked it. I don’t know why you think it is user-unfriendly, other than a little legibility issue. You have the room to increase the icon size without interfering with your web pattern, but rather than use the current/max number system (which is OK, apart from being difficult to read), you could do something like add some elements to the edges of the icons that indicate progress. For instance, a skill with a max of 3 would have three circles (1 at top and one at each bottom corner, perhaps) that light up as the skill progresses. If you want to get fancy, the activated circles could then move in and “infuse” the skill icon, colouring it.

Though if you want to really simplify it, you can use a slot-machine-style system, where the player only gets to pick between three possibilities chosen for them at random (from a pool of eligible skills) when they level up. You could even let the player collect things in game that would allow a re-spin. Is that what you meant, or that when [current level]%[number] == [another number], you would select and show a specific skill tree subset (in your case, [current level]% 4 == 0, subset is health; == 1, subset is agility; == 2, subset is attack; == 3, subset is energy… for example)? The latter would seem far more complicated (unless you remove their current prerequisites) and less flexible for the player.

With the slot machine, you can give the player “skill tokens” that they can use to play, if you don’t want to force them to choose the moment they level up. With the subset system, if you allow deferral, you would basically have four skill tree page tabs instead of one, which seems less user-friendly.

Plus, you have the added bonus that your current system resembles a ninja throwing star.

Originally posted by kantieno:

Trying to figure out what to do with terrain was a little difficult. I wanted to keep the need to perform skillful jumps and avoid obstacles like in many platformers, but as you said, the actual combat was very easy to deal with in comparison. I would either need to make combat more important or make skills that affect platform navigation.

I feel that it may be better to just try and blend combat more into the level design itself, or make obstacles deal damage and knockback players instead of instakill, so that getting injured by them would make subsequent combat more dangerous.

Insta-reset hazards are length scaling. What I mean by that is that if you have a hazard right at the begining of a level, there is virtually no penalty to being reset, whereas the one at the end (particularly when there are other difficulties beforehand) has a relatively very high penalty. The longer the level and/or the more hazards to traverse, the higher the differential. With knockback and damage, the penalties are more even (though they will still be marginally higher toward the end, due to the possibility of reset).

Originally posted by kantieno:

Thank you for your input! I think with more polish and the removal of some of the clutter the sequel could be much better. There were several ideas I added, like crafting, because it seemed like crafting would be neat to have, but that just made it cluttered and harder to get to the good stuff. I suppose I need to do what has been suggested several times and write out my intended features and then cut out half of them, and then cut it in half again. Would likely be beneficial in getting straight to the point of the game.

With respect, I disagree. The reason to scale back a project is usually to get it done, not because the extras are undesirable (they can be, but that is wholly dependent on the feature). Many people (including me), tend to continually add features and ideas as we progress, so the project is never done. You got it done. While it is true that you can add so much stuff that it becomes very hard to get into the game, you are nowhere near that.

The sole problem with the crafting is that none of the craftable items are really that useful. By the time I could craft most of them, I was powerful enough that they would’ve been inconsequential (I used two for the first boss battle, as I didn’t know what I was getting myself into, and I was weak enough at that point that the spider boss was legitimately dangerous). None of the few quests you included required crafting (instead of one asking for a stick, they could’ve asked for one of the crafted items), and the sword was already obsolete by the time I created it (IIRC — I may have used it for a short time). It can’t “get in the way of the point of your game” when it isn’t even required anywhere and is hidden on the tab of a page that no one ever has to go to. As a matter of fact, I think it could’ve used more emphasis.

 
Flag Post

Topic: Game Programming / What else do I need?

Under Tools > Program Settings…, select AS3 Context and look for “Installed Flex SDKs” in the “Language” section. If you press the “” button to the right of it, you can add the path to the SDK there.

 
Flag Post

Topic: Game Design / Game Released-Feedback For Sequel

I thought it was very well done. I liked the XP web, but the numbers were sometimes difficult to read.

If you’re going to let the player earn XP by destroying random terrain/items, the XP gained should be considerably less than one gets from enemy kills. I would also not have them re-spawn (or at least have a wait time before they do).

Personally, I like to be able to permanently clear enemies out of areas. You can let the player farm XP and also allow clearing of areas by having respawn only occur if the boss for that area is alive (I’d prefer to be able to mop up survivors afterward, but typically in a game done like this they are instantly vapourized along with the boss). Maybe make it so that the big, bad evil at the end resurrects bosses after a set time (which in turn would re-spawn their area’s enemies — but there should be a long enough delay that the player could wipe everything out, including the end boss, before a resurrection, and there would need to be some indicator for the impending resurrection… so maybe not worth it)?

Terrain hazards were by far the hardest part of the game. The enemies and bosses felt like the distant second as far as threat. You only get damaged by enemies and bosses, but terrain insta-“kills” (yes, it is just a minor reset, and IIRC deaths by enemy were supposed to set you back further, but I never died from enemies). Also consider that as the player gets stronger, the enemies by comparison get weaker, but the terrain hazards are never any less dangerous. Add to that that you can eliminate enemies, but the hazards are impervious.
I would suggest at the very least having an upgrade or armour that lets the player take damage from terrain hazards. Alternatively, you could ramp up the enemy/boss difficulty to match (but you’ll likely put off more casual gamers that way).

Some suggestions for the current bosses (you’d want different bosses for a sequel, but this should give you some ideas, I think):
Shadow Creature: Consider adding a jumping attack and increasing its run speed. Maybe have a % chance of deflecting projectiles?
Spider: Add a web attack that slows the player, or that make a section of the play area slow the player. Maybe increase initial speed, but let player hack off legs, slowing the spider?
Mountain: If player gets hit, have it throw them back and stun them for a short time (ideally, stun time would be a random amount between a min/max). Maybe add a lava pour/spew that can set player on fire (damage over time). Player should have to roll around on the ground for a bit to put the fire out.
Mushroom: Rather than another chasing enemy that is essentially a slower spider with an occasional scatter shot, consider having the mushroom boss stationary. Add a spore blast that will grow more mushroom bosses. This will require that the player comes to the boss, rather than the boss to the player, and adds urgency.
Attack range and power, as well as HP, should scale with size. Spore blast should only be for those over a certain size.
End Shadow Thing: Add a tongue-like attack that drains HP from player and adds to itself. Add slow, guided emanations. If you want to get really nasty (it IS the end boss, after all), don’t have the emanations damage the player, have them create shadow copies of the player if they touch him/her.

“Bug” note: There are some places where the dialogue box says “Press A to continue”, but pressing A doesn’t do anything. Most of the time, this is because there is a prerequisite that hasn’t been met yet, but there were a few times this happened where it didn’t seem to be the case. When a prerequisite is required, there should be an alternative text that appears (after pressing A).

 
Flag Post

Topic: Game Design / 2030 story, correct my english please

Just as a quick edit…

Some parts were technically OK, but I changed them for stylistic reasons (such as changing from many uses of “a few [units of time] later”):

Fifteen years ago, somewhere in an isolated region…
Nuclear weapons were ready to fire, should it be necessary.
But the computer used to compile the software that controlled their deployment
was infected by a virus that modified the launching system behavior.
One day, the nuclear weapons received the order from the virus to fire.
Nobody expected it until it was too late.
The weapon launched was a new nuclear weapon capable of annihilating the entire Earth.
At first, people thought that it was just another ballistic missile test.
Soon, three giant explosions obliterated a large part of the planet.
Even though a lot of people died on the first day, it was not the worst of what happened.
After several days, intense volcano activity began. There were explosions so powerful that the earth’s core was affected. Mankind was ending.
Over the next few months, Earth began disintegrating, and all life on the planet was disappearing.
Then an alien spaceship arrived. They came to save the humans from their own destruction.
A few years passed, and the aliens’ technology enabled them to create new humans from DNA they collected.
They helped the humans to jump start a new civilization from Earth’s remains.
The aliens were surprised by the humans’ capacities, as they watched them quickly built a prosperous civilization. *1
Up until 2030, the new civilization extracted minerals from debris for the aliens — but their need for resources increased a lot, and some colonies refuse to continue.
You come from a human colony and you don’t plan to work for the aliens as a mineral extractor. Your colony kept enough gold to buy an interceptor ship. Your first job is as a freelancer. *2

*1 (I assumed it is supposed to be the humans quickly building a prosperous civilization…?)
*2 (I used “is” here because I assume that at this point we reach the present (as far as the narative goes))

 
Flag Post

Topic: Game Programming / what about a good Flash Chess?

There was a good Shogi (Japanese chess) game out there (though I can’t recall the name), with puzzles and “story” progression (I could tell there was some sort of story and the opponents changed, but I couldn’t read enough kanji to tell what the story was), though there were no Battle-Chess-like capture animations (there was a Battle Chinese Chess, though). The puzzles were pre-set piece situations that you had to resolve in a certain number of moves. IIRC, you had to solve one when an opponent changed.

I agree with saybox’s response in general, but I wouldn’t consider Battle Chess to be novelty chess — it’s just chess with some animations.

 
Flag Post

Topic: Game Programming / Scrolling world (y and x) revisited.

Hadn’t we already gone over that?

Move character right (character.x += stepSize)
Move container left by same amount to keep character in centre (container.x -= stepSize)

HitTestPoint uses stage’s coordinate space NOT the coordinate space of the object you’re calling it from. Use the localToGlobal function (below code is based on code from linked site):

var globalCharacter:Point = new Point(character.x + offset, character.y); 
globalCharacter = this.localToGlobal(globalCharacter); 
if (ground.bottom.hitTestPoint (globalCharacter.x, globalCharacter.y, true) || (ground.hitTestPoint(globalCharacter.x, globalCharacter.y, true)))

However, hitTestPoint is expensive and unnecessary, since it is easy enough to create your own collision detection code (without the need for localToGlobal calls):

if ((character.x + character.width >= ground.x) && (character.x <= ground.x + ground.width))
// makes sure that character is at least partially within ground's x area
{
   if ((character.y + character.height >= ground.y) && (character.y <= ground.y + ground.height))
   // sees if character is at least partially within ground's y area (overlapping)
   {
      // collision has occurred! implement collision code here
   }
}

The above code segment tests the full space of the character against the full space of the ground object and at their present locations (no offsets or projections of movement), but you should be able to adjust as needed (you should make your own collision detection function that takes arguments for what two things you are testing against each other — the above code is just a simple example. Don’t force one object to be ground and one to be character (yes, I know I did that in the code above — don’t do that. I just did it that way to (hopefully) make it more clear what I was doing), since you can use the code for other collision detections (character with enemy, enemy with ground, etc) — at worst, use MovieClips as the parametres (assuming character, enemy, ground, etc are all MovieClips)).

Note: The above code assumes that all tested objects are within the same coordinate space (which they should be, since you’re adding them all to the same container — but if you have, say, an arm object that you want to test that is attached to your character object, you’ll have to adjust for that, since the arm object would be using the character’s coordinate space (you can just add the character’s coordinates to the arm’s coordinates to get the adjusted, correct coordinates)).

Ideally, you wouldn’t move your container if the character is close to the edges of your game area (less than half of screen width or height), but you can worry about that (should you choose to) after you have your other issues sorted.

 
Flag Post

Topic: Game Programming / Scrolling world (y and x) revisited.

if (ground.bottom.hitTestPoint(x, y, true || ground.hitTestPoint(x, y, true)))

Let’s break down what, exactly, you are passing in to the first hitTestPoint function:
x coordinate (OK)
y coordinate (OK)
true OR the result of ground.hitTestPoint(x, y, true)*
*this is the final argument for the first hitTestPoint, NOT the second half of a 2-part if statement. Since an OR with one of its arguments as true will always be true, the above code snippet can be shortened to this:

if(ground.bottom.hitTestPoint(x, y, true))

Compare that to this:

if(ground.bottom.hitTestPoint(x, y, true) || (ground.hitTestPoint(x, y, true)))

The above snippet says “do the following block of code if ground.bottom.hitTestPoint(x, y, true) returns true or ground.hitTestPoint(x, y, true) returns true”.

Your code appears to work, but it is actually bypassing an important part of your calculation (I assume — I haven’t actually looked through all of your code).

 
Flag Post

Topic: Game Programming / Scrolling world (y and x) revisited.

You really should be more careful with your formatting (both your code and in this forum).

This:

if (ground.bottom.hitTestPoint(character.x +13, character.y, true
 || ground.hitTestPoint(character.x -13, character.y, true)))

is NOT the same as this:

if (ground.bottom.hitTestPoint(character.x +13, character.y, true)
 || ground.hitTestPoint(character.x -13, character.y, true))

Can you see what the (very important) difference is and why?

 
Flag Post

Topic: Collaborations / Need playtester and music

First off, dialogue that progresses at a set rate (and especially at a rate that doesn’t even take the length of text into account) is not a good idea, as some people read faster than others. Add to that that the dialogue changes positions so that you have to locate it before you can start reading. I managed to read most, but not all, of the intro dialogue, but english is my native language and I’m a fairly fast reader (on most days, anyway). You should definitely let the player choose when to advance the dialogue, or at worst give speed, pause, and rewind controls to them.

Also, the dialogue that appears when you kill something does not take into account its position in the game world. Being partially off screen is OK if I can move so that I can read it, but if I kill something close to the edge, the dialogue should make sure that its boundary is fully within the gaming environment.

Fighting the boss in “asktimes” (if I was doing anything to him, I couldn’t tell — there needs to be some recognizable indicator for it being damaged), I died. There is a “continue” button when you die that doesn’t seem to do anything. So I go back to the level select screen and choose “evol”, but I’m right back in the boss battle, as though I pressed “restart” (restart would normally make me think that I would start the whole level over).

One of your markers reads “I have write it down… Before I forget everything…” (missing “to” between “have” and “write”).

Dailogue bubble: “Movies, games, books, they are all seem so much more fun than life” (remove “are”).

If I go left from the start screen, there are a group of islands with creatures on them, but it doesn’t look like I can reach them. Is that intentional (that they are out of range)?

That’s it for now.

 
Flag Post

Topic: Game Programming / Problems with resetting

Originally posted by dragon_of_celts:

Gah…

Just to be clear, I was getting frustrated at myself for failing to realize I needed to mention that, not at you.

Originally posted by moynzy:

Done the getter and setter in the onGround class,

I’ll listen to your advice and listen to 953 and put the objects in to an array and loop through them and remove.

Thanks guys. Many thanks.

You’re welcome. Let us know if the invisible goblin issue has been resolved once you convert it.

 
Flag Post

Topic: Game Programming / Problems with resetting

Gah… No, it doesn’t like it because with testRemoved typed to DisplayObject, it doesn’t recognize “status” (since DisplayObject doesn’t have it)… As 953 said, if you just put them in an array, you can get around all of these problems, because you won’t need to type the object as DisplayObject in the first place (because you won’t need to use getChildAt). In order to access status with testRemove as a DisplayObject, you’ll need to cast testRemove to OnGround as so:

if ((testRemove as OnGround).status == OnGround.STATUS_REMOVE)   

It’s really convoluted and messy, and using arrays is so much better (and easier). You then won’t need to constantly use getChildAt calls, just index into the array (I see you’re using an array for Knife objects, so you must already know something about them).

If you are trying to access a var that is protected from outside the object itself, then it will throw an error. Use a getter/setter method(s), or the usual function pattern and call that:

public function getStatus():int
{
     return status;
}
 
Flag Post

Topic: Game Programming / Problems with resetting

Ah, well if OnGround extends MovieClip, then anything that extends OnGround is also a MovieClip.

Now that I think about it, though, getChild/getChildAt returns a DisplayObject (which MovieClip extends), so you have to change testRemove to that. Sorry, I should’ve realized that earlier.

Change it to this:


var testRemove:DisplayObject;

Edit: Ninja’d. I was initially going to say the same thing about arrays vs. getChild, but I thought it might be a bit too much. Also, I wasn’t sure if he was using childrenOnStage somewhere else, which is why I left it in… Ugh, I guess I should’ve taken a bit more time looking at it and responding (and not dividing my attention).

 
Flag Post

Topic: Game Programming / Problems with resetting

If all of the relevant classes extend from OnGround, you should make testRemove an OnGround reference variable (pointer) instead of MovieClip. Sorry, I had assumed your OnGround class extended MovieClip, and since I didn’t know what other classes might be using the function, I used MovieClip (also assuming any other classes using it were extended from MovieClip).