PDA

View Full Version : game crashing



leonthelion
January 27th, 2008, 08:47 PM
Hi it's me again D= I'm having a problem where the game crashes when an enemy uses a certain move. I'm not sure what the problem with the code is. Heres the code:


_global.especial=2
_global.especialtimer=3
It doesn't seem like much but it affects 10+ movieclips every frame which might be whats making it crash. All my enemies fx have this on the first frame:
gotoAndStop(_global.especial)
which makes it go to the second frame when the enemy uses the move "flame surge" Basicly the move works like a special tranformation, but because of all the fx that is used to make the enemies flame (or my guess is), it makes the game just freeze. I'm sure theres a better code for this, and I could use some help. Thanks
Here is the file
http://www.megafileupload.com/en/file/42098/Xin-Chapter-1-redone-fla.html
The file is the whole thing so only download it if you want to.
Here is an swf example:
http://img210.imageshack.us/my.php?image=xinchapter1redoneyi5.swf

parkerdc
January 27th, 2008, 11:34 PM
leonthelion

Checked out your flash app and found a few problems...

- You keep forgetting to put a semicolon at the end of every line; I have fixed this.
- Your buttons at the start are not setup correctly. You have to click on the word itself. You can't click in-between the word on the background. I have fixed this.
I suspect your other buttons don't have a hit mask setup.
- You had an error on the rain spell, that would keep replaying. I have fixed this.

That should get you on your way. Make sure you put a ; on the end of each line of your code. Look at the changes I did on your source.

Just a thought: When you walk along the forest, you could make it place trees randomly, instead of 4 frames of trees.


http://www.serendip.org/Xin_Chapter_1_redone.zip

leonthelion
January 27th, 2008, 11:43 PM
Well thanks, I haven't finish everythingy (which includes lightning rain). Thanks for fixing up my stuff. I'm trying to download it right now, but im getting a really bad connection :P
EDIT:
Oh yeah I won't do the random tree thing because it would be weird because after you walk back a frame the area would be different, which would just be weird. Thanks
EDIT2:
Can you put the download on a different page, or tell me the changes you made so it didn't crash? I can't connect to the site.

parkerdc
January 28th, 2008, 04:34 AM
Oh yeah I won't do the random tree thing because it would be weird because after you walk back a frame the area would be different, which would just be weird. Thanks

the random tree thing could work, if you use random seeding. This would give you the same set of random numbers based on the seed number(ie. 1632). Every time you use the seed 1632, then random numbers that come from it are the same.

I have changed the download and it should be working good now.

leonthelion
January 28th, 2008, 11:57 AM
Thanks =D I'm not very good at as so I'm not really sure what you mean though. Thanks for helping ^^
EDIT:
The games still crash T.T I Think I might change around the effects so that it only affects 6 mc instead of like 12. I'll revive this if I still need help with this problem, thanks.

parkerdc
January 28th, 2008, 03:17 PM
What are you using the variables _global.especial, _global.especialtimer for?

NOTE: I figured it out.

parkerdc
January 28th, 2008, 07:00 PM
I finally figured out what you were doing with your code and fixed your crashes. I also found a couple more bugs and fixed them.

Download from here.
http://www.serendip.org/Xin_Chapter_1_v1.2.zip

BTW: It's a cool looking game and when done, the game will be fun to play.

leonthelion
February 3rd, 2008, 12:44 PM
Wow I didn't know someone posted here >.< I'll try downloading the file, but if something bad happens like a crash I'll just use the not as cool move I substitued for the move that made the game crash. Thanks ^^