XplittR
8 posts
|
Topic: Kongregate Labs /
waves of enemies without the mess
This is how we learnt to set up our divisions at school:
1 : 10 =
1 Cannot be divided with 10, so:
1 : 10 = 0
0
Which gives
1: 10 = 0
0
_
1 (the rest)
So 1 % 10 = 1 => 1/10 = 0 with 1 in rest.
Got it? :)
|
XplittR
8 posts
|
Topic: Kongregate Labs /
Shootorial 5 Help -Arcaian
So many people fail at this point it seems. Put an “;” after “Blood()”. I guess “hereship” is your ship :P
|
XplittR
8 posts
|
Topic: Kongregate Labs /
Pause button too sensitive
Draco, I also didnt make it work, until I made the “else” function :P First I had some long shit, and it didnt work, so I converted it into this, and then it worked :D remember to set “var pauseLimiter;” in the class (before onLoad) and also “pauseLimiter = 10;” in the onLoad, so that people do not have to wait to be able to pause :P Also, “_root.Paused” is my pausescreen :P
|
XplittR
8 posts
|
Topic: Kongregate Labs /
Pause button too sensitive
Here is my code, witch is placed inside the onEnterFrame in the ships class:
pauseLimiter += 1;
if(Key.isDown(80) && pauseLimiter > 10){
if(_root.Paused._visible == true){
_root.Paused._visible = false;
pauseLimiter = 0;
}
else{
_root.Paused._visible = true;
pauseLimiter = 0;
}}
Then I just set everything to move then root.Paused.visible == true
|
XplittR
8 posts
|
Topic: Kongregate Labs /
In need of help. Powerups!
Thanks people!
The error was:
The alpha dropped down to 0.001, and then tried to drop further down, but as alpha cannot go into an negative value, It wouldnt get reduced any further, and therefor never get below 0 (in if(root.skjoldgrey.skjoldfarge._alpha < 0).
So I changed to reduce by (1/3), but neither did that work (as then it would drop down to 0.000(unlimited 0’s)1, which is still above 0).
So solution: if(root.skjoldgrey.skjoldfarge.alpha < 1)
or something like < 0.002
Thanks people! :D You really helped me out! :D
|
XplittR
8 posts
|
Topic: Kongregate Labs /
In need of help. Powerups!
Cervello, I think that you are talking about AS3, as I cannot remember anythying about set the variable to null, just as Draco18s said. And about the names, they make sense to me, as I am Norwegian(skjold = shield), and I have checked several times for typos. But Draco, I do have the same code as the shootorial, exept I use if(_root.skjoldgrey.skjoldfarge._visible == true)
instead of if(_root.ship.shield._visible == true)
Well, that is how I have chosen to do it though, and as far as I can see, it should be working. Also, yeah, 30 seconds after activating the shield, I still take no damage (But I do before activating it). Also, after I have activated the shield, and I pick up another shield, then the new shield does not glow Blue, but the effect is still there (from the last shield probably).
Help!
|
XplittR
8 posts
|
Topic: Kongregate Labs /
In need of help. Powerups!
Well, I have been following the tutorials, and made it work really good, with a few adjustments. One of them being that at the top I have a bar so that you can at all times see what kinds of powerups you have. For now I have only added two long-lasting powerups, which is shield and “three shots at once”. It works fine, when I pick up a powerupmovieclip, the shield (in this example) gets turned on (blue glow around my ship) and the bar gets activated (simply _root.skjoldgrey.skjoldfarge gets visible to “true”, as in the tutorial. The “skjoldfarge” is a layer inside the movieclip “skjoldgrey”). Well, that works. and the alpha drops down to zero after some time, but the effect (not getting hurt) never stops… So if you pick up an powerup, it lasts forever. I have been struggeling with this for a while, but now I hope that someone of you professionals can help me out. :)
Here is the code for the shield in the “PowerUps”-class:
if (type == 3)
{
_root.ship.shield._visible = true;
_root.skjoldgrey.skjoldfarge._visible = true;
}
And here is my code for the shield-deactivation in the “Ships”-class:
if(_root.skjoldgrey.skjoldfarge._visible == true)
{
_root.ship.shield._alpha -= .333;//10 sekund, 100/(sekund*30)
_root.skjoldgrey.skjoldfarge._alpha -= .333;//10 sekund, 100/(sekund*30)
if(_root.skjoldgrey.skjoldfarge._alpha < 0)
{
_root.ship.shield._visible = false;
_root.ship.shield._alpha = 100;
_root.skjoldgrey.skjoldfarge._visible = false;
_root.skjoldgrey.skjoldfarge._alpha = 100;
}
}
If you can help me out, or atleast try, I would greatly appreciate that! :)
-Sincerely, XplittR
|
XplittR
8 posts
|
Topic: General Gaming /
6 differences walkthrough
You skipped the second one and repeated another one :P
|