HOME | DD

Published: 2012-08-02 22:37:20 +0000 UTC; Views: 41886; 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!
legiokat.deviantart.com/art/He…
legiokat.deviantart.com/art/Pa…
legiokat.deviantart.com/art/Na…
legiokat.deviantart.com/art/In…
Related content
Comments: 331
Dindoyne [2014-04-07 07:49:22 +0000 UTC]
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 -_-
👍: 0 ⏩: 1
legioKat In reply to Dindoyne [2014-04-09 03:03:31 +0000 UTC]
where ever you want the numbers to show up
👍: 0 ⏩: 1
Dindoyne In reply to legioKat [2014-04-09 06:22:25 +0000 UTC]
but i dont need to change the coding right?
👍: 0 ⏩: 1
PutriThetropical In reply to Dindoyne [2014-04-11 11:58:11 +0000 UTC]
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
👍: 0 ⏩: 1
legioKat In reply to PutriThetropical [2014-04-11 23:40:35 +0000 UTC]
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
👍: 0 ⏩: 1
Yancalai [2014-03-27 07:49:21 +0000 UTC]
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
👍: 0 ⏩: 1
legioKat In reply to Yancalai [2014-03-27 18:51:21 +0000 UTC]
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
👍: 0 ⏩: 1
Yancalai In reply to ??? [2014-03-26 12:41:57 +0000 UTC]
lol at the confuse flash hahaha i see what you did there ! Awesome tutorial! thanks!
👍: 0 ⏩: 0
XxVocaloidsrule In reply to ??? [2014-03-20 00:26:28 +0000 UTC]
Where and how do you program all of this?? please helllppp
👍: 0 ⏩: 1
legioKat In reply to XxVocaloidsrule [2014-03-21 17:20:16 +0000 UTC]
This is Macromedia Flash Professional 8. I suggest that you use Pacthesis' tutorial for beginners before you attempt any of this.
👍: 0 ⏩: 1
XxVocaloidsrule In reply to legioKat [2014-03-21 23:25:30 +0000 UTC]
Thank you, for the tutorials, though! Its really helping.
👍: 0 ⏩: 0
Mishi-Harley [2014-01-26 16:46:02 +0000 UTC]
How do you make it stop after 30 days? Like to end the game and pick someone to end with?
👍: 0 ⏩: 1
legioKat In reply to Mishi-Harley [2014-02-15 16:06:49 +0000 UTC]
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.
👍: 0 ⏩: 1
inubasket In reply to legioKat [2014-02-26 21:55:19 +0000 UTC]
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.
👍: 0 ⏩: 1
inubasket In reply to inubasket [2014-02-26 21:55:54 +0000 UTC]
And a SUPER HUGE THANK YOU for this tutorial by the way! *hugs you 40 times*
👍: 0 ⏩: 0
akumiheichou In reply to ??? [2014-01-12 01:07:05 +0000 UTC]
how do you keep the stats the same after you switch scenes??
👍: 0 ⏩: 1
legioKat In reply to akumiheichou [2014-01-12 01:50:24 +0000 UTC]
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.
👍: 0 ⏩: 1
legioKat In reply to SecrecyKilled [2014-01-05 02:20:01 +0000 UTC]
Feel free to ask questions here or check out some other tutorials or even shoot me a note if you like.
👍: 0 ⏩: 1
SecrecyKilled In reply to legioKat [2014-01-05 02:33:03 +0000 UTC]
The coding confused me so much I just gave up, :C
👍: 0 ⏩: 2
legioKat In reply to SecrecyKilled [2014-01-05 02:47:00 +0000 UTC]
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.
👍: 0 ⏩: 1
SecrecyKilled In reply to legioKat [2014-01-05 06:06:14 +0000 UTC]
Thank you for the resources. C:
👍: 0 ⏩: 0
Nyu-Neon [2013-12-30 07:35:57 +0000 UTC]
thanks for the tutorial. It's actually pretty easy to understand if you already messed around with programming, so variables comes naturally to me I guess.
👍: 0 ⏩: 0
mfiling In reply to ??? [2013-12-29 14:37:35 +0000 UTC]
i just want to say this tutorial is fucking amazing, youve made it so easy to understand, i cant thank you enough
👍: 0 ⏩: 1
mfiling In reply to mfiling [2013-12-29 14:44:17 +0000 UTC]
sorry i made so many comments i couldnt figure out how to delete them
👍: 0 ⏩: 0
mfiling In reply to ??? [2013-12-29 13:34:47 +0000 UTC]
basically im asking how do i get my money, exp etc. to stay up to date throughout the game?
👍: 0 ⏩: 1
mfiling In reply to mfiling [2013-12-29 13:38:14 +0000 UTC]
nevermind! i fixed it! yayy! the problem was that after the animation i was sending it back to the original screen, you need to create a new menu after the animation in the timeline, and remove that extra script that you put into the first screen that says hp = 50 etc..
thankyou!! your tutorial is really helpful! you have done somehting to help mankind!
👍: 0 ⏩: 0
mfiling In reply to ??? [2013-12-29 13:21:09 +0000 UTC]
hi ive got a question, your code for the hp, money, day thing is good and i got it working, but i want to put a little animation in when you press sleep/work etc.... so i added a "goto and play" script onto the end of the script for the variables you provided, but the problem is when it goes back to the main screen with the dynamic text boxes on it, they are all reset back to their original values, im assuming that has something to do with this code you put in the main frame
"stop()
var hp = 50;
var money = 0;
var day = 1;"
but without that, it doesnt work, right?
👍: 0 ⏩: 0
Namikaze011 In reply to ??? [2013-12-09 08:45:13 +0000 UTC]
hi sir can u please make a video cuz i cant follow it really hard for me im a beginner plz make a video thank you sir!
👍: 0 ⏩: 1
legioKat In reply to Namikaze011 [2013-12-20 01:08:59 +0000 UTC]
I'm sorry, I don't have a YouTube account or anything of that nature.
I got most of this information from other tutorials (some of them being YouTube tutorials) so I would browse YouTube and such for help. Sometimes re-phrasing is also key, so ask around fellow deviants.
(and I'm a "m'am" )
👍: 0 ⏩: 0
GlubdubFish [2013-11-27 14:33:23 +0000 UTC]
hello ^^ umm.. i wanna ask if you can help me ^^" again xD ^^" (sorry TT^TT) umm can you formulate a code for an ending of a charcter? for example, if ur exp qith boy 1 is only below250, then you'll have the friend ending, something like that ^^" cuz i have problems with it ^^" i tried this:
if(exp <=250){
gotoAndPlay("friendending")
but it has this warning= > Total ActionScript Errors: 1 Reported Errors: 1
thanks in advance ^^
👍: 0 ⏩: 1
legioKat In reply to GlubdubFish [2013-11-27 16:06:51 +0000 UTC]
It should telling you you what line and what frame your errorwas on. And to answer your previous ending, yes, it is possible to make a code directing the player toa certain ending . this code would appear on either the button thats like "end with this character?" Asfor what I see wrong with you code right now, you need to close the code with ; or }. Also make sure the variables are the same
👍: 0 ⏩: 1
GlubdubFish In reply to legioKat [2013-11-29 00:31:00 +0000 UTC]
i see.... once again, thank you very much!!! ^^ i'll keep it in mind thank you again !!
👍: 0 ⏩: 0
XunnyLove [2013-11-24 23:45:04 +0000 UTC]
Thank for the tutorial, I kinda abused the work and sleep button at the begging of it...
👍: 0 ⏩: 0
Tsundere--Princess In reply to ??? [2013-11-16 08:03:13 +0000 UTC]
What program are you using?? Please give me the link to download it! Thank you!! ^.^
👍: 0 ⏩: 1
legioKat In reply to Tsundere--Princess [2013-11-26 01:41:46 +0000 UTC]
I use Macromedia Flash Professional 8. It is old a a really outdated version, but it still has actionscript 2, so the codes will work. I don't know if they still have downloads out for this one, but before you download a new version of adobe software, make sure that it is compatible with actionscript 2.0 and other credentials so you don't waste your disk space/money.
👍: 0 ⏩: 0
Ladycandy2011 In reply to ??? [2013-10-21 01:23:40 +0000 UTC]
i have a question will this work on the newist adobe software
👍: 0 ⏩: 1
legioKat In reply to Ladycandy2011 [2013-10-26 04:23:46 +0000 UTC]
I personally have no idea, sorry. I would research that before buying things and such
👍: 0 ⏩: 1
Ladycandy2011 In reply to legioKat [2013-10-26 05:15:40 +0000 UTC]
oh ok thank you and I still needed the new version of flash for school
👍: 0 ⏩: 0
Fensijo [2013-09-08 15:13:33 +0000 UTC]
First of all, thank you so much for making this tutorial, it really helped me out.
But I am having som problems with this code...
on(release){
if (exp == 0) {
hp >= 10
gotoAndPlay("talk 1");
}else if(hp<10) {
gotoAndPlay("no_hp");}
else if(exp == 10) {
hp >= 10;
gotoAndPlay ("talk 2");
}else if(hp<10){
gotoAndPlay ("no_hp");}
}
the no hp thing works when you have got 10 exp.. but not when you have got 0 exp...It just goes into negative hp instead of the no hp frame
I have already read over some of the previous comments about the same problem.. But I can't seem to figure it out. Therefore I wonder if you could be so kind as to help me out?
Would really appreciate it.
/Fensijo
👍: 0 ⏩: 2
legioKat In reply to Fensijo [2013-10-13 19:23:20 +0000 UTC]
I suppose you could always try to do something like
}else if(hp<=10){
so as to include the zero...
but I don't see a problem that's noticeable to me right now...
👍: 0 ⏩: 1
Fensijo In reply to Fensijo [2013-09-08 15:56:59 +0000 UTC]
Btw, I have already tried with the _root. before the gotoAndPlay...
👍: 0 ⏩: 0
AbsentWhite [2013-08-13 03:35:27 +0000 UTC]
-reading it all confused- -comes upon "NOW IS THE HARD PART"-
PLZ. NO MOAR.
Thanks for the tut Even though scripting makes me want to bash my head on the wall, I think I will eventually understand this....
👍: 0 ⏩: 0
| Next =>