Recent posts by Kalinium on Kongregate

Subscribe to Recent posts by Kalinium on Kongregate

17 hours ago ago
avatar for Kalinium Kalinium 672 posts

Topic: Programming / Timer Help!!!

if(_root.timetxt2.text == ‘00:05’){

Does that fix it?

We need more information to help you.

Also;

n -= 1

Is the same as

n--
 
20 hours ago ago
avatar for Kalinium Kalinium 672 posts

Topic: Programming / Help with AS2 shooting problem in Android Attack

Add a trace in the life<0 loop, and make sure it’s running that.

 
21 hours ago ago
avatar for Kalinium Kalinium 672 posts

Topic: Programming / Flash IDE Recommendations?

You can do that in 8.

 
22 hours ago ago
avatar for Kalinium Kalinium 672 posts

Topic: Kongregate Labs / Cheating! Scion contest

Fundamentally, there will always be issues with getting people to vote for the winner in contests like these. No matter how much you limit people’s votes, people with an unfair disposition towards a game “I hate XXX so I’ll vote him down even though I like his game”, “I like XXX I’ll vote everyone else down” etc.

 
22 hours ago ago
avatar for Kalinium Kalinium 672 posts

Topic: Programming / Flash IDE Recommendations?

There’s nothing wrong with Flash 8 if you’re using AS2. Unless you’re used to some of the new features in CS4, it shouldn’t be too big a jump.

 
23 hours ago ago
avatar for Kalinium Kalinium 672 posts

Topic: Programming / Collab Petition!

I can’t imagine this would be too hard – emily said that Alison hand-sends all the money anyway.

Whilst I don’t see why a petition is needed, I’ll support the cause.

 
Dec 3, 2008
avatar for Kalinium Kalinium 672 posts

Topic: Programming / More preloader trouble

Sounds like the preloader isn’t being loaded first.

 
Dec 3, 2008
avatar for Kalinium Kalinium 672 posts

Topic: Programming / User inputted keycodes.

When you test a keycode, use if(Key.isKeyDown(MOVE_KEY)) {}.

Set MOVE_KEY to be the key value of the key you want to be.

 
Dec 3, 2008
avatar for Kalinium Kalinium 672 posts

Topic: Programming / Referencing several instances

You shouldn’t be placing 104 hand named movieclips on the stage. You’d be far better advised to create them at runtime.

 
Dec 2, 2008
avatar for Kalinium Kalinium 672 posts

Topic: Programming / Help with AS2 shooting problem in Android Attack

Explain the problem further and post the code that’s causing the problem.

 
Dec 2, 2008
avatar for Kalinium Kalinium 672 posts

Topic: Programming / API always recieves 0

My only suggestion is that _global.score is either 0 or not a number.

trace(global.score)
trace(typeof(
global.score))

 
Dec 2, 2008
avatar for Kalinium Kalinium 672 posts

Topic: Programming / Referencing several instances

It’s still possible to loop through specifically named instances without using an array. Granted, an array is a better method, but it’s not simpler than using instance names

 
Dec 2, 2008
avatar for Kalinium Kalinium 672 posts

Topic: Programming / Angles, and redirecting lines?

Incoming ray r
Reflected ray R
Mirror M

Rθ = 2Mθ – rθ – 180°

 
Dec 2, 2008
avatar for Kalinium Kalinium 672 posts

Topic: Programming / Referencing several instances

_root “D”+i] instead of _root.D1 allows you to evaluate the brackets in the reference, and so use a variable inside the reference.


_root["D"+i] => _root.Di
_root.["D"+i] => _root..Di (which doesn't make sense)
 
Dec 2, 2008
avatar for Kalinium Kalinium 672 posts

Topic: Kongregate Labs / What have you learned?

Or they could try an alternative method, such as judges.

 
Dec 2, 2008
avatar for Kalinium Kalinium 672 posts

Topic: Kongregate Labs / How To Add Aceleration? Look Here

@Lofi: There’s nothing wrong with linking to other sites, provided it’s not KONG SUCKS CHECK THIS OUT!!

This is what my movement code usually looks like:

var xVel:Number = 0;
var yVel:Number = 0;

var xThrust:Number = 1;
var yThrust:Number = 1;

var friction:Number = 0.95;

function setup(xV,yV,xT,yT,f) {
	xVel = xV
	yVel = yV
	xThrust = xT
	yThrust = yT
	friction = f
}

function update() { //normally run on a timer
	_x += (xVel *= friction)
	_y += (yVel *= friction)
	
	xVel += (xThrust * Key.isDown(Key.RIGHT)) - (xThrust * Key.isDown(Key.LEFT))
	yVel += (yThrust * Key.isDown(Key.DOWN)) - (yThrust * Key.isDown(Key.UP))
}

Initial velocity, thrust components and friction can all be set in the setup function.

 
Dec 2, 2008
avatar for Kalinium Kalinium 672 posts

Topic: Kongregate Labs / Winners Announced!

Congratulations to the winners, and the other entrants.

It’s a pity that there was apparent cheating involved in the contest, particularly so if Pink was penalised unfairly.

 
Dec 2, 2008
avatar for Kalinium Kalinium 672 posts

Topic: Programming / API always recieves 0

Have you checked that the value you’re sending is accurate? Can you post the code specifically that sends the score the server?

 
Dec 1, 2008
avatar for Kalinium Kalinium 672 posts

Topic: Programming / [AS2] LOADS OF QUESTIONS, need help!

My post was broken, but I bulletpointed the first two to fix them and they seem to have fixed all the others.

 
Dec 1, 2008
avatar for Kalinium Kalinium 672 posts

Topic: Kongregate Labs / Lissajous Movement

 
Dec 1, 2008
avatar for Kalinium Kalinium 672 posts

Topic: Kongregate Labs / Cheating! Scion contest

I don’t mean be asking questions if it’s not the greatest time, but what news is there on future contests of this sort? Is there another set of tutorials/will there be one? Will future newbie-contests be judged in the same way?

 
Dec 1, 2008
avatar for Kalinium Kalinium 672 posts

Topic: Kongregate Labs / Lissajous Movement

Given that lissajousStep/maxSteps is 0-1, lissajousAlpha varies from 0-2pi, ie throughout the range of a circle. fy*ljA is therefore 0 to fy-circles-worth-of-radians, so y is being set to the start position plus a multiple of sin(0-[fy*2pi]).

Since sin(0-[fy*2pi]) repeats itself fy times, the y coordinate follows a sinusoidal path – around the yAbs. Coupled with the x component, it’ll probably draw patterns around the start. Which is what lissajous curves seem designed to do. It would make a lot more sense to me if you incremented yAbs every timestep. Having worked that out, I guess you’re probably doing that somewhere in the code you haven’t displayed.

I don’t understand your description of stepFactor. As far as I can see, all it does is scale the speed, and has no effect on smoothness. I’m also not sure about your maxSteps: could this not be set to whatever value you wanted, and the function would work for whatever it was set to with more or less steps?

Draco: It’s a more complex sine wave in both x and y.

 
Dec 1, 2008
avatar for Kalinium Kalinium 672 posts

Topic: Programming / AS 2.0 Api

function submitScore(mode, number) {
     _root.kongregateServices.connect()
     _root.kongregateServices.setMode(mode)
     _root.kongregateServices.submit(number)
     clearInterval(_root.scoreTimer)
}

_root.scoreTimer = setInterval(submitScore,[TIME IN MILLISECONDS],"Easy",25)

If the player loses before this time, use:

clearInterval(_root.scoreTimer)

to stop them from winning anyway.

 
Dec 1, 2008
avatar for Kalinium Kalinium 672 posts

Topic: Programming / Random numbers w/o replacement?

I see what you’re trying to do, Dave, but I’m not sure you’ve got your rndIndexes the right way round:

tmp = index1
index2 = index1
index1 = tmp (but tmp = index1?)

I think the first index should be index2.

Aside from that, the method has a finite number of iterations, which is helpful, but it might fall down if we wanted a random list of numbers up to 1,000,000.

 
Dec 1, 2008
avatar for Kalinium Kalinium 672 posts

Topic: Kongregate Labs / Shooter with pretty colors

You can’t change a movie’s FPS dynamically.