Hey, y’all, I’m a newbie developer looking to make a dialogue tree that, depending on your choice, allows the player to do different animations (flipping in different directions), with dialogue at certain intervals.
After a certain number of frontflips, you’ll get a second choice, and regardless of what you pick, I’d like it to change back to the default backflip.
I’m having an issue where, after the second choice, no matter which one you pick, no flipping animation will play. This may be over my head for now, but I was hoping someone could help me see what I’m missing, if this is the right place for that? (sorry if it’s not!)
on confirm do
haveFlipped++
ignore
if haveFlipped==1 then
play "playerFlipFirst" then
say "WASN'T THAT FREAKING SICK!?!?!?!?" then
say "I'm not allowed to swear haha" then
swap "playerFront"
end
end
end
elseif haveFlipped==2 then
play "playerFlip" then
say "I spent a long time practicing this just for you! :>" then
swap "playerFront"
end
end
elseif haveFlipped==11 then
play "playerFlip" then
swap "playerFront"
say "OMG do you spend all your time doing flips!?!?!?" then
say "ME TOO!!!!" then
ask "What's your favorite kind of flip??" then
option "Back flip" then
favoriteFlip = 1
say "NO WAY!!! That's my favorite too!!! I knew we'd be awesome friends!!!"
end
option "Front flip" then
favoriteFlip = 2
say "Haha, yeah, I love front flips! They are so cool and epic!" // wouldn't it be so funny if i used one exclamation point to show that they're lying
end
option "Secret" then
favoriteFlip = 3
say "Oh, I see... I know exactly what you mean!! But I'm not sure if I can..."
end
end
end
end
end
elseif haveFlipped>=12 then
if favoriteFlip==2 then
play "playerFlipTry" then
triedFlips++
swap "playerFront"
if triedFlips==1 then
say "Heh, whoops, guess I'm off my pro gamer flip game today!"
swap "playerFront"
elseif triedFlips==3 then
say "I just need a minute to figure it out..." then
swap "playerFront"
end
elseif triedFlips==4 then
play "playerFlipTry" then
swap "playerFront"
say "Hey so." then
say "Um." then
say "I lied. I actually don't know how to do a front flip." then
ask "I'm sorry. Are you mad?" then
option "So mad" then
favoriteFlip = 0
wait 1 then
say "... I'm sorry. I won't lie to you again."
end
end
option "It's okay" then
favoriteFlip = 1
say "Really? That's so nice of you!!" then
say "It means we can match!! With your front flips, and my back flips, together, we'll be unstoppable!!"
end
end
end
end
end
end
end
else
play "playerFlip" then
swap "playerFront"
end
end
end
elseif favoriteFlip==3 then
play "playerFlip" then
swap "playerFront"
end
elseif favoriteFlip==1,0 then
play "playerFlip" then
swap "playerFront"
end
end
else
play "playerFlip" then
swap "playerFront"
end
end
listen
end
All the haveFlipped and flipsTried stuff are because I only want this stuff to happen after you press the button a bunch of times, so it’s a choice some players won’t get. I think my problem might be my variables getting tangled up or something, but there’s nothing I can see that could be mixing them up?
If I have to reformat this, does anyone have any suggestions as to how?