Recent posts by Balidani on Kongregate

Subscribe to Recent posts by Balidani on Kongregate

13 hours ago ago
avatar for Balidani Balidani 178 posts

Topic: Programming / Kalinium

i lol’d.
suckup D:

 
15 hours ago ago
avatar for Balidani Balidani 178 posts

Topic: Programming / A new Game?

The only question is: what is the point? You can’t really save those animations or convert them to any file as far as I know.

 
Nov 20, 2008
avatar for Balidani Balidani 178 posts

Topic: Programming / Hollow symbol

There is no way to make it hollow. You have to use a modified hit testing method :)

 
Nov 20, 2008
avatar for Balidani Balidani 178 posts

Topic: Programming / Pausing the game *sigh*

if (!paused) {
doAllTheThings();
} else {
showPauseScreen();
}

It’s not that hard…

 
Nov 16, 2008
avatar for Balidani Balidani 178 posts

Topic: Programming / Day/Night music

What exactly do you have the problem with? If you know how to play music and know how to separate the night from the day in code, you should be able to do this. Sorry, but I dont understand your problem yet.

 
Nov 15, 2008
avatar for Balidani Balidani 178 posts

Topic: Programming / Solid Objects

There are a lot of ways to make objects ‘solid’. The hitTest function in AS2 may be one of the ways to solve this, but it is just a little part of the solution. hitTest is not really accurate so you might need a better hit testing method, probably written by yourself. Now if this is ready you need to add physics to your game. This is kind of complicated, and if you are just starting to learn actionscript I don’t advise you to start with this. Of course there are a lot of tutorials on the internet that teach you how to do this.

 
Nov 10, 2008
avatar for Balidani Balidani 178 posts

Topic: Programming / AS2 or AS3?

I agree with the guys above. AS2 = fast to learn but dirty. AS3 = elegant and powerful. it takes a while to get used to it though.

 
Nov 7, 2008
avatar for Balidani Balidani 178 posts

Topic: Programming / Changing delay dynamically. (AS3)

Thank you so much :P

 
Nov 7, 2008
avatar for Balidani Balidani 178 posts

Topic: Programming / Changing delay dynamically. (AS3)

I have a Timer in AS3 and I could not find any information on how to change the delay of it dynamically. I tried making the delay a variable but it seems the timer only checks for delay when it is created…

 
Nov 5, 2008
avatar for Balidani Balidani 178 posts

Topic: Programming / yscale in AS3?

Thank you! I tried with google but after a few tries I gave up thinking it is something very simple in AS3 or something very complicated.

 
Nov 5, 2008
avatar for Balidani Balidani 178 posts

Topic: Programming / yscale in AS3?

Quick question: What is _yscale in AS3? In AS2 it was so easy to use but what do I use in AS3? Thank you!

 
Nov 1, 2008
avatar for Balidani Balidani 178 posts

Topic: Programming / Trig in flash...

well, that is the ‘art’ of programming :)
you have to think in variables even when you are just drawing things on paper. I’d start by subtracting the two x and y coords and then I think I’d use some tan function, but I didn’t really look into this yet.

 
Nov 1, 2008
avatar for Balidani Balidani 178 posts

Topic: Programming / Trig in flash...

paper and pencil and some math are your best friends ;) I always use them when I’m trying to figure out something.

 
Nov 1, 2008
avatar for Balidani Balidani 178 posts

Topic: Programming / Keeping arrays clean?

Hi. I’m looking for efficent methods to keep my arrays clean. What I mean is: When I add an enemy onto the stage (a timer does it…) it is added to an array. When the enemy dies or goes off the stage I want to take that item out of my array. Also I want to do the same with my bullets. Are there any good (elegant) ways of doing this? Thanks!

 
Oct 31, 2008
avatar for Balidani Balidani 178 posts

Topic: Programming / Removing all children?

Thank you both, it works perfectly :)

 
Oct 31, 2008
avatar for Balidani Balidani 178 posts

Topic: Programming / Removing all children?

Is there a way to remove all the children of a MovieClip without knowing their names? I have a grid of tiles on stage and when I call the drawMap() function again the old normal tiles overlap the new invisible tiles (air), obviously because they weren’t previously removed. I tried clearing the graphics of my container MovieClip in the beginning of the drawMap() function but it didn’t help.
Thanks for any help :)

 
Oct 31, 2008
avatar for Balidani Balidani 178 posts

Topic: Programming / LAG???

yep it’s probably not because of the health, but with time you might be adding things to the stage you can’t see.
seeing the code would help us figure it out :)

 
Oct 31, 2008
avatar for Balidani Balidani 178 posts

Topic: Programming / Updating Map problem. /AS3/

thanks it works now :)

 
Oct 31, 2008
avatar for Balidani Balidani 178 posts

Topic: Programming / Gotoandplay?

isDown should work. it must be a typo

 
Oct 30, 2008
avatar for Balidani Balidani 178 posts

Topic: Programming / raelz's Problems With ActionScript

Make sure the file is Square.as with a capital S, also the fla file must be in the same folder.
In the fla file import your Square class with the command: import Square;
after this define a new Square variable with something like: var mySquare:Square = new Square(). Now you should be able to access your player with mySquare.Player

 
Oct 30, 2008
avatar for Balidani Balidani 178 posts

Topic: Programming / Its nooby question time! Actionscript problem

try learning about “attachMovie” ;)

 
Oct 30, 2008
avatar for Balidani Balidani 178 posts

Topic: Programming / Updating Map problem. /AS3/

Well the new Tile construction works, the problem only appears when I’m loading each tile into the array. It doesn’t say which line because I am in a class, it only names the function.
this is my code:


public function drawMap():void {
myMap.x=0;
myMap.y=0;
high=map.length;
wide=map[ 0 ].length; //god damn kongregate formatting…
for (var i:uint=0; i < high; i+=1) {
for (var j:uint=0; j < wide; j+=1) {
myTiles[i][j] = new Tile(map[i][j] + 1,xSize,ySize,j * xSize,i * ySize);
myMap.addChild(myTiles[i][j]);
}
}
}

When I use a new MovieClip instead of the Array and add the MovieClip as a Child of myMap it works :l
Thank you for you help by the way :)

 
Oct 29, 2008
avatar for Balidani Balidani 178 posts

Topic: Programming / Updating Map problem. /AS3/

Hmm it throws “Error #1010: A term is undefined and has no properties”. I suspect it is because the array was not previously set into a 2D Array, but when I try to do that it still doesn’t work… confusing. I’ll try to find out what is wrong now.

 
Oct 29, 2008
avatar for Balidani Balidani 178 posts

Topic: Programming / Updating Map problem. /AS3/

Thank you for your answer. I’ll look into it now. About the brackets, I originally used them but then I used auto-format and they disappeared. I was kind of puzzled but it didn’t change much so I left it there.

 
Oct 29, 2008
avatar for Balidani Balidani 178 posts

Topic: Programming / Updating Map problem. /AS3/

Hi! When I used to do tile-based stuff in AS2 I could name each tile and then move only one at a time. My question is, how do I do this in AS3? My map building code is here:


// the plus=1 thing is because of kongregates post formatting…
for (var i:uint=0; i < high; i+=1) {
for (var j:uint=0; j < wide; j+=1) {
var myTile:Tile=new Tile;
myTile.gotoAndStop(map[i][j] + 1);
myTile.width=xSize;
myTile.height=ySize;
myTile.x=j * xSize;
myTile.y=i * ySize;
myMap.addChild(myTile);
}
}

I wonder if this is a good map bulding code… I made it on my own so it might be wrong…