HOME | DD

legioKat — Flash Sim Dating Tutorial (HP, Days, etc)

Published: 2012-08-02 22:37:20 +0000 UTC; Views: 41282; Favourites: 688; Downloads: 639
Redirect to original
Description This tutorial deals with exactly what it is titled as...

HP, Days, Money, and all of those other stats. Also it goes into stuff about a sequenced dialogue path. 
It is assumed that you have general knowledge on flash (I USE MACROMEDIA FLASH PROFESSIONAL 8). If this looks like a foreign language to you, go to Pacthesis  's page and she has a very neat tutorial on the basics. Then, come back and see if any of this makes sense. 

If you are confused, feel free to comment below so that I (In the rare event that I ever come on here) , or another Deviant can maybe help you. 
If you think that this tutorial is a waste of megabytes go check out Youtube, kirupa, and Macromedia flash forums for better ones. Also, other Deviants here are way better at this stuff than I am, so take a tour around Deviantart also. 

If you do happen to comment on the tutorial, do not be offended if I answer +/- 4 months later. Also, do not be offended if I never answer at all. 
If I don't answer your question, and you see that  I have answered others (aka it looks like I've deliberately avoided your question), it is only because of one (or more) of the following circumstances:
    a. I don't know the answer
    b. the answer is in one of my other tutorials
    c. you aren't using MACROMEDIA FLASH PROFESSIONAL 8 (All of my tutorials are based off of MACROMEDIA FLASH PROFESSIONAL 8; if you do not have MACROMEDIA FLASH        PROFESSIONAL 8, and run into problems, I most likely can't help you because I don't use  other forms)
    d. I'm not sure what you're asking
    e. There's a similar question already figured out in the comment section

If all else fails, send me a  note. I will answer those before heading to the comment section.

Happy Flashing
________
Check out my other tutorials on this stuff down below!
Make a health bar/love meter/etc!!
legiokat.deviantart.com/art/He…

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


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

Here is my tutorial involving Inventory, Gift-giving, and a little bit on shops!
legiokat.deviantart.com/art/In…
Related content
Comments: 331

RM-Keyblade-Mistress [2017-03-31 03:13:38 +0000 UTC]

I use Adobe Flash.

👍: 0 ⏩: 0

Kaluki-Rin [2017-03-03 17:13:16 +0000 UTC]

WHAT!!!!! -scream-
         

👍: 0 ⏩: 0

BleachYaoiFangurl [2016-08-01 20:47:05 +0000 UTC]

what's the «app» (computeur) for make dating sim?

👍: 0 ⏩: 1

yamiyummieyumi In reply to BleachYaoiFangurl [2016-12-13 00:12:55 +0000 UTC]

If you're talking about the program with this programming language (action script 2), you can use Micromedia Flash 8 or Adobe Flash CSX (replace X with version number).
Though, these days people using AS3, which available for Adobe Flash CC 2014 or later

👍: 0 ⏩: 1

CoryXkenshinfan In reply to yamiyummieyumi [2017-03-29 21:26:00 +0000 UTC]

Girl: Do u even want to be with me forever?
Boy: No
Girl: Do u even like me?
Boy: No
Girl: Would u cry if i walked away?
Boy: No
She heard enough and was hurt... She walked away with tears in her eyes
The boy grabbed her arm
Boy: Your not pretty...your beautiful
Boy: I dont want to be with u forever...I need to be with u forever
Boy: I dont like u...I love u
Boy: I wouldn't cry if u walked away......I would die if u walked away.
Boy Whispers: Plz stay with me
Girl: I will...
*Tonight at midnight your true love will realize they loves u
*Something good will happen to u at 1-4pm
*Tomorrow it could be anywhere!!!
*Get ready for the shock of your life!
*If u dont post this to 5 other comments... You will have baD luck in relationships for the next 10 years

👍: 0 ⏩: 0

dirtyrapscallion [2016-05-23 15:58:54 +0000 UTC]

I'm hitting a snag, am using -  on (release) {money+= 1;} - and the dynamic text keeps adding a 1 instead of really adding it. So it ends up looking like: 01111111 instead of 8. What's the problem, have been working on it for hours I'm probably missing something stupid. Please help. Am using the _global. for my variables in the main scene top layer at the beginning.

👍: 0 ⏩: 0

mintnewt [2016-04-11 06:10:11 +0000 UTC]

where do you put the exp? obviously its not a dynamic text thats easily seen?

👍: 0 ⏩: 0

Muurin [2016-01-01 03:24:10 +0000 UTC]

this tutorial is very useful, thank you for sharing

i used this for adding health points and items BUT
there's a problem, when i used "gotoandplay"
everything's back to 0 again

please help TT_TT

👍: 0 ⏩: 0

123fendas [2015-10-04 16:29:19 +0000 UTC]

Wow, this is some serious shit. Programming is difficult.

If you see this, please answer. Can I do flash games with ActionScript 3.0?

👍: 0 ⏩: 1

Sleepocky In reply to 123fendas [2015-11-14 06:34:00 +0000 UTC]

i just thought you should know.. this was made in Actionscript 2.0!
but yes, you can make flash games with Actionscript 3.0, just not with this current tutorial. uwu

If you have CS3 or CS4 flash professional, you can simply switch your actionscript to Actionscript 2.0 
before you start making a new file, you can see in the layout of FLASH a choice(s) of two actionscript types
for me, as I am using CS4, there is Actionscript 2.0 and Actionscript 3.0

<3.

👍: 0 ⏩: 1

123fendas In reply to Sleepocky [2015-11-16 14:57:22 +0000 UTC]

I have Flash CC, and only ActionScript 3.0 exists.

But it's okay, I managed to make my own flash game anyway :]

123fendas.deviantart.com/art/O…

👍: 0 ⏩: 1

Sleepocky In reply to 123fendas [2015-11-17 03:52:44 +0000 UTC]

gr8 to hear!

👍: 0 ⏩: 0

Kiddoriddo [2015-06-24 13:07:35 +0000 UTC]

I still go into negative hp even with the code. What could be the reason for this? Also, the dialogue exp on(release){

if (exp == 0) {  
hp -= 10;
gotoAndPlay("hi");  
}else if(hp<10) {
this.enabled = false;
}else if(exp == 10) {
hp -= 10;
gotoAndPlay("hi 2");
}else if(hp<10) {
this.enabled = false;

code didn't work and I had to rewrite it myself. I use cs4, trial version. 

👍: 0 ⏩: 0

Kiddoriddo [2015-06-21 05:11:06 +0000 UTC]

I keep getting this: Symbol=Symbol 3, Layer=Layer 1, Frame=1: Line 7: 'else' encountered without matching 'if'
    } else {

Scene=Scene 1, Layer=Layer 1, Frame=1: Line 11: on handlers may not nest within other on handlers
    on(release)

Scene=Scene 1, Layer=Layer 1, Frame=1: Line 12: '{' expected
    day += 1;

Scene=Scene 1, Layer=Layer 1, Frame=1: Line 1: Statement block must be terminated by '}'
    on(release){

Scene=Scene 1, Layer=Layer 1, Frame=1: Line 14: Syntax error.
    }

👍: 0 ⏩: 0

Obsesser13 [2015-06-13 22:12:30 +0000 UTC]

I have adobe flash cc and there are barely any tutorials for that out so far (as I can tell/find... I'm very new to the program still and can make some basic animations and such if that matters at all too). If not, can this work with adobe flash cc or do u know where  I could find some tutorial that could help? thanks

👍: 0 ⏩: 1

yamiyummieyumi In reply to Obsesser13 [2016-12-13 00:20:40 +0000 UTC]

I think you should search for 'Migrating from actionscript 2 to actionscript 3'. Or if you're lucky, you could find a converter that works for the codes you need

👍: 0 ⏩: 0

Minyou [2015-06-07 21:18:19 +0000 UTC]

Haii, which one code should I use to make " buy " button? or maybe is diffrent one? for me hp is energia, money is pieniadze, day is dzien . I know those names are strange but I making polish sim dating :3

👍: 0 ⏩: 1

legioKat In reply to Minyou [2015-06-30 16:48:52 +0000 UTC]

legiokat.deviantart.com/art/In…

👍: 0 ⏩: 1

Minyou In reply to legioKat [2015-06-30 20:29:41 +0000 UTC]

Thank you ! You are the best *-*

👍: 0 ⏩: 1

Minyou In reply to Minyou [2015-07-01 18:12:08 +0000 UTC]

Hello, I've got one more answer. How to add music button on/off ? You know, when I click "on" music turns on but when I click "off" the music is stopped. Sorry for my English.

👍: 0 ⏩: 0

DerpInc [2015-05-28 17:39:23 +0000 UTC]

How do I make a menu though, like how to I keep track of the points in a symbol so I can hide it and it won't take up space on the game?

👍: 0 ⏩: 0

yui123 [2015-05-11 01:15:46 +0000 UTC]

When I try to code the "talk" button, I get several errors in flash (I'm using CS3 btw). I want to make a dialogue path for my character, like "saving where you left off" sorta thing, as well as displaying a frame where it tells you that you have too little hp, adding exp and stuff. The code that's given here doesn't seem to work for CS3, I tried using:

on(release){

if (exp == 0) {  
hp -= 10;
gotoAndPlay("talk 1");  
}else if(hp<10) {
gotoAndPlay ("no hp left");
}else if(exp == 10) {
hp -= 10;
gotoAndPlay ("talk 2");
}else if(hp<10){
gotoAndPlay ("no hp left");

and I was wondering if you or anyone else could give me the code that's modified for CS3? I would really appreciate it, I'm working on a school project

👍: 0 ⏩: 0

Sttardust [2015-05-04 22:14:39 +0000 UTC]

Hey!
I have a doubt. I follow your instructions but when i paste the code of the "talk button" in its actionscript i doesnt do anything. I click and nothing happends, it doesn't go to the frame i want it to go. This is what I have: 

on(release){
if (exp == 0) {
hp -= 10;
gotoAndPlay("WIL1");  
}else if(hp<10) {
this.enabled = false;
}
}

How can I fix this?

👍: 0 ⏩: 1

legioKat In reply to Sttardust [2015-05-08 01:47:00 +0000 UTC]

So when nothing happens, no variables are changed, you don't even move to a different frame? Hm, I suppose this could be a ton of things.


-Make sure your vars are named correctly.
-Also, make sure you quoted your frame name "WIL1" exactly as you named it on that frame. Because sometimes if you forget you put it in lowercase or forgot you renamed it,  whatnot, flash will look for a frame that kind of doesn't exist. 
-Make sure you're actually coding on a button; I've accidentally coded on a graphic and wondered why nothing happened when I clicked on it. Make sure its a button and that there's a little clicky hand when you test it indicating that you are interacting with a button.
-Also, does any error message from flash pop up? If it doesn't that might mean you named the gotoAndPlay frame wrong.... 

👍: 0 ⏩: 1

Sttardust In reply to legioKat [2015-05-13 13:12:07 +0000 UTC]

I'm so stupid I'm ashamed.
Thank you so much for anwsering. After I've checked all the problems you told me I might have, when I got to the last one I realised that the code was not closed with the "}" things.. That was the problem. 
Any way,
Thank you for answering, again and for the tutorials. 
<3

👍: 0 ⏩: 0

TheProxyLady [2015-02-25 18:39:25 +0000 UTC]

i dont even i dont even unterstand this

👍: 0 ⏩: 0

liossenel [2015-02-12 05:12:08 +0000 UTC]

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)

👍: 0 ⏩: 1

legioKat In reply to liossenel [2015-02-15 21:24:16 +0000 UTC]

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.

👍: 0 ⏩: 1

liossenel In reply to legioKat [2015-02-16 15:34:00 +0000 UTC]

at last, thanks for tutorial. If you want I can give some code to make save/load button?

👍: 0 ⏩: 1

legioKat In reply to liossenel [2015-02-16 17:02:15 +0000 UTC]

That would be much appreciated! Thank you

👍: 0 ⏩: 1

liossenel In reply to legioKat [2015-02-16 22:01:05 +0000 UTC]

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…

👍: 0 ⏩: 1

legioKat In reply to liossenel [2015-02-17 01:28:46 +0000 UTC]

How helpful, thank you

👍: 0 ⏩: 1

liossenel In reply to legioKat [2015-02-17 15:38:32 +0000 UTC]

at your service, ma'am.
anything else? a coffee maybe?

👍: 0 ⏩: 0

Guest-1001 [2014-12-06 16:20:15 +0000 UTC]

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.

👍: 0 ⏩: 0

KolKolCat [2014-11-26 07:33:15 +0000 UTC]

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!

👍: 0 ⏩: 1

legioKat In reply to KolKolCat [2015-02-15 23:09:21 +0000 UTC]

legiokat.deviantart.com/art/He…

👍: 0 ⏩: 1

KolKolCat In reply to legioKat [2015-02-25 22:59:47 +0000 UTC]

I'm sorry for the late reply! But thank you so, so much. :3 This is fantastic. Thank you again!

👍: 0 ⏩: 0

Lazu1e [2014-11-05 21:25:48 +0000 UTC]

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.

👍: 0 ⏩: 1

legioKat In reply to Lazu1e [2014-11-23 20:02:43 +0000 UTC]

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

👍: 0 ⏩: 0

jpgsara [2014-09-13 03:09:21 +0000 UTC]

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

👍: 0 ⏩: 2

legioKat In reply to jpgsara [2014-09-20 01:58:49 +0000 UTC]

your sleep buttpn

👍: 0 ⏩: 0

jpgsara In reply to jpgsara [2014-09-13 03:31:33 +0000 UTC]

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

👍: 0 ⏩: 1

legioKat In reply to jpgsara [2015-01-05 01:35:21 +0000 UTC]

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.  

👍: 0 ⏩: 0

jijou01 [2014-07-22 21:37:29 +0000 UTC]

How can i create a love meter that progress when the player hit the right answer ?? 
and thanks

👍: 0 ⏩: 0

honey-apple [2014-06-17 15:31:06 +0000 UTC]

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.

👍: 0 ⏩: 0

ArtelleArt [2014-05-06 21:10:13 +0000 UTC]

Thank you very much! I can't wait to start my own project.

👍: 0 ⏩: 0

SodaCat17 [2014-05-05 20:47:20 +0000 UTC]

Ahh, nevermind, I realized I declared my variables one frame over the one I was supposed to declare them on, aha

👍: 0 ⏩: 0

SodaCat17 [2014-05-05 03:23:01 +0000 UTC]

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.

👍: 0 ⏩: 0

SecretelyCharmed [2014-04-16 20:09:14 +0000 UTC]

Will this work on Flash CS3 and which action script do I use, 2.0 or 3.0

👍: 0 ⏩: 1

legioKat In reply to SecretelyCharmed [2014-04-20 00:30:27 +0000 UTC]

Idk about the CS3, I don't have CS3. Use 2.0

👍: 0 ⏩: 0


| Next =>