#girl who manages to do spaghetti code in a program known for not needing to do proper code
Explore tagged Tumblr posts
Text
spent sooo long testing renpy codes. i can now do such impressive feats as "have a character respond differently based on how nice you were to them" and "have the player character say slightly different dialogue based on previous player choices". riveting..
#97#surprisingly hard!!#i could not manage to actually set up the thing i wanted#which was essentially 'you put points into different personality meters with your answers and whichever meter has the highest score#determines your 'personality type' preset which changes some of your characters dialogue'#i just could not manage to get 3 point systems to simultaneously affect a different point system. got me an error every time#i wanted it to be like. 'if metric 1 is higher than metrics 2 and 3 then personality type is set to 1' and so on.#so that the 'personality type' metric could change back and forth throughout gameplay without needing to be restated#but no matter how i tried to code it itd return a double default error#so the less glamorous way to do it is just.#check each point metric against each other and whichever is highest determines the dialogue your character says.#girl who manages to do spaghetti code in a program known for not needing to do proper code#tbf its just slightly longer but the basic effect is still the same.#instead of 'if personality = 1 then x' 'if personality = 2 then y' 'if personality = 3 then z' etc#its just 'if serious > joy and serious > humor then x' 'if joy > serious and joy > humor then y'#its just wordier but it does the exact same thing in the end.
3 notes
·
View notes