Recent posts by Bludger on Kongregate

Flag Post

Topic: General Gaming / [Cursed Treasure: Don't Touch My Gems!] What is so great about this game?

Originally posted by klyxes:

wlo, i agree with the hit chances with the dancingblades guys, lost quite a couple of brilliant badges if it werent for them, but the rest of the game is good

Couple of Temples can kill those bastards very easily.
The only really scary enemy are the ninjas. They’re like rogue gnomes, you hate them with all passion.

 
Flag Post

Topic: Kongregate Labs / Castle Crashers On PC!

Sure people would play it, but how do you plan to go around the Copyrights?

 
Flag Post

Topic: Game Programming / What I'm doing wrong here?

Thanks for the info, took me 10 minutes to wrap my brain around it, but I now understand what you mean.
Guess I’m gonna start learning AS3 better. Seems a lot better choice when it comes to stuff like this.

 
Flag Post

Topic: Game Programming / What I'm doing wrong here?

the shootSpeed varialbe is located in the same AS file as all the others.. this makes no sense.. but i will try it.

EDIT: No luck, still not working.

EDIT 2: What I meant in original text of this post is that all the variables and buttons and even the shooting function is located in the same file.

 
Flag Post

Topic: Game Programming / What I'm doing wrong here?

What does that mean?
Does it mean that I can’t change the variable directly? Should I make some functions for it instead?(Which I tried already and it didn’t work either)

Also, all of this code is located in one .as file and It’s using AS2.

 
Flag Post

Topic: Game Programming / What I'm doing wrong here?

Okay so I’m finished learning the Shootorial and I’ve started adding my own stuff to it.
One of the things I wanted was an adjustable shooting speed.

I made it like this:
________________________________________________________________
_root.speedButOff.onPress = function()
{
root.speedButOff.visible = false;
root.speedButOn.visible = true;
shootSpeed = 4;
}
_root.speedButOn.onPress = function()
{
root.speedButOn.visible = false;
root.speedButOff.visible = true;
shootSpeed = 0;
}

[…]
function onEnterFrame()
{
shootLimiter += 1;
if (Key.isDown(Key.SPACE) && shootLimiter > 8)
{
shootLimiter = shootSpeed;
var missile = _root.attachMovie(“Missile”, “Missile” + _root.getNextHighestDepth(), root.getNextHighestDepth());
missile.
x = x + 50;
missile.
y = _y + 2;
_root.soundFX.attachSound(“MissleShoot”);
_root.soundFX.start();
}
________________________________________________________________

The buttons are only for test purpose for easy enabling.

This doesn’t work, even though my logic says it should.
When I change the shootSpeed to 4 in onLoad() it works, but when I do it like this, it doesn’t.
Any advice?