How do I transfer the player to a random label of mine?


#1

I am trying to make a randomized fighting system for the story called “The End Is Nigh”. It is a Episode made by the fans that is 3 parts long and I am trying to make a randomized fighting system for one of the fans’ idea. I am using this coding right now:

@OMEN walks to screen right

OMEN (talk_happy_smile)
Sweet! We’re not running into any enemies! You know, I would’ve expected at least one enemy, but nope!

goto fight

label fight

OMEN
Ah, great a weak one!

label fight

OMEN
Uh, guys…
That’s a strong one…

label fight

OMEN
Eh, we could probably beat that…

label fight

OMEN
WAHHHH! It’a a BOSS ONE!


#2

I don’t know if this will work or not.


#3

Moved to Directing Helps and Tips since this involves coding. Make sure to check out our Forum Tutorial for more info about where to correctly create topics. :wink:


#4

All you have to do is change the labels so that they are different. I’m not sure if you only want the reader access a certain label based on a previous choice/points, if so I suggest using the if/else/elif option. Basically you could do something like this:

OMEN (talk_happy_smile)
Sweet! We’re not running into any enemies! You know, I would’ve expected at least one enemy, but nope!

if (weak) {
goto weakfight
} elif (strong) {
goto strongfight
} elif (beatable) {
goto beatablefight
} elif (boss) {
goto bossfight
}

label weakfight

OMEN
Ah, great a weak one!

label strongfight

OMEN
Uh, guys…
That’s a strong one…

label beatablefight

OMEN
Eh, we could probably beat that…

label bossfight

OMEN
WAHHHH! It’a a BOSS ONE!

Or, if you are planning to not do it because of gains/points, then you don’t need to use labels at all!


#5

The words in the parentheses are from gains from a previous choice.
ex:
NARR

choice “This one.” {
gain strongfight
} “That one.” {
gain beatablefight
}


#6

Omg… I am so dumb. And keep in mind that I made a statistics bar for the same game before using every gain in each episode.


#7

Thank you!