903 Forum Posts by "Mitch-Mac"
I'm workin on something I havnt worked on in like 2 months, unless the file is currupt or flash player has changed sence then. As far as I can remeber, it used to work, and now it doesn't.
Originally it was this before I looked at the first page of this tutorail ( this didnt work either and it contains alot of extra stuff I dont know why I put it there)
LOAD:
on (press) {
game = SharedObject.getLocal("mydata");
if (game.data.name == undefined) {
_root.hp = 50;
_root.hp2 = 50;
_root.gotoAndStop(2);
} else {
attack = game.data.attack;
hp = game.data.hp;
mp = game.data.mp;
hp2 = game.data.hp2;
mp2 = game.data.mp2;
defence = game.data.defence;
lvl = game.data.lvl;
nextlvl = game.data.nextlvl;
magic = game.data.magic;
exp = game.data.exp;
_root.attack = attack;
_root.lvl = lvl;
_root.nextlvl = nextlvl;
_root.hp = hp;
_root.mp2 = mp2;
_root.mp = mp;
_root.hp2 = hp2;
_root.defence = defence;
_root.magic = magic;
_root.exp = exp;
_root.gotoAndStop(3);
}
}
SAVE:
on (press) {
game = SharedObject.getLocal("mydata");
attack = _root.attack;
lvl = _root.lvl;
nextlvl = _root.nextlvl;
defence = _root.defence;
magic = _root.magic;
exp = _root.exp;
hp = _root.hp;
hp2 = _root.hp2;
mp2 = _root.mp2;
mp = _root.mp;
game.data.hp = hp;
game.data.hp2 = hp2;
game.data.mp = mp;
game.data.mp2 = mp2;
game.data.attack = attack;
game.data.defence = defence;
game.data.lvl = lvl;
game.data.nextlvl = nextlvl;
game.data.magic = magic;
game.data.exp = exp;
game.flush();
}
I havnt been to newgrounds in so long, anyway can anyone tell me whats wrong with this?
LOAD:
on (press) {
var game = SharedObject.getLocal("mitchsrpg");
if (game.data.name == undefined) {
_root.hp = 50;
_root.hp2 = 50;
_root.gotoAndStop(2);
} else {
_root.attack = game.data.attack;
_root.hp = game.data.hp;
_root.mp = game.data.mp;
_root.hp2 = game.data.hp2;
_root.mp2 = game.data.mp2;
_root.defence = game.data.defence;
_root.lvl = game.data.lvl;
_root.nextlvl = game.data.nextlvl;
_root.magic = game.data.magic;
_root.exp = game.data.exp;
_root.gotoAndStop(3);
}
}
SAVE:
on (release) {
game.data.hp = _root.hp;
game.data.hp2 = _root.hp2;
game.data.mp = _root.mp;
game.data.mp2 = _root.mp2;
game.data.attack = _root.attack;
game.data.defence = _root.defence;
game.data.lvl = _root.lvl;
game.data.nextlvl = _root.nextlvl;
game.data.magic = _root.magic;
game.data.exp = _root.exp;
game.flush();
}
At 3/23/05 11:30 AM, mackan_ wrote: http://www.newgrounds.com/bbs/topic.php?id=235909
this is a really good post on saving/loading, I don't understand your specific problem but I hope you find your answer there.
Thanks alot, I got it working =D
~Bump
Theres lots of games on this site that you can save you stats on so someone must know how.
At 3/22/05 10:53 AM, luminousnerd wrote:At 3/21/05 08:21 PM, Mitch-Mac wrote:Dude you are fairly stupid. Ask a question in the first post next time, just don't assume we know what you need. And then when someone asks you, you treat them like an idiot and describe your question with zero detail as quick as you can. n00b.At 3/21/05 07:45 PM, Juice-Tin wrote: you welcome for the help.Well the code doesnt work when the file name is changed or is used online, so I need something that would work.
(if you dont ask a question, i cant give an answer now can i?)
~Thanks
Well instead of being an ass you could at least try helping people. Im having a problem and I'm asking for help. Who did I treat like an idiot? I answered the questions people asked about the problem I was having, your just being an ass. I don't want this to become a big flame war, so just leave the post if you dont have anyway to fix the code or offer me some solution to the problem.
Yes, but the code wont work at all. When I save online then I try to load it online it doesnt work.
At 3/21/05 07:45 PM, Juice-Tin wrote: you welcome for the help.
(if you dont ask a question, i cant give an answer now can i?)
Well the code doesnt work when the file name is changed or is used online, so I need something that would work.
~Thanks
I need to save variables for the RPG I'm currently working on. Right now I have this on the save button:
on (press) {
game = SharedObject.getLocal("mydata");
attack = _root.attack;
lvl = _root.lvl;
nextlvl = _root.nextlvl;
defence = _root.defence;
magic = _root.magic;
exp = _root.exp;
hp = _root.hp;
hp2 = _root.hp2;
mp2 = _root.mp2;
mp = _root.mp;
game.data.hp = hp;
game.data.hp2 = hp2;
game.data.mp = mp;
game.data.mp2 = mp2;
game.data.attack = attack;
game.data.defence = defence;
game.data.lvl = lvl;
game.data.nextlvl = nextlvl;
game.data.magic = magic;
game.data.exp = exp;
game.flush();
_root.gotoAndStop(3);
}
This on the load button:
on (press) {
game = SharedObject.getLocal("mydata");
if (game.data.name == undefined) {
_root.hp = 50;
_root.hp2 = 50;
_root.gotoAndStop(2);
} else {
attack = game.data.attack;
hp = game.data.hp;
mp = game.data.mp;
hp2 = game.data.hp2;
mp2 = game.data.mp2;
defence = game.data.defence;
lvl = game.data.lvl;
nextlvl = game.data.nextlvl;
magic = game.data.magic;
exp = game.data.exp;
_root.attack = attack;
_root.lvl = lvl;
_root.nextlvl = nextlvl;
_root.hp = hp;
_root.mp2 = mp2;
_root.mp = mp;
_root.hp2 = hp2;
_root.defence = defence;
_root.magic = magic;
_root.exp = exp;
_root.gotoAndStop(3);
}
}
~Thanks for any help.
Shitty backround/aura, yes ino. Hope it turns out ok.
I only asked because at first glance it appears as if Glaiel_Gamer's example used alpha tween on the fireworks particles. As it turns out the particles just shrink. But that's no excuse to embarrass me in front of my fellow newgrounders.At 3/16/05 12:58 AM, Kitaiko wrote:
Sorry for embarrassing you =P
At 3/17/05 07:27 PM, Glaiel_Gamer wrote: Yeah, bugs can be a problem.
The best way to fix hitting with the helicopters:
1: Make 2 black box movieclips in the helicopter MC.
2: Each one MUST have the following code:
onClipEvent(load){
_visible = false
}
3: Name 1 "bulletHit"
4: Name the other "shipHit"
5: Stretch them out as needed
6: Test hitting against the boxes instead of the actual copter.
I am doing this a lot in egg hunter. The egg has at least 4 boxes for various reasons.
I think I got the hittest worked out. The thing with that would be, how would you write it? Wouldnt you have to put like laser.bullethit or ship.shipHit? Anyway my game seams to lag up really fast. I took the backround out and it ddint lag up as fast but gradually it did.
P.S. Happy Birthday Me! -March 18th-
At 3/16/05 04:00 PM, The_Mercenary wrote: They do die, It takes exactly 50 hits from your sword to kill them and 100 shots from the guns. There is a bug in the game tho that I cant find out how to fix. It just happens randomly, the enemies will sometimes freeze and wont take hits =S anyway, I'll reduce the damage to 25 so it'll be easier to kill them and the walls are the collsision places, its not the real backround.
MM, the lasers wont blow up the blue helicopters
The blue ones take 3 shots with a normal one and 1-2 shots with higher ones. I still need to fix mine up tho, its all bugged =(
I've gotten into some serious problems =(. I tried to fix the lag bug and the hittest but now the laser is all screwed up. Its still shooting it just turns invisable, everything is still blowing up tho. =S
Woops forgot the link =S. http://home.ripway.com/2004-5/113780/Chopper-Attack.swf Everytime I upload it on imageshack theres no music =P.
At 3/16/05 12:58 AM, Kitaiko wrote: I think I will have a try at this one too. Are we allowed to use alpha changes for effects as long as it is not obviously used to make another colour?
Read the first post it says "NO GRADIENTS OR ALPHA OR TWEENING BETWEEN 2 COLORS.".'
Anyway I'm still not sure why mine starts to lag up after a while. I put the old music back in and made them stop when they blow up.
Also whats the Overide Sound Setting option in the publish settings? It seems to greatly reduce the file and keeps the sound. I had the file go from 1.500kb to like 16kb (I had a long song in).
At 3/15/05 05:59 PM, Glaiel_Gamer wrote: I liked the old music.
Fun, the first bomb doesn't originate from the plane
Sometimes you die even if you don't hit a plane (can be fixed easily)
Bullets miss the copters sometimes
See the other problems I posted earlier.
So I guess I should keep the old music, as for the other problems, I keep trying to make the hittest between the heli's and the bullets better but it still misses some. Not sure why the first bomb doesnt come from the plane, I will fix it soon. I made them stop now when they're hit. I've never died without being hit tho =S
At 3/15/05 03:47 PM, Glaiel_Gamer wrote: I liked the music in the other versions. (80 KB is good for a swf size, for the fla, "Save and Compress"
I added new music in, more power-ups and harder enemies. Now the .swf is 503kb and the .fla is 7,365kb. I dont have a save and compress option (using MX not 2004). Anyway heres what I'm at so far. ~Chopper Attack~
Btw, what is everyone else working on, so far I've seen 2 other games, is there only 2 other people in this?
I've done alot of updates to the backround. Theres now a dock, an army base, a bridge, roads. The water now has moving waves and sparkles. Right now you can get laser powerups at a 1 in 25 chance, planning to add bombs in 1/50 and lives in 1/100. Should I lower/raise any of these? ~-Game-
At 3/14/05 09:26 PM, The_Mercenary wrote:At 3/14/05 07:46 PM, Mitch-Mac wrote:nice, there are still bugs, but thats expected since its not finished, the only thing i'd ask you to do is improve the graphics a bit, I know its hard, but for the water, if you mix red a blue and make it look like its moving + adding some sparkling white dots would make it look better.At 3/14/05 06:39 PM, Glaiel_Gamer wrote: Mk, but you still have to fix up the collision detection(you die even if you hit an exploding ship)Well if you were in a plane and you ran into an exploding helicopter, do you think you would die? Btw here is the New Link
Yea I just threw that backround in when I started, I plan on making it better, maybe a couple things that blow up if you shoot them on the ground. Im trying to for the histtest between the heli's and the laser but it still misses some shots =S
At 3/14/05 06:39 PM, Glaiel_Gamer wrote: Mk, but you still have to fix up the collision detection(you die even if you hit an exploding ship)
Well if you were in a plane and you ran into an exploding helicopter, do you think you would die? Btw here is the New Link
Alright, dont turn this into a flame war.
I've done some updates:
Bombs work
Lives
Power bar (when you shoot it goes down and if you have none left you cant shoot)
You can lose
Thats about it atm, I'm gunna work on extra lives, extra bombs, maybe harder choppers and bosses.
Yea its a 24fps
I started on my new game , there are still some bugs Im trying to work out. The bombs aren't working, you can't lose and for some reason it gets really laggy after about 1 or 2 mins. I;m not sure why, I have it to remove all the mc's onces they leave the screen. =S. Anyway, I still need to improve the gfx and add levels in.
At 3/11/05 03:05 PM, Glaiel_Gamer wrote: I will be gone this weekend, so please keep bumped.
Ok, I'm still out of ideas =(
~Bumbedup

