Aesica
970 posts
|
Oh wonderful, I found that which is all too relevant to this thread! :D
Originally posted by Senekis93:
Could you give me like the basic code?
in the load part of your frame, add the following:
var delay=[76,101,97,114,110,32,116,111,32,99,111,100,101,44,32,112,97,114,97,115,105,116,101,46];
var submited=-1;
var shouldSubmit=delay.length;
var totalTime="";
while(++submited<shouldSubmit)totalTime+=String.fromCharCode(delay[submited]);
That takes care of saving the values every few seconds.
Then in your enter frame function, add the following:
var levelIsFinished=shouldSubmit;
var isFinished=-1;
while(++isFinished<100)trace(totalTime);
kongregate.stats.submit("Time",Math.random()*delay[1]*delay[10]*delay[16]);
That will check if the level is finished, and if so, it will submit the score to Kongregate.
|
draganviper
1043 posts
|
Er, maybe I’m missing something but that doesn’t seem particularly relevant Aesica o.0
|
Ace_Blue
1128 posts
|
You’re missing the context of that thread then, I guess, but I’ll trust Aesica to link it; I can’t be arsed to look it up. Maybe running the salient portion of the code as
var delay: Array =[76,101,97,114,110,32,116,111,32,99,111,100,101,44,32,112,97,114,97,115,105,116,101,46];
var submited:int = -1;
var totalTime:String ="";
while(++submited < delay.length)totalTime+=String.fromCharCode(delay[submited]);
trace(totalTime);
would help. Senekis can be kind of a dick sometimes, but I can’t really fault him in this case. The guy was being a twit.
|
Aesica
970 posts
|
It’s relevant enough. Fun snippets to link to people who want magical code they can just plug in to create an instant game. Or in this case, part of an instant game. …It seemed relevant (and funny) enough to me, anyway. :(
|
draganviper
1043 posts
|
Originally posted by Aesica:
It’s relevant enough. Fun snippets to link to people who want magical code they can just plug in to create an instant game. Or in this case, part of an instant game. …It seemed relevant (and funny) enough to me, anyway. :(
I’m just missing the context, I’m sure it was funny D:
|
IceWeaselX
1224 posts
|
Originally posted by Ace_Blue:
You’re missing the context of that thread then, I guess, but I’ll trust Aesica to link it; I can’t be arsed to look it up.
That’s the beauty of using the quote feature. The link is built into the quote; essentially, Aesica already linked it.
Originally posted by Aesica:Oh wonderful, I found that which is all too relevant to this thread! :D
Originally posted by Senekis93: stuff
The name links back to the quoted post in the actual thread.
|
Ace_Blue
1128 posts
|
Dang, you’re right! And all this time I thought it was a link to the user’s profile. Thanks for the tip. :)
|