Multiple questions....any help welcome...
Back button for menu?
hello, I'm making a game and in the game there is a menu. I placed the menu on a frame all by itself. The problem i'm having is I'm not sure how to code
the back button. When the player clicks the back button I would like them to be able to go back to the frame they were just on.
For example: If I'm in the kitchen and hit Menu, I will be taken to the menu. Once I'm done viewing the menu I will click Back and return back to the kitchen. If I'm in my room and hit Menu, I will be taken to Menu. Once I finish viewing Menu I will be return back to my room.
I hope what I'm asking is understandable......
Is my Give button coding correct?
Code:
on(release){//when you hit this button
if (exp = 400) {//and if the exp with that character is greater than or = to 200
gotoAndPlay("crayongift");//play this frame
}
} on (release) {
if (exp < 400){ //if exp does not >= 20
gotoAndPlay("crayonnogift");//play this frame
}
}
The problem I'm having is the Player can still give a character a gift even though their exp with that character is below 400.....
This is the original code:
Code:
on(release){//when you hit this button
if (exp >= 20) {//and if the exp with that character is greater than or = to 20
gotoAndPlay("whateveryounamedyourframe");//play this frame
} else { //if exp does not >= 20
gotoAndPlay("whateveryounamedyourframe");//play this frame
}
}
What is wrong with this code?
Code:
on(release){
if(Styxgoodexp == 0)
if (Styxbadexp ==0){
hp -= 10;
gotoAndPlay("styxconvo1");
}else if(hp<10) {
gotoAndPlay ("no hp left");
}
}
on (release) {
if(Styxgoodexp == 10)
if (Styxbadexp == 10){
hp -= 10;
gotoAndPlay ("styxconvo2");
}else if(hp<10){
gotoAndPlay ("no hp left");
}
}
The problem I'm having is once the player goes to the first convo and clicks out back to the character menu they can't click on the chat button anymore.....
This is the original code:
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");
I'm trying to make it so that if the player clicks the wrong option in a convo they can still move on the the next convo even though they didn't gain any exp.....