HOME | DD | Gallery | Favourites | RSS

| Computer-Turret

Computer-Turret [3245530] [] "CT"

# Statistics

Favourites: 33; Deviations: 216; Watchers: 44

Watching: 31; Pageviews: 30824; Comments Made: 1209; Friends: 31


# Comments

Comments: 120

Computer-Turret [2014-05-24 14:00:10 +0000 UTC]

It sure would nice nice if we could actually remove the constant spam from bots...

👍: 0 ⏩: 0

YutosOrangeLounge [2012-02-18 21:21:31 +0000 UTC]

Dude, you're one of the most epic people I've ever seen on dA.

👍: 0 ⏩: 0

MOGIsb29 [2011-08-26 22:53:25 +0000 UTC]

cool flash you made

👍: 0 ⏩: 1

Computer-Turret In reply to MOGIsb29 [2011-08-27 02:57:25 +0000 UTC]

Thanks ^.^

👍: 0 ⏩: 0

Underscore223 [2011-03-27 12:30:25 +0000 UTC]

Hey, I know you havent submitted anything recently but you have some really good flash material and tuts. I was wondering if you knew how to do a command like walking up to something and talking to it? By like pressiing A or something.
Thanks in advance.

👍: 0 ⏩: 1

Computer-Turret In reply to Underscore223 [2011-03-27 14:07:15 +0000 UTC]

There are a bunch of ways to do it. You can make sure the hero/player is within a certain distance of the object AND press "A" for something to happen (IE: show some text describing the object, or a panel opening chat options with an NPC, it's all up to you).

To check if you are within the set distance you could use hittest or simply compare the X,Y coords of both.
EX: In your event listener for a key press (if using AS2/3 or just your onPress or whatever ever AS1 uses, it's old and I forget exactly)

/*make sure hero's x and y values are between the objects x and y values plus or minus 50 pixels, can change value to anything. Must also be pressing the A key.*/
if(hero.x>object.x-50 & hero.xobject.y-50 && hero.y/*just an example of displaying a description (showDescription is a dynamic textbox on the stage) returned from a getDescription method in the object's class, you'd obv not do this if you aren't familiar with object orient programming but the idea is the same*/
showDescription.text=object.getDescription();
}

I could make an example to demonstrate further if needed.

👍: 0 ⏩: 1

Underscore223 In reply to Computer-Turret [2011-03-27 21:28:01 +0000 UTC]

Wow, you sure know your stuff! An example would be awesome but if youre to busy or whatever ill live without one.
Thanks!

👍: 0 ⏩: 1

Computer-Turret In reply to Underscore223 [2011-03-29 14:48:00 +0000 UTC]

I made a simple example for you:
Just hit A and since the character is near the red square the text will appear. I didn't include movement but I'm sure you can do that.

Demo:
[link]

Zipped fla+AS files
[link]

👍: 0 ⏩: 0

Ai-Tinyfox [2010-09-09 15:08:34 +0000 UTC]

FRIENDSHIP WEEK~♥♥~
Send this to at least 15 people you love
including me if you care 4 me! *Let's see how many hearts you get!*
Please continue sending your own love to those you care for.
FAKE FRIENDS: Will ignore it ♥♥ But you know I love you

👍: 0 ⏩: 0

Ai-Tinyfox [2010-07-29 16:13:30 +0000 UTC]

YOU'VE BEEN HUGGED!

Spread the DA love around! (you can copy and paste this message on their userpage!)

RULES:
1- You can hug the person who hugged you!
2- You -MUST- hug 6 other people, at least!
3- You should hug them in public! Paste it on their user page!
4- Random hugs are perfectly okay! (and sweet)
5- You should most definitely get started hugging right away


Send This To All Your Friends, And Me If I Am 1.
If You Get 7 Back You Are Loved!

1-3: you're a bad friend
4-6: you're an ok friend
7-9: you're a good friend
10-& Up: you're a great friend

I'm sorry!!!

👍: 0 ⏩: 0

seinii [2010-07-18 00:50:31 +0000 UTC]

right now im making a rpg with your tut...im having no problems, but is there an actionscript that lets you interact with an object by pressing spacebar?

👍: 0 ⏩: 1

Computer-Turret In reply to seinii [2010-07-18 12:08:56 +0000 UTC]

You should check out my submition which will tell you such things.
[link]

For AS1:
if(Key.isDown(Key.SPACE)){
//your action here
}
or you can use
if(Key.isDown(32)){
//your action here
}

Most keys only have numbers to call them but ones like CONTROL, SHIFT, UP, DOWN, RIGHT, LEFT, and a couple others you can use like that.
Now you'll want to have an onEnterFrame/onClipEvent so it checks if you are pushing the spacebar at any time.

Now when you press spacebar you can have it check if you are touching the object, if you are do your action. Or perhaps not touching just near it.

👍: 0 ⏩: 1

seinii In reply to Computer-Turret [2010-07-18 13:55:26 +0000 UTC]

i was also wondering how like when you run into a monster, im thinking sort of like a hitTest, you go straight into a battle mode.

👍: 0 ⏩: 0

Kilerden [2010-07-07 14:03:29 +0000 UTC]

Happy birthday

👍: 0 ⏩: 1

Computer-Turret In reply to Kilerden [2010-07-07 19:39:02 +0000 UTC]

Thanks ^.^

👍: 0 ⏩: 0

diogoshx [2010-05-17 19:52:57 +0000 UTC]

nice! thanks for the watch!!!

👍: 0 ⏩: 0

diogoshx [2010-05-16 20:45:58 +0000 UTC]

thanks for the fav!!

👍: 0 ⏩: 1

Computer-Turret In reply to diogoshx [2010-05-16 21:40:07 +0000 UTC]

Yeah I really liked it, was very linear but it looked like you put a lot of effort into it.
I found if you just spammed the normal attack the enemy would never be able to attack you. Other than that I rather enjoyed the game and played through it to the end. Definitely keep at it.

👍: 0 ⏩: 1

diogoshx In reply to Computer-Turret [2010-05-17 19:24:42 +0000 UTC]

wOW nice!

you know i real like the game
but the sprites are "boring to do"!

yeah i know! sorry about that! i can´t see how to fix it!
if i knew i could make a final mix version in english lol!


so you have to way till the kingdom hearts BS 2 came out! lol!


nice! you played to the end?
even for me is a big game to reach the end!

👍: 0 ⏩: 1

Computer-Turret In reply to diogoshx [2010-05-17 19:34:54 +0000 UTC]

Yeah I kind of ignored other things and just played it, skipped a lot of the dialogue because I didn't want to read it all though.

👍: 0 ⏩: 1

diogoshx In reply to Computer-Turret [2010-05-17 19:37:13 +0000 UTC]

lOL!

nice! you like the battle so?

give your opinion in what i could improve, that would help.

👍: 0 ⏩: 0

Koizumi636 [2010-03-17 10:13:01 +0000 UTC]

👍: 0 ⏩: 0

isibis7 [2009-12-25 02:55:39 +0000 UTC]

Thank you for the fav!

👍: 0 ⏩: 0

ludatha [2009-12-23 02:32:17 +0000 UTC]

Hey I am hosting my own competition and though you might want in

Please read my journal here: [link]

👍: 0 ⏩: 1

Computer-Turret In reply to ludatha [2009-12-23 14:08:28 +0000 UTC]

Yeah I saw the journal already and was thinking about it.

👍: 0 ⏩: 1

ludatha In reply to Computer-Turret [2009-12-23 14:23:42 +0000 UTC]

Your like the only one who reads my journals

I'm letting in flash to the portal soon as well.

👍: 0 ⏩: 0

Ninjapear [2009-10-18 19:50:08 +0000 UTC]

ok deleting the function didnt work what was the other way?

👍: 0 ⏩: 0

Ninjapear [2009-10-17 19:11:16 +0000 UTC]

oh yea and the (deleter _root.onEnterFrame) or whatever didnt work

👍: 0 ⏩: 0

Ninjapear [2009-10-16 19:14:32 +0000 UTC]

hi sorry to bother you but i just need 1 more favor i need a preloader in as2 that works with games!

👍: 0 ⏩: 1

Computer-Turret In reply to Ninjapear [2009-10-16 19:51:56 +0000 UTC]

[link]
Do something like that in the first frame actions panel, along with a stop() obviously.

👍: 0 ⏩: 1

Ninjapear In reply to Computer-Turret [2009-10-17 05:31:36 +0000 UTC]

this is good but in the next scene i cant make make it go past frame 2 or else it goes back to the loading obviously that code lies here

showPL = "Done loading!";
gotoAndStop(2);//goto frame 2, change to whatever you want
}


i just dont know how to fix it

👍: 0 ⏩: 1

Computer-Turret In reply to Ninjapear [2009-10-17 14:00:47 +0000 UTC]

It's probably because the onEnterFrame isn't terminated on the second frame, it's carried over.
On the second frame put
delete _root.onEnterFrame;

That will get rid of it.

Likwise you could just put everything in the onEnterFrame function inside a if(_root._currentFrame==1){

👍: 0 ⏩: 1

Ninjapear In reply to Computer-Turret [2009-10-17 19:05:38 +0000 UTC]

i figured that was the problem.. thanks! i wont bother you anymore with my little problems

👍: 0 ⏩: 0

Ninjapear [2009-10-13 17:32:25 +0000 UTC]

im trying to make a inventory in as2
i dont know how do you?

👍: 0 ⏩: 1

Computer-Turret In reply to Ninjapear [2009-10-13 19:18:52 +0000 UTC]

There are many ways to do inventory, could use arrays.

👍: 0 ⏩: 1

Ninjapear In reply to Computer-Turret [2009-10-14 01:51:42 +0000 UTC]

oh well i got my inventory in a movieClip so i can close and open it but i dont know how to make the first item go to the first slot and second item second slot etc etc etc so how would you write that code
?

👍: 0 ⏩: 0

Ninjapear [2009-10-09 19:25:51 +0000 UTC]

package {
import flash.display.*;
import flash.events.*;
import flash.ui.*;
public class as3ball extends MovieClip {
var the_hero: Sprite = new ball();
var power = 0.3;
var friction = 0.95;
var xspeed = 0;
var yspeed = 0;
var up = false;
var down = false;
var left = false;
var right = false;
public function as3ball() {
addChild(the_hero);
the_hero.x = 250;
the_hero.y = 200;
stage.addEventListener(KeyboardEvent.KEY_DOWN, key_pressed);
stage.addEventListener(KeyboardEvent.KEY_UP, key_released);
addEventListener(Event.ENTER_FRAME, render);
}
function key_pressed(e:KeyboardEvent):void {
switch (e.keyCode) {
case Keyboard.UP :
up = true;
break;
case Keyboard.DOWN :
down = true;
break;
case Keyboard.LEFT :
left = true;
break;
case Keyboard.RIGHT :
right = true;
break;
}
}
function key_released(e:KeyboardEvent):void {
switch (e.keyCode) {
case Keyboard.UP :
up = false;
break;
case Keyboard.DOWN :
down = false;
break;
case Keyboard.LEFT :
left = false;
break;
case Keyboard.RIGHT :
right = false;
break;
}
}
private function render(e:Event):void {
if (up) {
yspeed -= power;
}
if (down) {
yspeed += power;
}
if (left) {
xspeed -= power;
}
if (right) {
xspeed += power;
}
xspeed *= friction;
yspeed *= friction;
the_hero.x += xspeed;
the_hero.y += yspeed;
}
}
}



i found this great movement must have .as file though

👍: 0 ⏩: 0

Ninjapear [2009-10-09 19:13:29 +0000 UTC]

where do you get working as3 code?

👍: 0 ⏩: 1

Computer-Turret In reply to Ninjapear [2009-10-09 20:04:30 +0000 UTC]

I type it... if I don't know what the exact form it should be in for AS3 I use the AS3 live docs.

👍: 0 ⏩: 1

Ninjapear In reply to Computer-Turret [2009-10-09 20:46:09 +0000 UTC]

as3 docs what's that

👍: 0 ⏩: 1

Computer-Turret In reply to Ninjapear [2009-10-09 20:48:24 +0000 UTC]

[link]

👍: 0 ⏩: 1

Ninjapear In reply to Computer-Turret [2009-10-10 02:49:37 +0000 UTC]

thanks what do i do on it lol

👍: 0 ⏩: 0

Ninjapear [2009-10-07 19:59:56 +0000 UTC]

// CREATE OBJECTS

// game object
var gamebject = new Object();
game.mc = new MovieClip();
game.sw = stage.stageWidth; // sw is short for stage/scene width
game.sh = stage.stageHeight;

// hero object
var herobject = new Object();
hero.mc = new Hero();
hero.speed = 2;

// key detection
var keysbject = new Object();
keys[65] = keys[Keyboard.LEFT] = false;
keys[68] = keys[Keyboard.RIGHT] = false;
keys[87] = keys[Keyboard.UP] = false;
keys[83] = keys[Keyboard.DOWN] = false;

// START FUNCTIONS

// hero movement
function hero_move():void {

var leftoolean = keys[65] || keys[Keyboard.LEFT];
var rightoolean = keys[68] || keys[Keyboard.RIGHT];
var upoolean = keys[87] || keys[Keyboard.UP];
var downoolean = keys[83] || keys[Keyboard.DOWN];

if(left) {
hero.mc.x -= hero.speed;
hero.mc.rotation = 180;
} else if(right) {
hero.mc.x += hero.speed;
hero.mc.rotation = 0;
} else if(up) {
hero.mc.y -= hero.speed;
hero.mc.rotation = -90;
} else if(down) {
hero.mc.y += hero.speed;
hero.mc.rotation = 90;
}

}

// begins the game by setting up the mc's
function game_begin():void {

// add game mc to stage
addChild(game.mc);

// add hero to game.mc, place in center of game screen
game.mc.addChild(hero.mc);
hero.mc.x = game.sw / 2;
hero.mc.y = game.sh / 2;

// add event listeners
stage.addEventListener(Event.ENTER_FRAME, game_loop);
stage.addEventListener(KeyboardEvent.KEY_DOWN, keys_down);
stage.addEventListener(KeyboardEvent.KEY_UP, keys_up);

}

// main game loop
function game_loop(e:Event):void {
// hero movement
hero_move();
}

// key down and up functions
function keys_down(e:KeyboardEvent):void {
if(keys[e.keyCode] !== undefined) {
keys[e.keyCode] = true;
}
}
function keys_up(e:KeyboardEvent):void {
if(keys[e.keyCode] !== undefined) {
keys[e.keyCode] = false;
}
}

game_begin();



i still dont get how to fix things could you fix this for me so i can anylize how to fix?

👍: 0 ⏩: 1

Computer-Turret In reply to Ninjapear [2009-10-08 11:03:38 +0000 UTC]

var herobject = new Object();
hero.mc = new Hero();
This woukd be the problem. is Hero() a class? and hero.mc looks for a movieclip inside of your hero movieclip with the instance name of "mc" which currently does not exist.

👍: 0 ⏩: 1

Ninjapear In reply to Computer-Turret [2009-10-08 18:18:46 +0000 UTC]

this is all on the frame, so i should take that out and...... make a mc in the mc instanced mc right, let me test this first

👍: 0 ⏩: 1

Ninjapear In reply to Ninjapear [2009-10-08 18:22:01 +0000 UTC]

oh and maybe you should test this first on your as3?

👍: 0 ⏩: 1

Ninjapear In reply to Ninjapear [2009-10-08 18:25:17 +0000 UTC]

ill compare this to your movment you gave me and try to work out some bugs, could you fix this whole code?

👍: 0 ⏩: 3

Computer-Turret In reply to Ninjapear [2009-10-08 19:44:34 +0000 UTC]

Where did you get this code? It seems badly written imo.

👍: 0 ⏩: 1

Ninjapear In reply to Computer-Turret [2009-10-08 21:52:06 +0000 UTC]

i got it on dev actually that way i could comment on errors

👍: 0 ⏩: 0

Computer-Turret In reply to Ninjapear [2009-10-08 19:43:49 +0000 UTC]

Oh I see more problems, hero.mc.x hero.mc.y etc, that's all wrong. Your code is a terrible mess in general.

👍: 0 ⏩: 1


| Next =>