HOME | DD

Published: 2012-08-02 22:37:20 +0000 UTC; Views: 41943; Favourites: 691; Downloads: 643
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
legioKat In reply to ??? [2012-08-13 02:46:42 +0000 UTC]
Yay! When you are done, send me a link so I can see it
👍: 0 ⏩: 1
Lyniex3 In reply to legioKat [2012-08-13 12:31:01 +0000 UTC]
alrighty ^^
i'm stuck again xc
so u see i have a work button
on(release){
if (hp>=1) {
hp -= 15;
money += 20;
} else {
this.enabled = false;
}
}
i want to add:
}else if(hp<10){
gotoAndPlay ("no hp left");
but it won't go to the frame that i want it to go to when u have no hp left x<
👍: 0 ⏩: 1
legioKat In reply to Lyniex3 [2012-08-13 15:06:20 +0000 UTC]
well, to start off, if your code is actually saying "if your hp is greater than or EQUAL to one, then take away 15 hp and add 20 dollars. <--- unless you have more then 15 hp, then you will go into the negatives! O.o It might have just been a typo and stuff though. ^.^
To play the no hp left, use this:
on(release){ \\when i click this button
if (hp >= 1){ \\ if your hp is greater than or equal to 1
hp -= 15; \\ take away 15 hp
money += 20; \\ add 20 dollars
****Also, you should look over whether if u want working to need 15 or 10 hp, because both of the numbers are in this one code. Which ever one you want, just insert where the hp numbers go. hope this helped
}else if(hp < 10){ \\ but if hp is less than 10
_root.gotoAndPlay("no hp left"); \\ go to this frame.
}
}
👍: 0 ⏩: 1
Lyniex3 In reply to legioKat [2012-08-13 16:12:01 +0000 UTC]
Thanks ^^
when i upload my flash i'll make sure to give credits to you
👍: 0 ⏩: 1
HollyDays24 In reply to ??? [2012-08-10 10:58:29 +0000 UTC]
i made the 'good exp' button choice and it -10 hp and +10 exp and i also made the 'back to menu' button and it goes to the previous frame. but when i pressed the 'back to menu' the hp and exp went back to usual (50 hp 0 exp). it was okay when i pressed the 'good exp' button choice but i have problems with the 'back to menu'. so the question is, do i have to make a new frame for the 'back to menu' button? and sorry for the long comment
👍: 0 ⏩: 1
legioKat In reply to HollyDays24 [2012-08-10 12:38:58 +0000 UTC]
if you declared your variables on that particular slide, (the menu) whenever you go back to that slide, the variables regulate that the amounts you declared them to be. usually, the declaring variables part goes on like that title frame so it doesn't interfere with any game play.
Declaring variables, is like saying "starting on this frame, hp = 50, money = 5, and exp = 0" so if you go back to that frame, you will reset your stats. I hope this is what your question was. If it confuses you, I have this trial test thingy made in my gallery called "this is what i did..." that might help too.
👍: 0 ⏩: 1
Berry-Melon In reply to ??? [2012-08-08 18:50:06 +0000 UTC]
This is a sweet tutorial, i wish someone would make a video based one on youtube but i guess they never will, it's like been years and everyones always asking how to make flash based dating sim games. Pacthesis's tutorial gives a basis for a game, i guess if people were to combine your tutorial with Pathesis's they would learn be on the road to a full dating sim game. This is a really neat tutorial.
👍: 0 ⏩: 1
fanofnaruto In reply to ??? [2012-08-07 08:18:40 +0000 UTC]
I love you I love you I love you I love you I love you I love you now I have tears in my eyes I love you I love you I love you
OMG TToTT
👍: 0 ⏩: 1
RaynbowzRule In reply to ??? [2012-08-04 23:43:53 +0000 UTC]
arrrh, ok im having truoble with the coding
heres what I did:
1. declared my variables
2. then clicked on my dynamic text fields and typed the variable name in (for example I clicked on HP and typed in hp on the variable bar)
3. clicked my button and copy & pasted the code in so that if you click on that button you get +10 exp and -10 hp
4. did the same thing for my other button but left out the exp
5. tested movie and found that if I click the button nothing happens to the exp or hp
What did I do wrong?
👍: 0 ⏩: 1
legioKat In reply to RaynbowzRule [2012-08-05 02:30:28 +0000 UTC]
Make sure you did the instance name. The instance name shouldn't be the same as your actual variable name. (hp-->energy).
I didn't make a button with both +10 exp and -10 hp. I make two separate buttons. The code I have for the talk button has the -hp already written into it. So no other button involving that character should involve hp. The button that involves the exp, is the good choice in your dialogue. (see the dialogue section with "joe"-->the choice saying (say your name) is the good choice, and under that choice in it'sa actionscript you should have the gotoAndPlay thing (leading to his reply) and also have the amount of exp you want to add.
on (release) { \\when i hit this button
_root.gotoAndPlay("talk 1a"); \\go to the response of dialogue 1 choice a
exp += 10; \\and add 10 exp
} \\endcode
*also, you can add other things to the button. like if you are taking inventory or whatever, and this person gives you a balloon, make a dynamic box just like you would for hp, but ofcourse name it something else. and if you want to do +1 balloon, then just add:
balloon += 1;
right under your +exp.
------
if you are still having problems show me the actionscript.
👍: 0 ⏩: 1
RaynbowzRule In reply to legioKat [2012-08-05 04:19:12 +0000 UTC]
i am so sorry if my derp moments are annoying you and you really don't have to respond if you don't want to....
I just had to say that because im annoying myself
oh jeeeez it still didn't work, I understand the code but my flash doesn't for some reason...
ohhhh mannnn heres my code for the talk button:
-------
on(release){
if (exp == 0) {
hp -= 10;
gotoAndPlay("talk 1");
}else if(hp<10) {
this.enabled = false;
}
}
--------
and heres my code for the good response:
on (release) {
_root.gotoAndPlay("hi");
}
on (release){
var exp = exp + 10;
experience = exp;
}
-------
and heres my code for the bad response:
on (release) {
_root.gotoAndPlay("nada");
}
on (release){
var hp = hp - 10;
energy = hp;
}
----
I originally thought the problem was because I had named the instance name the same as the variable...but when I changed it my flash didn't recognize the code AT ALL, I had to change it back then my flash recognized it......
Oh and thank you so much for subconsciously teaching me how to make an inventory
👍: 0 ⏩: 1
legioKat In reply to RaynbowzRule [2012-08-05 18:14:52 +0000 UTC]
what happens with the first code? like what message pops up? instead of disabling it, try making a slide saying 'No hp left'. You would put that in place of the script that says ---> this.enabled = false. So your actionscript would look like this...
on(release){
if (exp == 0) {
hp -= 10;
gotoAndPlay("talk 1");
}else if(hp<10) {
gotoAndPlay("no hp left");
}
}
Also, if you are doing more than one conversation thing with your character, you would take away that last } and keep doing the code. Only use two of } when it's the last line of a big actionscript.
_____________
for the good response, try this instead:
on (release) {
_root.gotoAndPlay("hi");
}
on(release){
exp += 10;
}
________________
for the bad response, just have the _root.gotOAndPlay("nada");} (without the hp because the talk button has the code that takes away hp.)
👍: 0 ⏩: 1
RaynbowzRule In reply to legioKat [2012-08-05 19:10:44 +0000 UTC]
ok I checked the codes and the message said "this script has no errors"
it said that for all the codes
I havent made the 'no hp left' slide yet because I want to experiment with just the talk button....
ok I copy and pasted the new codes in....and nothing happened......no hp change, no exp change....
would you like me to upload the flash i have so far, so you can see what i mean?
👍: 0 ⏩: 1
RaynbowzRule In reply to RaynbowzRule [2012-08-05 20:35:39 +0000 UTC]
ok i made a flash that explains meh problems: [link]
pwease take a look at it~
👍: 0 ⏩: 0
level1cleric In reply to ??? [2012-08-04 18:14:24 +0000 UTC]
That god for another tutorial. X_X
👍: 0 ⏩: 0
Kurosichi In reply to ??? [2012-08-03 10:44:50 +0000 UTC]
I have been looking for 3 months for something like this! Thank you!
👍: 0 ⏩: 1
legioKat In reply to Kurosichi [2012-08-03 12:56:19 +0000 UTC]
you're welcome! I'm glad it helps!
👍: 0 ⏩: 1
Kurosichi In reply to legioKat [2012-08-13 13:20:31 +0000 UTC]
Neh neh, LegioKat-San, can this work with Macromedia flash 8?
👍: 0 ⏩: 1
legioKat In reply to Kurosichi [2012-08-13 15:07:17 +0000 UTC]
Yes, this is what I use actually Im pretty sure it should work with all other versions of flash, just the layout might be different.
👍: 0 ⏩: 1
ChisaMatsushina In reply to ??? [2012-08-03 07:32:13 +0000 UTC]
This is reaaaaaaaaaaaallly help <3 Thank You <3333333333
👍: 0 ⏩: 1
RaynbowzRule In reply to ??? [2012-08-02 23:03:32 +0000 UTC]
Holy cow!!!! THANK YOU!!!!!! YOU DESERVE A HIGH FIVE!!! *jumps and hives you a high five* WHOOOOO!!!
👍: 0 ⏩: 1
RaynbowzRule In reply to legioKat [2012-08-02 23:23:11 +0000 UTC]
*fist pounds* I think im high on excitement.....
👍: 0 ⏩: 0
Cassie8409UV In reply to ??? [2012-08-02 22:41:17 +0000 UTC]
hey, looks good,, Didyouknow mac computers arebetter for thiskind of work? Youcangeta free one at tinyurl.com/buxdqgh
👍: 0 ⏩: 0
<= Prev |