So I’m making a game where if you become a fugitive you have a suspicion meter and as it rises a council comes closer to capturing you and when it reaches 100 the council grabs you.
The problem is that I don’t know how to code this and that this happens ONLY when you become a fugitive, so if your not a fugitive you shouldn’t be captured. Can anyone help
Unfortunately if using fairmath, the highest a percentage can go is 99 or use fixed increases for every mistake made – which may become quite a handful compared to using fairmath – and then at specific intervals in the code having an if statement checking if suspicion is higher than 90, and if so using a goto for a capture scene. Idk if you’re wanting it to prematurely end the game or whatnot.
I created something super simplistic that can utilize this concept.
*create suspicion 0
Let me rob something.
*choice
#Rob something successfully.
Cool!
*goto next
#Rob something unsuccessfully.
Crap…
*set suspicion +50
*label next
You go into the next room, where there's more things to rob!
*choice
#Rob something successfully.
Amazing, you're a natural!
*goto next1
#Rob something unsuccessfully.
Dang it bobby.
*set suspicion +50
*label next1
*if (suspicion = 100)
*label failure
Someone caught you for being bad at your job.
*finish
*else
You escape with the loot you were able to successfully grab.
*finish
Suspicion is hidden until revealed by the choices the player makes so it didn’t work in my fugitive scene because even tho I wasn’t a fugitive I was still brought to my council.
*label check_susp
*if fugi and (susp >= 100)
You're captured or something
*set capture_scene true
*return
Checking and transition to capture scene
*gosub check_susp
*if capture_scene
<<can be filled with custom scene-per-chapter that fits the current narrative>>
*goto <A chapter where the MC gets captured>
Note that this system allows your suspicion to raise to 100% even without being a fugitive. When player does became one, they’ll get insta-captured without warning.
Text text text textText text text textText text text textText text text text
*if fugi and (susp = 100)
You’re captured or something
*set capture_scene true
*return
Or
*if fugi and (susp = 100)
You’re captured or something
*set capture_scene true
*return
Text text text text
And how to you properly use *return i’ve never used it before.
*label check_susp is a subroutine: a code that can be reused without copy-pasting it all over the place. If you’re unfamiliar with subroutine, I’d recommend to learn about *gosub and *gosub_scene command.
I’m having a problem with the *else even tho the text under it is indented it’s completely ignoring the *else and going to the capture scene
*gosub check_ suspicion
*If captured true
*goto captured_scene
*else
You were always on the move, traveling by night and resting by day. You soon discovered that the sun burn't your skin and that it could kill you if you stayed in it long enough.
It was your dad's job to get the food and your mom's to find a place for yall to sleep and eventually it was your responsibilty to cook dinner
Don’t capitalize the If in *If captured true. Other than that, I wouldn’t be able to pinpoint any other error without seeing more of the previous code.