Recent posts by Computoguy on Kongregate

Subscribe to Recent posts by Computoguy on Kongregate

avatar for Computoguy Computoguy 64 posts
Flag Post

Topic: Game Programming / A MovieClip Problem (AS3)

So how would I do that? I’ve looked everywhere but I haven’t found the solution…

 
avatar for Computoguy Computoguy 64 posts
Flag Post

Topic: Game Programming / A MovieClip Problem (AS3)

Basically I’m developing an app for iOS at the moment in Flash using the AIR engine. Everything was going well until I wanted to advance to another frame from within a movieclip. For example: Clicking a button inside a movieclip moves to the next frame from the actual tiimeline, not the movieclips timeline.

Anyways, usually, this code would work in AS3:
[code]
MovieClip(root).nextFrame();
[/code]

I don’t understand what’s wrong? Is AIR AS3 different to normal AS3?

 
avatar for Computoguy Computoguy 64 posts
Flag Post

Topic: Game Programming / [Unity] Animation problem

Here’s another problem. _ I have a moving platform that moves up and down, and I’ve positioned it where I want it and it’s scaled to size. However, it will move to the middle of my scene and play it there instead. I’ve tried everything, culling types, whatever, it just won’t work. I use Cinema 4D.

 
avatar for Computoguy Computoguy 64 posts
Flag Post

Topic: Game Programming / [Unity] Cinema4D Import Problem

I’m a newbie, so what is the IDE?

 
avatar for Computoguy Computoguy 64 posts
Flag Post

Topic: Game Programming / [Unity] Cinema4D Import Problem

Problem is, is that the lightbulb is pitch black and the point light doesn’t get the effect I require. :/

 
avatar for Computoguy Computoguy 64 posts
Flag Post

Topic: Game Programming / [Unity] Cinema4D Import Problem

OK, so importing the actual file (a lamppost) itself is OK, and it works. The annoying thing is, is that I applied an orange glow to the ‘light bulb’. However, when I imported it into Unity, the ‘light bulb’ is just pitch black, no colour or glow whatsoever. Why isn’t the glow there? Does Unity not support it?

 
avatar for Computoguy Computoguy 64 posts
Flag Post

Topic: Game Programming / [AS3] Flash Plays On It's Own

Thank you, Vara.

 
avatar for Computoguy Computoguy 64 posts
Flag Post

Topic: Game Programming / [AS3] Flash Plays On It's Own

This is getting very annoying now. Everytime I go onto one of my frames, it’s automatically plays itself, even though a stop(); function is in my ActionScript for that frame. Here:

import flash.events.KeyboardEvent;
import flash.events.Event;

stop();

var cangoright:Boolean = true;
var cangoleft:Boolean = true;
var cangoup:Boolean = true;

var gotimer:Timer = new Timer(2000, 0);
gotimer.start();

gotimer.addEventListener(TimerEvent.TIMER_COMPLETE, removego);
stage.addEventListener(Event.ENTER_FRAME, canmove);

function canmove(event:Event):void{
if(stickoldguy.clashpoint.hitTestObject(clashpoint2.rightbarrier)){
cangoright=false;
}
}

function removego(event:TimerEvent):void{
go.visible = false;
}

stage.addEventListener(KeyboardEvent.KEY_DOWN, checkKeyDowns);

function checkKeyDowns(event:KeyboardEvent):void{
if(event.keyCode == Keyboard.RIGHT && cangoright){
stickoldguy.x += 5;
}
if(event.keyCode == Keyboard.LEFT && cangoleft){
stickoldguy.x += -5;
}
if(event.keyCode == Keyboard.UP && cangoup){
stickoldguy.y += -5;
}
if(event.keyCode == Keyboard.UP && cangoup){
stickoldguy.y += -5;
}
if(event.keyCode == Keyboard.DOWN){
stickoldguy.y += 5;
}
}

As you can see there is no play(); or nextFrame(); function anywhere and I havent defined one anywhere else. Why is it doing this?

 
avatar for Computoguy Computoguy 64 posts
Flag Post

Topic: Game Programming / How to block letters

In an input box, I want it so that you can type letters, but you cant type numbers or the space bar. What is the code I can use for this? I’m using AS3. Thanks!

 
avatar for Computoguy Computoguy 64 posts
Flag Post

Topic: Game Programming / Cheats Menu Problem

My code looks like this.
http://pastebin.com/3GtBZvVu
It still shows as NaN.

 
avatar for Computoguy Computoguy 64 posts
Flag Post

Topic: Game Programming / Cheats Menu Problem

I have got it as var currency:Number = 0; but that doesnt work.

 
avatar for Computoguy Computoguy 64 posts
Flag Post

Topic: Game Programming / Cheats Menu Problem

I define it as var currency =0; on a seperate layer called currency.

 
avatar for Computoguy Computoguy 64 posts
Flag Post

Topic: Game Programming / Cheats Menu Problem

I’ve found a way to do it via dynam text. Heres the script:
http://pastebin.com/zPGCsF1W
It works, but I’m gonna go a tiny off topic here. When I do currency += 100000; the trace shows NaN which is not a number right? How is it not a number? 100000 is a number. ;/

 
avatar for Computoguy Computoguy 64 posts
Flag Post

Topic: Game Programming / Cheats Menu Problem

I’ve changed it to var userCheatInput:String; and changed the ’ to " but it just traces not working.

 
avatar for Computoguy Computoguy 64 posts
Flag Post

Topic: Game Programming / Cheats Menu Problem

You’re probably getting sick of me now. But here goes. I’ve got it like a cheats menu, where if you insert the right code and press submit, you either get it right or wrong. Here:

http://pastebin.com/1qc5dWG9

All the traces work but the ‘if’ statement doesn’t.

 
avatar for Computoguy Computoguy 64 posts
Flag Post

Topic: Game Programming / Currency

Don’t worry, I’ve sorted it. Thanks.

 
avatar for Computoguy Computoguy 64 posts
Flag Post

Topic: Game Programming / Currency

As you wish.
var currency:Number =0;

currencyHandler.currencyDisplay.text = currency.toString();

currency += 100;

That’s all.

 
avatar for Computoguy Computoguy 64 posts
Flag Post

Topic: Game Programming / Currency

Still not working guys. it’s still stuck at 0.

 
avatar for Computoguy Computoguy 64 posts
Flag Post

Topic: Game Programming / Currency

How would I convert it?

 
avatar for Computoguy Computoguy 64 posts
Flag Post

Topic: Game Programming / Currency

Thanks. How would I have it so that my currency variable is the same as my currencyDisplay variable? would I do currencyDisplay.text =currency? Because that’s not working.

 
avatar for Computoguy Computoguy 64 posts
Flag Post

Topic: Game Programming / Currency

Hey guys! How would I make a currency in Flash. I have a variable called ‘currency’. In my script I want it so that, say, you saved someone from drowning, you get 100 coins or what not. I know it could be currency++; but that only add one. And how would I remove? Like you LOSE 100 coins if you do something wrong. Thanks! P.S. This is AS3.

 
avatar for Computoguy Computoguy 64 posts
Flag Post

Topic: Game Programming / Timeline Control Help

It’s a noob question. Well, I think so anyways. I want it so that when I press a button (backtopark) in my movieclip (stickFinish), it will go to the next frame in the STAGE, not the movieclip. What can I do?

 
avatar for Computoguy Computoguy 64 posts
Flag Post

Topic: Game Programming / Really Annoying 'Syntax'

Ahh! perfect! Thanks guys. It’s was really dumb but without you I would of gotten nowhere. ;)

 
avatar for Computoguy Computoguy 64 posts
Flag Post

Topic: Game Programming / Really Annoying 'Syntax'

_ Maan.

 
avatar for Computoguy Computoguy 64 posts
Flag Post

Topic: Game Programming / Really Annoying 'Syntax'

Here goes (with all the indents etc.)


import flash.events.MouseEvent;

stop();

achieved.visible = false;

if(achievethings1 == true){
shaded.visible = false;
}else{
shaded.visible = true;
}

if(achievethings2 == true){
shaded2.visible = false;
}else{
shaded2.visible = true;
}

achieveico2.addEventListener(MouseEvent.ROLL_OVER, mmini);
achieveico2.addEventListener(MouseEvent.ROLL_OUT, nommini);
shaded2.addEventListener(MouseEvent.ROLL_OVER, notmmini);
shaded2.addEventListener(MouseEvent.ROLL_OUT, nonotmmnini);
iltyachieve.addEventListener(MouseEvent.ROLL_OVER, ilty);
iltyachieve.addEventListener(MouseEvent.ROLL_OUT, noilty);
shaded.addEventListener(MouseEvent.ROLL_OVER, notilty);
shaded.addEventListener(MouseEvent.ROLL_OUT, notiltyno);
backmain.addEventListener(MouseEvent.CLICK, goback);

function nonotmmini(event:MouseEvent):void{
achievename.text = " ";
achievedesc.text = " ";
diff.text = " ";
achieved.visible = false;
}

function notmmini(event:MouseEvent):void{
achievename.textColor = 0×6B6B6B;
achievedesc.textColor = 0×6B6B6B;
diff.textColor = 0×6B6B6B;
achievename.text = “Mr. Mini”;
achievedesc.text = “Spot the mini \nstickperson.”;
diff.text = “Medium”;
achieved.visible = false;
}

function nommini(event:MouseEvent):void{
achievename.text = " ";
achievedesc.text = " ";
diff.text = " ";
achieved.visible = false;
}

function mmini(event:MouseEvent):void{
if(achievethings2 == true){
achievename.textColor = 0xE31230;
achievename.text = “Mr.Mini”;
achievedesc.text = “Spot the mini \nstickperson”;
diff.text = “Medium”
achieved.visible = true;
}

function notiltyno(event:MouseEvent):void{
achievename.text = " ";
achievedesc.text = " ";
diff.text = " ";
}

function goback(event:MouseEvent):void{
if(achievewasselectedatmenu == true){
prevFrame();
}else{
gotoAndStop(38);
}
}

function notilty(event:MouseEvent):void{
achievename.textColor = 0×6B6B6B;
achievedesc.textColor = 0×6B6B6B;
diff.textColor = 0×6B6B6B;
achievename.text = “I Like Them \nYellow”;
achievedesc.text = “Leave them dirty”;
diff.text = “Easy”;
achieved.visible = false;
}

function ilty(event:MouseEvent):void{
if(achievethings1 == true){
achievename.textColor = 0xE31230;
achievename.text = “I Like Them \nYellow”;
achievedesc.text = “Leave them dirty”;
diff.text = “Easy!”
achieved.visible = true;
}
}

function noilty(event:MouseEvent):void{
achievename.text = " ";
achievedesc.text = " ";
diff.text = " ";
achieved.visible = false;
}

Hopefully that worked. And if it didn’t, I’ve got the project file anyways: (62MB somehow): http://dl.dropbox.com/u/12146966/LAOS.fla