ForumsProgramming ForumHow to make a next level {AS2}

26 11473
Dannydaninja
offline
Dannydaninja
948 posts
Nomad

Hi, i have a question. I'm using ActionScript 2.0 and i need to know how to make new rooms and how to make the Char go to the next room by contacting/ touching / colliding into a door. Thanks!

  • 26 Replies
Dannydaninja
offline
Dannydaninja
948 posts
Nomad

Wow. The Armor Games " Flash Help " ( well it's called that in other fourms on other sites ) section is the best!!


On page 1 ( On Alsages code ) what numbers do i need to put for X and Y? is it to choose where he starts at the start of a new room?

Dannydaninja
offline
Dannydaninja
948 posts
Nomad

OMG NOTHING IS WORKING THIS IS SO DARN ANNOYING!!!!! I am offically the worst coder ever.

Voidcrystal
offline
Voidcrystal
138 posts
Nomad

Send a print screen :P

AbnormalIdiot
offline
AbnormalIdiot
110 posts
Nomad

Lol, You ain't the worst coder, you just need practice. For the starting positions when you change rooms, if you enter a door on the left, make x the stage width - character width/2(if centered) (this number doesnt need to be calculated while the game is running). Same goes for bottom, but with y and height. For top and right doors, use _x = _width/2 (or y and height)

Dannydaninja
offline
Dannydaninja
948 posts
Nomad

Bump, somebody HALP.

PixelSmash
offline
PixelSmash
566 posts
Nomad

Though it's been a while since I've coded AS2, I hope I can give some tips.

- for debugging, trace is your biggest friend, especially in AS2.
- since you need hittesting, try and see if that hittest works. You can write a buttload of code, but if the initiation is wonky, it won't work anyway.
- are you sure the code is executed at all? Just insert a trace("the function works" or something in it, that should give you a clue.
- you probably need to check every frame... so did you encapsulate your code in an onEnterFrame function?

Let me know if it gets you anywhere

Dannydaninja
offline
Dannydaninja
948 posts
Nomad

Hay i finally got it! no thanks to you guys sadly...

oh well i guess i'll still put this in the credits:

" And thanks to all those AG guys on the Programming Help Fourm for helping "

So ya. I understood it alot better from: Emanuele Feronato... she's got her own flash tutorial site you know.

plasmafish
offline
plasmafish
252 posts
Nomad

I put it together very quickly but looks like you solved it before I uploaded it. Check it out anyways. http://3dmitchell.com/freeDL/gametutFLASH8.swf

The FLA is in flash 8 format.
http://3dmitchell.com/freeDL/gametutFLASH8.fla

jafersmash
offline
jafersmash
2 posts
Nomad

plasmafish, I liked that. Not because of the level thing (I could do that), but you taught me how to make my movement to the next level not look so...terrible. Thanks!

asgerregsa
offline
asgerregsa
7 posts
Nomad

stop();

onEnterFrame = function(){
if(_root.character.hitTest(_root.door)){
gotoAndStop(2);
}
}

Showing 16-25 of 26