HOME | DD

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

Published: 2012-08-02 22:37:20 +0000 UTC; Views: 41883; Favourites: 690; Downloads: 642
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

That-Stupid-Girl [2013-08-07 18:43:59 +0000 UTC]

What application do you use to make the games?

👍: 0 ⏩: 1

legioKat In reply to That-Stupid-Girl [2013-08-10 18:05:37 +0000 UTC]

I use Macromedia Flash 8

👍: 0 ⏩: 1

That-Stupid-Girl In reply to legioKat [2013-08-10 18:39:15 +0000 UTC]

Thankyou!!

👍: 0 ⏩: 0

Spazer342 In reply to ??? [2013-07-17 02:20:03 +0000 UTC]

One more problem, Whenever I sleep again I go from "day 1" or "15 hp" to "day 11" and "1515 hp"

👍: 0 ⏩: 1

legioKat In reply to Spazer342 [2013-07-24 01:10:47 +0000 UTC]

Actionscript/Vars for the dynamic text boxes and te sleep button? Make sure it doesn't say hp=15 anywhere on action script in that frame

👍: 0 ⏩: 0

Spazer342 In reply to ??? [2013-07-15 23:36:45 +0000 UTC]

 Can You Help Me? I keep getting errors: 

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");

It Says, Stuff Like, "gotoAndPlay ("no hp left") Is Not a command

👍: 0 ⏩: 1

legioKat In reply to Spazer342 [2013-07-16 20:47:25 +0000 UTC]

hmmm...... maybe try putting 


_root.gotoAndPlay("no hp left");


with the _root. part on it. 


Have you named the frame with the spaces? 


👍: 0 ⏩: 1

Spazer342 In reply to legioKat [2013-07-17 02:16:04 +0000 UTC]

Like: _root.gotoAndPlay("no hp left"); or _root. goto And Play ("no hp left");?


👍: 0 ⏩: 1

legioKat In reply to Spazer342 [2013-07-24 01:08:38 +0000 UTC]

No spaces

👍: 0 ⏩: 0

NostalgicHummingbird In reply to ??? [2013-07-09 15:45:41 +0000 UTC]

Do you know anything about inserting music on the timeline? I have the title screen and then a "code" layer under it that has "stop();" so it stays on the title screen. Then I'd like the music to start on the next frame (music is on its own layer) but It won't play So I inserted another frame on the "code" layer and put in "play();" which makes the music play but causes the scene to flash back and forth between that frame and the title frame.

👍: 0 ⏩: 2

Spazer342 In reply to NostalgicHummingbird [2013-07-17 02:18:33 +0000 UTC]

Sorry I'm late XD, But Click On A layer, go to properties  (At The Bottom), Hit File- Import- (Whatever Song)- Then Go To Sound (On Properties) And Choose Your Sound! There You Go!

👍: 0 ⏩: 0

legioKat In reply to NostalgicHummingbird [2013-07-09 21:02:31 +0000 UTC]

I haven't looked into putting music in just yet.

👍: 0 ⏩: 1

NostalgicHummingbird In reply to legioKat [2013-07-09 21:23:11 +0000 UTC]

mk

👍: 0 ⏩: 0

KittyKatHitUWithABat [2013-07-08 03:17:08 +0000 UTC]

Having more problems I used your code
on(release){
if (hp>=15) {

hp -= 15;
money += 30;

} else {
this.enabled = false;
}

but every time the player clicks on "work" it starts out with 030, then turns into 03030 after clicking "work" a second time. Why is this happening?

👍: 0 ⏩: 1

legioKat In reply to KittyKatHitUWithABat [2013-07-08 17:43:10 +0000 UTC]

what are your variables, and do you have any other variables that could affect it? Did you name them in the first frame of your project?

👍: 0 ⏩: 0

panychu In reply to ??? [2013-07-04 18:23:12 +0000 UTC]

Thank you so, so, sooooo much for this tutorial!!! <3

👍: 0 ⏩: 0

KittyKatHitUWithABat In reply to ??? [2013-07-02 14:53:25 +0000 UTC]

It was a very helpful tutorial however, I'm having trouble with HP, Money, and Days. I've already identified the variables on one slide, and when my character talks to a guy her HP is supposed to go down (this guy is supposed to be in a different location on a different slide). Do I have to identify variables over and over again in order for them to work like they're supposed to? And do I have to do the action script and identification of variables for every variable that I do? Sorry, maybe I'm being stupid but I just can't figure it out

👍: 0 ⏩: 1

legioKat In reply to KittyKatHitUWithABat [2013-07-05 01:02:55 +0000 UTC]

copy/paste your actionscript for whatever it is you need help with

👍: 0 ⏩: 0

epiclolzz In reply to ??? [2013-06-28 12:24:56 +0000 UTC]

mind making a tutorial on making shops and stuff like that?
sorry i ain't a pro with these things

👍: 0 ⏩: 0

SilverHatsuyuki In reply to ??? [2013-06-17 14:44:27 +0000 UTC]

Hi,I was wondering if the codes for hp,money and all also works for Ren'py engine or do you necessarily need only flash? I'm kinda new in the field... I'm also trying novelty at the moment...Either way the tutorial help a lot

👍: 0 ⏩: 1

legioKat In reply to SilverHatsuyuki [2013-06-18 13:48:34 +0000 UTC]

Thanks I haven't tried any other visual novel stuff, sorry!

👍: 0 ⏩: 1

SilverHatsuyuki In reply to legioKat [2013-06-18 14:43:53 +0000 UTC]

It's okay Thanks anyway. I'll just try downloading Flash and try your tutorial. Thanks again

👍: 0 ⏩: 0

Glowandstar In reply to ??? [2013-06-08 21:52:40 +0000 UTC]

Thank you! i thought it was going to be a cluster fudge of code but now that you cleared that its super simple, you've inspired me to making one

Thank you again!

👍: 0 ⏩: 0

sisi4321 In reply to ??? [2013-05-10 12:56:32 +0000 UTC]

I LOVE PACTHESIS!!!!!!!!!!!! just you know -__-

👍: 0 ⏩: 0

SakuraiYuuki In reply to ??? [2013-05-04 06:31:01 +0000 UTC]

can you teach how to make loading bar? I cant understand how to made it.. It make me dizzy.

btw, u tutorial in this really helping me, thanks! ^^

👍: 0 ⏩: 1

legioKat In reply to SakuraiYuuki [2013-05-04 18:06:29 +0000 UTC]

Check out my favorites on my profile, I have some great tutorials for the loading bar thing. I ,myself, haven't attempted making one yet.

👍: 0 ⏩: 0

andreavivante [2013-04-30 23:26:42 +0000 UTC]

hello! i have a question.
if i got to the point of zero HP, how can i make it so it doesn't become a negative in and it also goes to a frame which would say something like "go to sleep!" or "you have no more hp?" thank you!

👍: 0 ⏩: 1

legioKat In reply to andreavivante [2013-05-12 14:37:06 +0000 UTC]

In the "talk" function I have in the tutorial, you'll see a part of it that says something like "this.enabled=false" or sething of tht nature. Replace that line with a gotoAndPlay function directing you to that frame saying you have no hp. Also, it should have already disabled you from going into negative hp...

👍: 0 ⏩: 0

flamehazelollipop In reply to ??? [2013-04-17 12:33:54 +0000 UTC]

Uhm, legioKat, can you help me? (


I've copy-pasted the code:
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");

But then when I test it out, this is the output:

**Error** Scene=Scene 1, layer=Layer 44, frame=58:Line 3: Statement must appear within on handler
if (expciel == 30){

Total ActionScript Errors: 1 Reported Errors: 1

What does : "Statement must appear within on handler" .. mean??

👍: 0 ⏩: 1

legioKat In reply to flamehazelollipop [2013-04-17 23:45:58 +0000 UTC]

You haven't closed the function. Make sure before you test it you have a } (or two if needed) to close it. It's like adding a period to the end of your sentence. Flash doesn't know if you have ended the code without the brackets.

👍: 0 ⏩: 1

flamehazelollipop In reply to legioKat [2013-04-18 06:37:43 +0000 UTC]

Oh I get it now!!! Thanks!

👍: 0 ⏩: 0

i-loveanime In reply to ??? [2013-04-08 08:19:05 +0000 UTC]

can you make a tutorial about making an "inventory" ??? pleaseeeeeee

👍: 0 ⏩: 1

legioKat In reply to i-loveanime [2013-04-18 00:23:31 +0000 UTC]

Maybe in the future. I am super busy now. I will definitely try though

👍: 0 ⏩: 1

i-loveanime In reply to legioKat [2013-04-18 02:34:12 +0000 UTC]

Thank u so much !!!

👍: 0 ⏩: 0

MarcheDeMorce [2013-04-07 12:42:50 +0000 UTC]

Oh thank you! I've been searching EVERYWHERE for this...! All I see on the net are hard to understand you're so kind...Now I can start a sim date...*evil laugh* Thank you thank you thank you!~~~ >u<

👍: 0 ⏩: 0

Skadoobie In reply to ??? [2013-04-01 03:56:12 +0000 UTC]

Wow, you make it look so easy! Wonderful tutorial, thank you so much! A question, though. How would you go about setting maximum or minimum values for HP? Like, to prevent the HP from going over 50.

👍: 0 ⏩: 1

legioKat In reply to Skadoobie [2013-04-04 10:14:58 +0000 UTC]

Instead of saying hp+= 50 in your sleep function, make it say hp== 50

👍: 0 ⏩: 1

Skadoobie In reply to legioKat [2013-04-05 05:12:47 +0000 UTC]

Thank you!

👍: 0 ⏩: 0

Dreamzs In reply to ??? [2013-03-29 16:17:28 +0000 UTC]

LegioKat Great Tutorial! it made my progress 'halfway there'. The only problem is how do I get the ending with the specific character with a specific exp? Could you please help me? I hope I' am not a bother to your life... sorry I' m a slow learner so I like your tutorial and Pacthesis' tutorial because it made making dating sim so much easier..

👍: 0 ⏩: 1

legioKat In reply to Dreamzs [2013-03-30 15:48:56 +0000 UTC]

You're fine and this depends on whether or not the player will be able to choose the character they want to end up with or will it just end with the character that has the most exp with the player?

👍: 0 ⏩: 1

Dreamzs In reply to legioKat [2013-03-31 09:18:43 +0000 UTC]

Thanks for responding to my question and they will automatically end up with the character with the most exp.

👍: 0 ⏩: 1

legioKat In reply to Dreamzs [2013-07-16 20:50:57 +0000 UTC]

Wow, this is late. Even for me. But I have a way, it's extremely long and tedious, but it gets the job done. I'm ABSOLUTELY positive that there is an easier and less complicated way out there, I just haven't figured it out yet. If you still want my crazy complicated and awful code, just let me know.... you might have already found a way to do it!

👍: 0 ⏩: 0

Trixyace In reply to ??? [2013-03-13 19:24:26 +0000 UTC]

Legio please accept the thank you from my last post and disregard it ive figured out a way to make what i want.

now im working on collectable items that are added to an inv lotsa work ahead.

👍: 0 ⏩: 1

legioKat In reply to Trixyace [2013-03-13 23:45:17 +0000 UTC]

OH. Lol. Okay. oops

👍: 0 ⏩: 0

TrainxHeartnet [2013-03-13 15:46:09 +0000 UTC]

THANK YOU SO MUCH!!! I cant even begin to tell you how long im been trying to find out how to do this and people have tried to explain it to me before but im more a learn by seeing type of person so i never understood it =/ but this was so helpful.

👍: 0 ⏩: 0

Trixyace In reply to ??? [2013-03-13 14:42:59 +0000 UTC]

legio you have helped me alot but i have a question.

ive made a scene where in a text box you can click a button that is ment to give my character a phone number which at a later stage (when he gets to a phone) he can call. (the number is not visible but the game should remember i picked it up) and when i do finally get to a phone i was going to add a button to allow a call to said number IF i picked it up previously.

So please any code you know of or hints you may have will help me heaps.

Thanks mate you're teaching a total beginner and im starting to pick it up pretty quick i think.

👍: 0 ⏩: 1

legioKat In reply to Trixyace [2013-03-13 23:44:16 +0000 UTC]

ummm... you could make a variable called, say... "phone". Declare that in the first frame just like you would do for the "day" and "exp".

var phone = 0;

Then, add this code to the button that "gives" you the phone number:

on(release){
phone += 1; \\you now have 1 phone number
_root.gotoAndPlay("whateverframeisnext");
}

Then, when you get to the phone to use, create the button that allows you to call the number and put the code:

on(release){
if(phone = 1){
_root.gotoAndPlay("callingsomebodyorwhateverisnext");
}else{
this.enabled = false; \\or you could make a frame where it says, "number not found" and have a _root.gotoAndPlay function here
}
}

I think this should work. I am not positive though.

👍: 0 ⏩: 0

motokocat22 In reply to ??? [2013-03-10 13:08:32 +0000 UTC]

Every time I press the work button instead of my hp dropping from 100 to 60 it drops all the way down to 0. WHHHY?

👍: 0 ⏩: 1

legioKat In reply to motokocat22 [2013-03-10 18:28:38 +0000 UTC]

I would have to know the script you used on your button

👍: 0 ⏩: 1

motokocat22 In reply to legioKat [2013-03-10 19:26:58 +0000 UTC]

on(release){
if (hp>=40) {

hp -= 40;
money += 25;


} else {
this.enabled =
false;
}
}

👍: 0 ⏩: 1


<= Prev | | Next =>