Recent posts by SumYungGai on Kongregate

Subscribe to Recent posts by SumYungGai on Kongregate

avatar for SumYungGai SumYungGai 342 posts
Flag Post

Topic: Game Programming / Frozen frame

Oh, alright. That sucks, but thank you.

 
avatar for SumYungGai SumYungGai 342 posts
Flag Post

Topic: Game Programming / Frozen frame

AS3 and CS3

(sorry for the long wait of a response)

 
avatar for SumYungGai SumYungGai 342 posts
Flag Post

Topic: Game Programming / Frozen frame

Still need help… it’s done this to a lot of games I tried to make and it’s really annoying me… .

 
avatar for SumYungGai SumYungGai 342 posts
Flag Post

Topic: Game Programming / CS4 Help with workspace

Umm… you could reset the Workspace to Default. Or, go to the zoom menu and select %100 instead of… maybe you have something else.

(I have CS3 so maybe it irrelevant)

 
avatar for SumYungGai SumYungGai 342 posts
Flag Post

Topic: Game Programming / need help with rotation in as2

You’ll need to multiply the trig functions by the radius of your ship (eg. the cannons are 30 px away from the center, multiply by 30);

 
avatar for SumYungGai SumYungGai 342 posts
Flag Post

Topic: Game Programming / Frozen frame

The “shoot” frame has no code in it. (And btw, it’s frame 2) I experimented a little more and found that:

Going to ANY frame, including the first frame, plays it twice.

And, in my first post I probably should have worded the timeline desciption as…

When I call gotoAndPlay(“shoot”); The frame I do so on I will call frame 1:

On frame:

1:I call the function, and it shows the “shoot” frame
2:Still showing the “shoot” frame…
3:Shows the frame after “shoot”
4:Shows the frame after, the frame after “shoot”

Did this help more?

Also… this is a 2 fps file on my .swf

The left tower (it’s supposed to be a pink Bonzai) looks likes it plays perfectly, but it’s actually playing frame 1,1,2,3,4,5,1
and the right tower actually looks like the problem I’m having., because it plays 2,2,3,4,5,1

 
avatar for SumYungGai SumYungGai 342 posts
Flag Post

Topic: Game Programming / [As3] Play Timeline from Class

Oh, I meant that block of code for the main timeline. You’d have to find someone else, I’m afraid, if you want help on doing events inside classes.

 
avatar for SumYungGai SumYungGai 342 posts
Flag Post

Topic: Game Programming / [As3] Play Timeline from Class

Did you do that in the main timeline?

 
avatar for SumYungGai SumYungGai 342 posts
Flag Post

Topic: Game Programming / Frozen frame

I have a frame labeled “shoot” and when I do
Object.gotoAndPlay(“shoot”);
It freezes on that frame, for 1 frame, before playing the rest.

So like… Frame:

1:I call the function, and it shows the first frame
2:Still showing the first frame…
3:Shows the second frame
4:Shows the third frame

If I start at the frame before it, it works, but that frame also has a stop, which in my mind, shouldn’t play my shoot frames at all.

(a)(shoot)()()()(a)

a1: stop();
a2: gotoAndStop(1);

 
avatar for SumYungGai SumYungGai 342 posts
Flag Post

Topic: Game Programming / [As3] Play Timeline from Class

I’m not really sure if you can do that from classes actually. I don’t know if the class can identify the stage.

I know if you give the button a MOUSE_DOWN and have a function to make the stage go to the next frame, that would work. Again, though, I’m really not even sure if what you’re going is possible, but it may be.

So I’d so it as:

myButton.addEventListener(MouseEvent.MOUSE_DOWN, startFrame2);

function startFrame2(e:MouseEvent){
   stage.gotoAndPlay(2); //Or gotoAndStop...depending on what you need
}

Sorry I couldn’t help more.

 
avatar for SumYungGai SumYungGai 342 posts
Flag Post

Topic: Game Programming / [As3] Play Timeline from Class

I think I know why…

try

package {
	import flash.display.MovieClip;
	public class MyClass extends flash.display.MovieClip {
	_otherStuff_
}

NVM about that stuff… I wasn’t sure what was going on…
So your button has a class, and from that class you want to manipulate the main timeline of the stage?

 
avatar for SumYungGai SumYungGai 342 posts
Flag Post

Topic: Game Programming / [As3] Play Timeline from Class

The normal thing is to do Object.gotoAndPlay(frame)

If you start from a class file it would be this.gotoAndPlay(frame)

I might be able to give a better answer if you clarify a little more.

 
avatar for SumYungGai SumYungGai 342 posts
Flag Post

Topic: Game Programming / Custom Cursor.

Is this AS2 or AS3? Are you attaching the cursor dynamically is it on the stage?

 
avatar for SumYungGai SumYungGai 342 posts
Flag Post

Topic: Game Programming / [AS3] [Solved] Copying a multi-dimensional array by value

Lol, Wordblind I have no idea what you just said =P That’s fine. I don’t think I’ll be using that for a long time anyway…

Also, did I ever mention how awesome Jabor is? I had to tweak it, but afterward, that function works perfectly.

 
avatar for SumYungGai SumYungGai 342 posts
Flag Post

Topic: Game Programming / Accessing variables

Can you post your actual code?

 
avatar for SumYungGai SumYungGai 342 posts
Flag Post

Topic: Game Programming / Adding badges to my game? [SOLVED]

Only the Kong Team can add badges. But you can start the process by adding the statstics API and making a decent game.

 
avatar for SumYungGai SumYungGai 342 posts
Flag Post

Topic: Game Programming / [AS3] [Solved] Copying a multi-dimensional array by value

Ok. I shouldn’t really need any more than 4. Though 3 is the max in my level creator. Thanks _

Do you know the answer to my random question, too?

EDIT: OH! I just found your recursion there. That’s why it will work. =P

 
avatar for SumYungGai SumYungGai 342 posts
Flag Post

Topic: Game Programming / Passing Variables

And if they are one-time. you can get rid of those variable you have at the top.

 
avatar for SumYungGai SumYungGai 342 posts
Flag Post

Topic: Game Programming / [AS3] [Solved] Copying a multi-dimensional array by value

That looks great =) But, will that work with 3 dimensions also? (And rather infinite dimensions)

 
avatar for SumYungGai SumYungGai 342 posts
Flag Post

Topic: Game Programming / Passing Variables

You probably don’t want to you int. You will probably have number which have decimal place values. Though it shouldn’t make that much a difference. <rhetorical>What does 1/2 of a pixel or a degree look like, really?</rhetorical>

 
avatar for SumYungGai SumYungGai 342 posts
Flag Post

Topic: Game Programming / [AS3] [Solved] Copying a multi-dimensional array by value

It seems to work differently with the ColorMatrixFilter.

For example. I used

var alphaArray:Array = [0,0,0,-1,100]

Which multiplies the old alpha by -1 and adds 100 to it. If alpha were 1 at max, 99 would be the lowest number for my alpha, rendering it at max. But this is not so. Only about 1/3 of by picture shows up, which is a Perlin Noise with an alpha channel.

 
avatar for SumYungGai SumYungGai 342 posts
Flag Post

Topic: Game Programming / Passing Variables

Originally posted by creeplover:

I tried and failed. I need to pass some one-time numbers to a new instance. I don’t know if there are other better ways to do this.

var bullet:Bullet = new Bullet(x,y,rotation);
stage.addChild(bullet);

Bullet constructor:

public var gunX:Number;
public var gunY:Number;
public var gunRotation:Number;
public class Bullet(gunX:Number, gunY:Number, gunRotation:Number) {
 x = gunX;
 y = gunY;
 rotation = gunRotation;
}

In all, I am trying to make the x, y and rotation of the gun be the same for the bullet. Tell me if there is a better way. I know my syntax is wrong, so please comment.

gunX, gunY, and gunRotation are not classed as such. They are numbers. Try this out and tell me if it works.

 
avatar for SumYungGai SumYungGai 342 posts
Flag Post

Topic: Game Programming / [AS3] [Solved] Copying a multi-dimensional array by value

This is how I set up my levels:

["Level Title", [Amount of enemies, Amount of set enemies], [Minimum Time Delay, Random Time Delay], [["setEnemyType", number], ["setEnemyType", number]], [["randomEnemyType", chance], ["randomEnemyType", chance]]];

As you can see, it’s an array with anywhere between 1 and 3 dimensions. array.slice() takes the parts of the array which are one-dimensional, and transports them, by value, over to a new array. But the multi-dimensional parts are kept by reference.

I was hoping for an easy way to overcome this, perhaps a recursive slice or something, preferably not destroying the little amount of order I already have in the levels code.

RANDOMNESS:
Also, is the alpha portion of the ColorMatrixFIlter by a value of 255 like the colors? Or is it something different?

 
avatar for SumYungGai SumYungGai 342 posts
Flag Post

Topic: Game Programming / Hyper Furious Turret Attack 2 - Balance

I played on Medium:

The bug things were a bit difficult at first. I couldn’t kill them as fast as they were coming in.
The tanks were too slow or perhaps too armor…less to deal any damage to me. They died too easily.
I have 1 hp right now. Level 9 is insane.

Easy:

Much easier. In fact… too easy. I just can’t die. I’ve gotten hit, but my HP is always 100 at the start of each level.
Level 11 is waaayyyy too easy.
Level 12 I had the shotgun….The shotgun is terrible compared to the other guns. I died almost instantly.

Random crap:

The “Next Level” music sounds really out of place to me.
The text boxes need to be non-selectable.
The equip buttons seem useless. Why would I equip something less powerful than what I have already? (Unless it’s a personal preference to have lasers instead of many bullets?)

 
avatar for SumYungGai SumYungGai 342 posts
Flag Post

Topic: Game Programming / Rotating and shooting towards mouse.

Originally posted by thegamemaker777:

…I started to learn Flash two days ago). =)

http://www.emanueleferonato.com/2006/10/29/flash-game-creation-tutorial-part-1/

You probably are more advanced than part 1, but the later ones are interesting. Oh, and get into AS3 ASAP. Maybe a few months or so. =)