trashantboy
11 posts
|
Topic: Game Programming /
Having Enemies Spawn Enemies
Thanks man! I’ll give that a try. It will hopefully work; I had already worked out something similar with the bullets, but hadn’t applied it to the enemies because… well, honestly because I’ve been making this far too piecemeal and hadn’t done it yet. It’s mostly experimental, so I wanted to try a couple of things.
I thought break would break both loops? What’s the difference between a break and a continue outerloop, then?
|
|
|
trashantboy
11 posts
|
Topic: Game Programming /
Having Enemies Spawn Enemies
That’s what I figured was causing the problem, but I can’t figure out how to circumvent it. Just using REMOVED doesn’t work, although that’s probably because removeChild is what I’m using to call “die” in the first place. Is there some version of removeChild that won’t null the parent reference?
|
|
|
trashantboy
11 posts
|
Topic: Game Programming /
Having Enemies Spawn Enemies
I’m creating a game where I want certain types of enemies to spawn additional enemies when they die. This is fairly common in shooters. Think asteroids, although the game itself is closer to Buster Brothers if you’ve ever played that. Anyway… the problem I am running into is that I am getting the following 1009 error:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at Enemy/die()[C:\Users\Joshua\FlashDevelopProjects\Spitwad\Spitwad.current\src\Enemy.as:90]
at flash.display::DisplayObjectContainer/removeChild()
at Level/enterFrame()[C:\Users\Joshua\FlashDevelopProjects\Spitwad\Spitwad.current\src\Level.as:55]
Can someone help me figure out why it is throwing this error instead of spawning the new enemies? I have spent several hours trying various things to track it down (so the posted code is a little sloppy and filled with commented out lines), but I can’t figure it out. Thanks in advance for any help you’re willing to give me.
The “die” function:
private function die(e:Event): void {
removeEventListener(Event.REMOVED_FROM_STAGE, die);
removeEventListener(Event.ENTER_FRAME, moveEnemies);
trace(this.name);
// trace((parent as Level)._enemies[(parent as Level)._enemies.indexOf(this)].name);
(parent as Level)._enemies.splice((parent as Level)._enemies.indexOf(this), 1)
switch(type) {
case 1:
break;
case 2:
var newguy:Enemy = new Enemy(x, y);
(parent as Level)._enemies.push(newguy);
//(parent as Level)._enemies.push(new Enemy(450, 30, 1, -10));
//addChild(newguy);
addChild((parent as Level)._enemies[(parent as Level)._enemies.length - 1]);
break;
}
}
and the enterFrame function from Level:
private function enterFrame(e:Event): void {
//check collisions
outerloop: for each(var bullet:Bullet in character._bullets) {
for each(var b:Enemy in _enemies) {
if ((b.x - b.width/2) < bullet.x && bullet.x < (b.x + b.width/2) && (b.y - b.height/2) < bullet.y && bullet.y < (b.y + b.height/2)) {
character.killBullet(bullet);
//_enemies.splice(_enemies.indexOf(b), 1);
trace(_enemies.length);
removeChild(b);
//addChild(_enemies[length-1].name);
trace(_enemies.length + " = new");
continue outerloop;
}
}
}
|
|
|
trashantboy
11 posts
|
Topic: Game Programming /
Synchronous Multiplayer on Kong
That’s what I needed to know. Thank you.
|
|
|
trashantboy
11 posts
|
Topic: Game Programming /
Synchronous Multiplayer on Kong
Is it possible to have synchronous multiplayer using Kongregate’s servers for a small game, or are you required to have your own server for that? If so, how? I have yet to publish a game on here, since I just started developing, but one of the projects I am working on is a 4-player card game called Pinochle (Think Hearts: 4 players to a game, no more, no less) I would like to include the option of having 4 players play together instead of just 1 against 3 computers. Is it possible to do something like that?
|
|
|
trashantboy
11 posts
|
Topic: Clash of the Dragons /
Scroll of the Dark Dreamer - useful or not?
I had this used against me in PvP once; it was dramatic. Scroll is a game-changing card, but it’s also a last resort and almost impossible to use. If you have a lot of other talismans that would be better, the consistency of them will outweigh the scroll in the long term. However, it can be worth holding onto; think of it like a super-critical hit. It’s not something you can rely on, but it’s awesome when it happens.
|
|
|
trashantboy
11 posts
|
Topic: Clash of the Dragons /
Duel Mischarge
They read these too, don’t they? I read forums over there all the time, but I don’t actually have an account for it so I can’t post :/
|
|
|
trashantboy
11 posts
|
Topic: Clash of the Dragons /
Duel Mischarge
Not sure if this was a one-time thing or not, but duel just charged me 10,000 gold instead of 5,000. Normally I wouldn’t even notice, but I only had 11k gold at the time, so I was going to duel twice. I got matched up against a level 26 for an easy win the first round, and then he fled second round. When I tried to go into duel again, I only had 1k gold left.
Can anyone else verify if this is a problem, and if so, can we bring it to a devs attention?
|
|
|
trashantboy
11 posts
|
Topic: Clash of the Dragons /
Server down for some
It’s 12:15 AM MST, and I’m having trouble logging into the game. I’ve been trying for twenty minutes, but it keeps popping the “server down for maintenance” screen after a minute of trying to connect. I assume it’s just timing out.
I’m not the only one with the problem. At least 4 other people in kong chat are having the same problem. However, it’s not a server down issue, because there is at least one person (also in kong chat) who is brawling at the moment.
I can’t submit an official bug report because I can’t log into the game, but just wanted to bring it to your attention. I don’t know what other information to pass along to you, but I assume your sysadmin has access logs of network and server connections. There might be information there? It would be nice if you could figure this out, and even nicer if you could let us know what the problem was, because I haven’t seen anything like this before. :D
|
|
|
trashantboy
11 posts
|
Topic: Clash of the Dragons /
Zone 3 "glitch"?
Rip, we can’t really give you advice on how to get cards. You just have to have a little patience until you get lucky to find them from packs or brawls.
As for where to focus -
Torments are found from z1 brawls (beastman chieftain, beastman champion)
Wizards Bane is found by crafting damaged wizard hats which are collected from any clan brawls (this might take awhile. orange is hard to get)
Magekiller arrow is crafted from items found as bonuses from decks. Nothing you can really do about this one besides buy card packs.
Healing Light comes from packs.
Golden Glory can be found in gold packs (I think). Baron from z2 also has a chance to drop them if you brawl him.
If you don’t have the cards to beat them consistently yet, there’s nothing we can do to make you win all the time. You just have to do lots of brawls, and maybe go back and repeat some of the other zones on harder difficulty levels until you can get the cards you need. I recommend z2, since if you get to nightmare, you can unlock a rare brawl called succubus who has some good drops.
|
|
|
trashantboy
11 posts
|
Topic: Technical Support /
Error in badge for Love?
After seeing this game for Badge of the Day, I decided to go back and get that last badge for 18000 points. I did it on about the 3rd try with a score above 23000, and submitted it using the name “Trebar” via the in-game submit button. The badge didn’t award, but I didn’t grab a screenshot because I figured it was just a delay until I went back to a menu or reloaded the game; this happens on a regular basis for many games.
Needless to say, it didn’t award it or I wouldn’t be mentioning it here. I was looking through the comments section of the game and it seems like this has happened on multiple occasions over the past several days.
I’ll try to get a score above 18000 again so I can grab a screenshot.
|