Shop Mobile More Submit  Join Login
×




Details

Submitted on
August 2, 2012
Image Size
1.0 MB
Resolution
550×400
Link
Thumb
Embed

Stats

Views
19,437
Favourites
577 (who?)
Comments
307
Downloads
333
×
I felt like making a tutorial... And this was the only thing I was semi-alright at. :P Also I had one heck (awful) of a time trying to learn all of this stuff, and I would have loved one of these. So maybe someone might find it useful. I hope you guys do. :) If there are any questions feel free to ask! (some of it can be insanely hard to understand)

Also, before you comment, take a look through the comments already there. You might have a question that is similar to another and is already answered.
________
Check out my other tutorials on this stuff down below!
:new: Make a health bar/love meter/etc!!
legiokat.deviantart.com/art/He…

:new: Here is a tutorial on making cheat codes and passwords!
legiokat.deviantart.com/art/Pa…


:new: here is a tutorial on how to let the player choose their own name for the character!
legiokat.deviantart.com/art/Na…

:new: Here is my tutorial involving Inventory, Gift-giving, and a little bit on shops!
legiokat.deviantart.com/art/In…
Add a Comment:
 
:icontheproxylady:
TheProxyLady Featured By Owner 3 days ago  New member Student Photographer
i dont even i dont even unterstand this
Reply
:iconliossenel:
liossenel Featured By Owner Feb 11, 2015  Student General Artist
Not sure but looks like you wanted to link the picture to pacthesis's page. If so then it does not work ( at least for me)
Reply
:iconlegiokat:
legioKat Featured By Owner Feb 15, 2015  Hobbyist General Artist
Oh sorry for the mixup. It wasn't intended to be a link, just a picture. If you are trying to find her tutorial, just type in the words from the picture "how to make a flash dating sim" into the Deviantart search tab, or search Pacthesis and it should appear.
Reply
:iconliossenel:
liossenel Featured By Owner Feb 16, 2015  Student General Artist
at last, thanks for tutorial. If you want I can give some code to make save/load button?
Reply
:iconlegiokat:
legioKat Featured By Owner Feb 16, 2015  Hobbyist General Artist
That would be much appreciated! Thank you:)
Reply
:iconliossenel:
liossenel Featured By Owner Feb 16, 2015  Student General Artist
Actionscript2 to save and load a party.

in first frame, Actions layer, declare your variables ( i will go with "elf" and "arkelf" for example, AND the saving variable.)

var savefile = SharedObject.getLocal("zantetsuken");// here, zantetsuken stands for the name of the save file, which is a .sol
var elf = 0;
var arkelf = 0;

// here, zantetsuken stands for the name of the save file, which is a .sol. It will be published as zantetsuken.sol in this case.
the directory is: C://users\userName\Application Data\roaming\Macromedia\Flash Player\#SharedObjects\(file with lot of letters)\




then in save-button, add the following:

on (press){
savefile.data.elf=_root.elf;
savefile.data.arkelf=_root.arkelf;
savefile.flush();
}



then in load-button, add the following:

on (press){
savefile.data.elf=_root.elf;
savefile.data.arkelf=_root.arkelf;
savefile.flush();
}


Please take in count that it doesn't saves and loads the frame where the saving was done. currently looking for how to do it. then, enjoy the meal.

here the working file in compressed: erasia.r.e.f.unblog.fr/files/2…
Reply
:iconlegiokat:
legioKat Featured By Owner Feb 16, 2015  Hobbyist General Artist
How helpful, thank you:)
Reply
:iconliossenel:
liossenel Featured By Owner Feb 17, 2015  Student General Artist
at your service, ma'am.
anything else? a coffee maybe?
Reply
:iconguest-1001:
Guest-1001 Featured By Owner Dec 6, 2014
This is so helpful! Thank you! I'm just learning Flash and I'm using ActionScript 3 instead of 2 but I think I could adapt a lot of stuff from this to use. Thanks. :)
Reply
:iconkolkolcat:
KolKolCat Featured By Owner Nov 25, 2014  Hobbyist Traditional Artist
Would it be possible to show stats, hp etc. in a bar format rather than just in numbers? Thank you very much for the tutorial though. It's very helpful!
Reply
:iconlegiokat:
legioKat Featured By Owner Feb 15, 2015  Hobbyist General Artist
Reply
:iconkolkolcat:
KolKolCat Featured By Owner 3 days ago  Hobbyist Traditional Artist
I'm sorry for the late reply! But thank you so, so much. :3 This is fantastic. Thank you again!
Reply
:iconlazu1e:
Lazu1e Featured By Owner Nov 5, 2014
There is one and just one problem... You and Pathesis make. In her simdates you can stack HP/Energy/Time like crazy if you sleep all day and erry day. Thats not immersive since you can do everything in one day if you are good at min-maxing. Real human beings don't stack that much energy sleeping all-day actually they waste their lives this way.

A max HP cap value is needed... most people cap the max HP to 100 in SimDates.  If you want to be simple cap it at 10 and reduce your other variables accordingly, the extra digit is not that needed.

Anyway thanks a lot for the tutorial it helps a bunch.
Reply
:iconlegiokat:
legioKat Featured By Owner Nov 23, 2014  Hobbyist General Artist
If you are looking for a fairly simple way to kind of do this, instead of putting +50 hp on your sleep button, you can make it say hp = 50.

By doing this, your sleep or HP will be 50 no matter how many times you hit the sleep button. Of course, your button will still have the +1 day part, so even if you hit the sleep button 12 times, your HP will be reset to 50 each time, not compound itself, and you will be on day 12. 

You could also do a"cap" function, by making the button have an "if" statement, saying if the HP is greater than or equal to 50, the button will inactivate. This is similar to the previous solution, but instead of clicking the button 12 times, and ending up on the 12th day with 50 max daily hp, you'd be on day 1 because the button will be inactivated once you have max hp, not allowing you do move on to the next day if you have all your hp. 
Again, this would still have the +1 day function, although it would only work if you hit the sleep button with less than 50 (or whatever your max hp is) hp. 

My honest opinion, is do the first way. It's much simpler. Any questions send me a note, and I'm glad you found the tutorial helpful
Reply
:iconjpgsara:
jpgsara Featured By Owner Edited Sep 12, 2014  Hobbyist Digital Artist
hi! i was wondering,

where do you put the code so that you dont go into negative stats for? which frame/button does it go into the actionscript? i dont know where i should put it. i tried to put it in the actionscript of every button but it doesnt work ;-; please please help
Reply
:iconlegiokat:
legioKat Featured By Owner Sep 19, 2014  Hobbyist General Artist
your sleep buttpn
Reply
:iconjpgsara:
jpgsara Featured By Owner Sep 12, 2014  Hobbyist Digital Artist
oh, also, when i clicked on the sleep button it only gives me 5 hp when i put 50 hp in the sleep button actionscript

here is what i put in the sleep button actionscript

on(release){
day += 1;
hp += 50;
}

also the day resets back to one after i press the sleep button 10 times :///? please help me anyone, please please please
Reply
:iconlegiokat:
legioKat Featured By Owner Jan 4, 2015  Hobbyist General Artist
According to your code, it really should add 1 day and 50 hp. 

Once I had a problem similar to this, but I realized that I didn't make the dynamic text box large enough, so I only saw the first button. I don't know if this is your problem, but it reminded me of mine.

I don't know what to tell you though.  
Reply
:iconjijou01:
jijou01 Featured By Owner Jul 22, 2014
How can i create a love meter that progress when the player hit the right answer ?? 
and thanks
Reply
:iconhoney-apple:
honey-apple Featured By Owner Jun 17, 2014  Hobbyist Digital Artist
I'm going to make one soon, probably. I just released a detective game but omg coding frames and stuff are so tiring i iasjdnsiadn but thanks! This tutorial was super helpful.
Reply
:iconartelleart:
ArtelleArt Featured By Owner May 6, 2014
Thank you very much! I can't wait to start my own project. :D
Reply
:iconsodacat17:
SodaCat17 Featured By Owner May 5, 2014  Student Photographer
Ahh, nevermind, I realized I declared my variables one frame over the one I was supposed to declare them on, aha
Reply
:iconsodacat17:
SodaCat17 Featured By Owner May 4, 2014  Student Photographer
I'm sorry if this is dumb, but I've just about tired myself out thinking about it, aha. I keep getting either 'NaN' or '_leve' errors for the variables? I'm just really confused as to why this is happening. Like, in the stats area, instead of a number, either one of those two shows up, or nothing at all.
Reply
:iconsecretelycharmed:
SecretelyCharmed Featured By Owner Apr 16, 2014  Hobbyist Traditional Artist
Will this work on Flash CS3 and which action script do I use, 2.0 or 3.0
Reply
:iconlegiokat:
legioKat Featured By Owner Apr 19, 2014  Hobbyist General Artist
Idk about the CS3, I don't have CS3. Use 2.0
Reply
:icondindoyne:
Dindoyne Featured By Owner Apr 7, 2014  Hobbyist Artist
i have a question, where should i put the Days dynamic text? should i put it on every frame? or ... no.... im stuck with the frames -_-
Reply
:iconlegiokat:
legioKat Featured By Owner Apr 8, 2014  Hobbyist General Artist
where ever you want the numbers to show up
Reply
:icondindoyne:
Dindoyne Featured By Owner Apr 8, 2014  Hobbyist Artist
but i dont need to change the coding right?
Reply
:iconputrithetropical:
PutriThetropical Featured By Owner Apr 11, 2014
hi, i also have the same question as Dindoyne. i knew that i want the Days appear in every frame. but, what im asking is, do we place days dynamic text in first frame only or do we need to make each frame as keyframe---so we need to write the actionscript in each keyframe? i write my actionscript in each frame of layer "action". thanks
Reply
:iconlegiokat:
legioKat Featured By Owner Apr 11, 2014  Hobbyist General Artist
where ever you want to see the days, you have to have a dynamic text box on that frame. just copy and paste the textbox onto each frame
Reply
:iconputrithetropical:
PutriThetropical Featured By Owner May 24, 2014
okay, thank you :)
Reply
:iconyancalai:
Yancalai Featured By Owner Mar 27, 2014  Hobbyist Digital Artist
oh hey i have a question about the hp days money and stats thing , when ii go to the room and sleep i get 50 hp my staring hp is 100  then when i go to the shop it's still 150 hp but when i go back to my room it becomes 100 hp and goes back to day 1?? pls help
Reply
:iconlegiokat:
legioKat Featured By Owner Mar 27, 2014  Hobbyist General Artist
It sounds like you have declared your variables on that frame. You declare the variables on the very first frame, most likley a place that you will never return to (ex: the title frame). If you declare your variables on the bedroom, everytime you go to the bedroom, your variables will switch back to whatever you declared them as. They are fine at the shop, because you haven't declared them there. So the values carry over form when you were last at the bed room.

long story short, declare your variables somewhere else other than the bedroom
Reply
:iconyancalai:
Yancalai Featured By Owner Mar 27, 2014  Hobbyist Digital Artist
ohhhh thank you so much
Reply
:iconyancalai:
Yancalai Featured By Owner Mar 26, 2014  Hobbyist Digital Artist
lol at the confuse flash hahaha i see what you did there ! Awesome tutorial! thanks!
Reply
:iconxxvocaloidsrule:
XxVocaloidsrule Featured By Owner Mar 19, 2014  Hobbyist Artist
Where and how do you program all of this?? please helllppp
Reply
:iconlegiokat:
legioKat Featured By Owner Mar 21, 2014  Hobbyist General Artist
This is Macromedia Flash Professional 8. I suggest that you use Pacthesis' tutorial for beginners before you attempt any of this.
Reply
:iconxxvocaloidsrule:
XxVocaloidsrule Featured By Owner Mar 21, 2014  Hobbyist Artist
Thank you, for the tutorials, though! Its really helping.
Reply
:iconmishi-harley:
Mishi-Harley Featured By Owner Jan 26, 2014
How do you make it stop after 30 days? Like to end the game and pick someone to end with?:help: 
Reply
:iconlegiokat:
legioKat Featured By Owner Feb 15, 2014  Hobbyist General Artist
On your sleep button, have a function that says something like 
"if (day=30);
_root.gotoAndPlay("pick someone");
}

I don't know if you can copy and paste this function straight into flash,  but it's the right idea of what you should do. 
Reply
:iconinubasket:
inubasket Featured By Owner Feb 26, 2014  Hobbyist General Artist
I had to mess around a bunch with it but the code that eventually worked for me is adding the following code onto the end of your normal "sleep button" code:

if(day>=100)
_root.gotoAndPlay("picksomeone");
}

Then of course just change the "100" to whatever day you want the game to end, and the "picksomeone" to whatever you named your final frame.
Reply
:iconinubasket:
inubasket Featured By Owner Feb 26, 2014  Hobbyist General Artist
And a SUPER HUGE THANK YOU for this tutorial by the way! *hugs you 40 times*
Reply
:iconakumiheichou:
akumiheichou Featured By Owner Jan 11, 2014  Hobbyist
how do you keep the stats the same after you switch scenes??
Reply
:iconlegiokat:
legioKat Featured By Owner Jan 11, 2014  Hobbyist General Artist
They should stay the same. Remember, you only declare the variables on the first frame of the project. Or if you declare them on every slide, you are basically telling flash to reset the variables to that certain amount. 
Reply
:iconakumiheichou:
akumiheichou Featured By Owner Jan 11, 2014  Hobbyist
ok thanks!
Reply
:iconcaitlynisme:
caitlynisme Featured By Owner Jan 2, 2014  Hobbyist Writer
I'm so lost. :iconcryforeverplz: 
Reply
:iconlegiokat:
legioKat Featured By Owner Jan 4, 2014  Hobbyist General Artist
Feel free to ask questions here or check out some other tutorials or even shoot me a note if you like.
Reply
:iconcaitlynisme:
caitlynisme Featured By Owner Jan 4, 2014  Hobbyist Writer
The coding confused me so much I just gave up, :C
Reply
:iconlegiokat:
legioKat Featured By Owner Jan 4, 2014  Hobbyist General Artist
So is kirupa.com
Reply
:iconlegiokat:
legioKat Featured By Owner Jan 4, 2014  Hobbyist General Artist
Oh, well I'm sorry that's the case. YouTube is always pretty helpful and so are other deviants. If you're still interested, browse around and ask for help, the people here are extremely nice and would love to help you.
Reply
Add a Comment: