Home  | Login  | Register  | Help  | Play 

RE: Flash Q&A thread 3

 
Logged in as: Guest
  Printable Version
All Forums >> [Gaming Community] >> [Legends and Lore] >> Artists of Legend >> Art Academy >> RE: Flash Q&A thread 3
Page 14 of 16«<1213141516>»
Forum Login
Message << Older Topic   Newer Topic >>
7/29/2007 10:46:09   
SirSchmoopy
Banned Multi



quote:

ORIGINAL: flsg

EragonZZZZ: thanks for your help, I didn't feel the need to write this simple code
BTW, SirSchmoopy, why do you use a hitTest for a turn-based RPG like AQ? Is that nessesary?
eragon just showed you the code I was trying to explain to you in 3 lines
now do you know what I'm talking about? You used 10 if() while with a little bit of thinking you could reduce it to 10. That's what I call basic
but I DO feel the need to re-release my bubble's adventure. Just to show you how a RPG is done(mine isn't big or great, but I'm sure it's THE game that got the most hits and replies in GoGA)

And one last word, just because I used Fae's avatar doesn't mean I'm a girl >.<


dominic_r_monroe: use Kirupa.com


omfg.....who ever said i was making an rpg like AQ??????????? im making a different kind, cuz my friend duznt like turn based. and when im don e with this THEN i make a turn based rpg again, but for now, my friend requested a diff kind of game.
i can EASILY make turn based, and if i was making turn based, i might not need any help, no offense, cuz i practice it ALOT...

_____________________________

Sig deleted.
Post sig only once per page.
Post #: 326
7/29/2007 10:56:40   
flsg
Member

SirSchmoopy:
ok then I misunderstood your code, it's just that everone here wants to make a turn-based RPG
and read eragon's post, that'll calm you down XD
everyone can easily make a turn-based game, but the problem is how to make a good one. Search in GoCA and you'll find tons of them
you practice a lot and uses 10 conditional statements while they could be reduced to 1?...

ok then: I challenge you to make a better game than my bubble's adventure, too bad you can't see it now(ok just joking)

eragon: lol never thought of that

< Message edited by flsg -- 7/29/2007 10:59:29 >
AQ  Post #: 327
7/29/2007 10:58:18   
SirSchmoopy
Banned Multi



quote:

ORIGINAL: flsg

SirSchmoopy: everyone can easily make a turn-based game, but the problem is how to make a good one. Search in GoCA and you'll find tons of them
you practice a lot and uses 10 conditional statements while they could be reduced to 1?...

ok then: I challenge you to make a better game than my bubble's adventure, too bad you can't see it now(ok just joking)

eragon: lol never thought of that

actually, im looking at it right now in my second tab..... i played it before i ever joined the forum, seeing that is wht made me come to this q&a

_____________________________

Sig deleted.
Post sig only once per page.
Post #: 328
7/29/2007 11:13:36   
EragonZZZZ
Member

quote:

ORIGINAL: SirSchmoopy
i can EASILYmake turn based, and if i was making turn based, i might not need any help, no offense, cuz i practice it ALOT...


*coughs*
*COUGHS*

So, wait. You're telling me you can easily do what took zhoom about 2 years running?
When you use 10 if statements to do what three lines of code can accomplish?



< Message edited by EragonZZZZ -- 7/29/2007 11:14:18 >
AQ  Post #: 329
7/29/2007 11:35:18   
SirSchmoopy
Banned Multi



quote:

ORIGINAL: flsg
you practice a lot and uses 10 conditional statements while they could be reduced to 1?...

thats cuz i LIKE doing more AS. i dont make games cuz theyre fun i make games cuz i think making games is fun. Also, more AS makes me feel special :).

_____________________________

Sig deleted.
Post sig only once per page.
Post #: 330
7/29/2007 11:45:26   
EragonZZZZ
Member


quote:

ORIGINAL: SirSchmoopy
thats cuz i LIKE doing more AS. i dont make games cuz theyre fun i make games cuz i think making games is fun. Also, more AS makes me feel special :).


oh my god...
That is one of the....
...
....
.....
wow...
I'm totally speechless here.

I've never ever met a programmer who was a FAN of anti-optimization.
I've met people who are optimization freaks, some who try to do it occasionally, some who never do it, some who think it's a waste of time...
But never anyone who tried to make programs less optimized.
flsg? You hearing me on this one?
AQ  Post #: 331
7/29/2007 12:05:52   
flsg
Member

hey I was making something for my new gallery lol
SirSchmoopy: I'm with you, except that I like more AS, but when they actually MEAN something, not just some code duplications XD
if you want to, I could enlarge x10 again your code, want me to show you how?
AQ  Post #: 332
7/29/2007 12:06:58   
SirSchmoopy
Banned Multi


yes plz ty

< Message edited by SirSchmoopy -- 7/29/2007 12:07:33 >


_____________________________

Sig deleted.
Post sig only once per page.
Post #: 333
7/29/2007 12:33:32   
flsg
Member

ok, you asked for it(I hope this junk won't crash your computer):
var tempRoot:MovieClip = _root;
tempRoot.stop();
var monsterMC:Array = new Array(tempRoot.monsterName);
init();
MovieClip._prototype_.myHitTest = function(mcName:MovieClip):Boolean  {
	return this.hitTest(mcName);
};
if (tempRoot === _root) {
	tempRoot.onEnterFrame = function() {
		for (var i:Number = 0; i<=100; i++) {
			for (var j:Number = 0; j<=50; j++) {
				for (var k:Number = 0; k<monsterMC.length; k++) {
					if (_parent.wep.myHitTest(tempArray[k])) {
						if (this.die === Number(1)) {
							tempRoot.monsterHP = tempRoot.monsterHP-1;
						} else if (this.die === Number(2)) {
							tempRoot.monsterHP = tempRoot.monsterHP-2;
						} else if (this.die === Number(3)) {
							tempRoot.monsterHP = tempRoot.monsterHP-3;
						} else if (this.die === Number(4)) {
							tempRoot.monsterHP = tempRoot.monsterHP-4;
						} else if (this.die === Number(5)) {
							tempRoot.monsterHP = tempRoot.monsterHP-5;
						} else if (this.die === Number(6)) {
							tempRoot.monsterHP = tempRoot.monsterHP-6;
						} else if (this.die === Number(7)) {
							tempRoot.monsterHP = tempRoot.monsterHP-7;
						} else if (this.die === Number(8)) {
							tempRoot.monsterHP = tempRoot.monsterHP-8;
						} else if (this.die === Number(9)) {
							tempRoot.monsterHP = tempRoot.monsterHP-9;
						} else if (this.die === Number(10)) {
							tempRoot.monsterHP = tempRoot.monsterHP-10;
						} else if (this.die === Number(11)) {
							tempRoot.monsterHP = tempRoot.monsterHP-11;
							switch (this.die) {
								case 1 :
									trace("1");
									break;
								case 2 :
									trace("2");
									break;
								case 3 :
									trace("3");
									break;
								case 4 :
									trace("4");
									break;
								case 5 :
									trace("5");
									break;
								case 6 :
									trace("6");
									break;
								default :
									trace("nothing");
							}
						}
					}
				}
			}
		}
	};
}
var intt:Number=setInterval(function(){this.die=tempRoot.die=_root.die},1);
trace(this.die+", :"+tempRoot.monsterName);
if (tempRoot.monsterName == _root.monsterName) {
	for (var i:Number = 0; i<=100; i++) {
		this.die++;
		this.die--;
		for (var j:Number = 0; j<=50; j++) {
			monsterName.onEnterFrame = function() {
				if (this.hitTest(_parent.wep) === _parent.wep.myHitTest(tempRoot.monsterName)) {
				var newObj:Object=new Object()
				newObj.prop1=tempRoot.monsterName
				if(tempRoot.monsterName==undefined){
				_root.createEmptyMovieClip("monster", 999)
				}else{
				trace(die)
				}
			
				}
			};
			for (var k:Number = 0; k<monsterMC.length; k++) {
			}
		}
	}
}

I didn't have the time for all the code, sorry

< Message edited by flsg -- 7/29/2007 17:20:41 >
AQ  Post #: 334
7/29/2007 12:46:41   
EragonZZZZ
Member

The sheer inefficiency of that code made my eyes melt.
AQ  Post #: 335
7/29/2007 12:47:43   
SirSchmoopy
Banned Multi


hurray!!! (not about ur eyes melting about the code!)

_____________________________

Sig deleted.
Post sig only once per page.
Post #: 336
7/29/2007 14:06:39   
EragonZZZZ
Member

flsg, in need of a good site for learning about using bitmapdata in flash 8, AS 2.0
kay thanks :D
AQ  Post #: 337
7/29/2007 18:05:19   
Umbrix
Member

flsg, thanks for the fire tut. That's pretty cool. But....I was kind of wondering how to make the simpler, AQ-like fire :P. I would -assume- it's easier than that tut :P
AQ  Post #: 338
7/30/2007 8:59:43   
flsg
Member

Umbrix: AQ staff draw the fire themself, so if you want to make a fire like theirs, you need animation skills
EragonZZZZ: humm....kirupa.com? XD
AQ  Post #: 339
7/30/2007 23:36:55   
EragonZZZZ
Member

Nahh..never mind, taught myself again :]
I love bitmaps now.
Efficient collision detecting (without using a bitmap hitTest I might add), terrain creation/destruction...awesome.
AQ  Post #: 340
7/31/2007 17:58:51   
Grie Velorn
Member

hey yea umm i need some help im not sure if this is only an as ting or not but here it goes when i try to import a .mp3 file into flash it keeps saying it cant be read...i've tried about 500 different files and they arnt working any suggestions?

< Message edited by Grie Velorn -- 7/31/2007 17:59:30 >
AQ DF  Post #: 341
7/31/2007 20:09:22   
flsg
Member

did you imported it with AS?
according to the error it's not, you got an error when you imported manually right?

_____________________________

My flash gallery
my game thread

flsg, proud old member of AQ(still playing :O)
AQ  Post #: 342
7/31/2007 21:16:37   
Grie Velorn
Member

yes i would goto file>Import>Import to Library but it wouldn't work(im trying to make a music vid)
AQ DF  Post #: 343
8/1/2007 4:07:37   
swenn
Member

I need some help with the folowing code, its for an top view game, with rotation
onClipEvent(load)
{
	speed = 1;
	angle = 30;
}
 
onClipEvent(enterFrame)
{
	if (Key.isDown(Key.UP))
	{
		xx = math.cos(_rotation*Math.PI/180)*speed;
		yy = math.sin(_rotation*Math.PI/180)*speed;
		this._x += xx;
		this._y += yy;
	}
	else if (Key.isDown(Key.LEFT))
	{
		this._rotation -= angle;
		
	}
	else if (Key.isDown(Key.RIGHT))
	{
		this._rotation += angle;
	}
}


It does rotate but doesnt go forward( I got the math functions from a tutorial).WHat is wrong?Also, how do I make it go smoother, so no direct respose but after a while(Like a ship)
AQ MQ  Post #: 344
8/1/2007 7:14:17   
Nicky
Member

Hey there, I was wondering, how do I create a statement (Actionscript 2.0), that, when triggered, goes to a certain frame, and plays until another frame.

For example:
I have 5 frames, and when the trigger(some kind of button or something) is pressed, it plays frame 1-3.

Also, if anyone has a Macintosh computer, how do you insert actionscript? I know on PCs it's F9, right? If anyone had a Mac, I was just wondering how to get into it. Unless there's a menu option, next to file and edit and stuff, cause it might be similar in that case.
(I have tried F9, and it didn't work.)

Probably an easily answered question, but I'm new to flash ^^;.
If I didn't explain this properly, I'll try and repost it with a better explanation.

< Message edited by Nicky -- 8/1/2007 7:17:26 >
AQ DF  Post #: 345
8/1/2007 11:34:53   
flsg
Member

Nicky: to use the action panel, go to window-action XD lol
and put a stop() function at the third frame. When you press to button, use gotoAndPlay(startingframe)
the startingframe is 1 in your case

swenn: math.cos(_rotation*Math.PI/180)*speed returns NaN(Not a Number), because you forgot to put an upper-case M to Math!!! So AS can't find the math object and can't use cos and sin. use Math.cos(.....)
AQ  Post #: 346
8/1/2007 11:48:00   
swenn
Member

Thanks, it does move now.. but it doesnt move very right :S is there a way to make it better?So it moves smoother and that it will always move into the direction of the front part?(fixed tht part, just smoothing now)
Just thanks:D but now for part two...
can you explain the sin and cos?I dont get what they stand for?

< Message edited by swenn -- 8/1/2007 11:56:18 >
AQ MQ  Post #: 347
8/1/2007 12:07:21   
flsg
Member

well you should always understand you own code XD
you'll learn this in secondairy school
they calculate the x and y length compared to the hypotenuse of the triangle and its angle and return the proportion

< Message edited by flsg -- 8/1/2007 12:08:02 >
AQ  Post #: 348
8/1/2007 12:25:33   
swenn
Member

Hmm I think I get it.. Here it is just called different:P

now my next problem(Am I irritating already? :P)
onClipEvent(load)
{
	speed = 3;
	angle = 10;
	Bulletshot=false;
	Bulletspeed= 50;
}
 
onClipEvent(enterFrame)
{
	if (Key.isDown(Key.UP))
	{
		xx = Math.cos(_rotation*Math.PI/180)*speed;
		yy = Math.sin(_rotation*Math.PI/180)*speed;
		this._x += xx;
		this._y += yy;
	}
	
	if (Key.isDown(Key.LEFT))
	{
		this._rotation -= angle;
		
	}
	else if (Key.isDown(Key.RIGHT))
	{
		this._rotation += angle;
	}
   if(Key.isDown(Key.DOWN) && Bulletshot == false)
   {attachMovie("bullet", "bulletshoot", 8);
   bulletshoot._x +=  Math.cos(_rotation*Math.PI/180)+Bulletspeed;
   bulletshoot._y +=  Math.sin(_rotation*Math.PI/180)+Bulletspeed;
   Bulletshot= true;
   
   }
	}


Its a code to make it shoot.. but it wont work:S what is wrong?

< Message edited by swenn -- 8/1/2007 12:26:22 >
AQ MQ  Post #: 349
8/1/2007 17:52:53   
flsg
Member

swenn:after fireing once, Bulletshot become true, and in your if statement, you command it to shoot only if Bulletshot is false...
plus, did you check that you have a MC with the linkage name "bullet"?
plus, EVEN if you correct what I tell you, your bullet always uses the same depth 8, and since one depth can only have one thing, you previous bullet will dissapear if you shoot again(which attach the movie and assign it the depth 8 and erase the previous bullet)
AQ  Post #: 350
Page:   <<   < prev  12 13 [14] 15 16   next >   >>
All Forums >> [Gaming Community] >> [Legends and Lore] >> Artists of Legend >> Art Academy >> RE: Flash Q&A thread 3
Page 14 of 16«<1213141516>»
Jump to:



Advertisement




Icon Legend
New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts




Forum Content Copyright © 2018 Artix Entertainment, LLC.

"AdventureQuest", "DragonFable", "MechQuest", "EpicDuel", "BattleOn.com", "AdventureQuest Worlds", "Artix Entertainment"
and all game character names are either trademarks or registered trademarks of Artix Entertainment, LLC. All rights are reserved.
PRIVACY POLICY


Forum Software © ASPPlayground.NET Advanced Edition