- Jul 20, 2019
- 512
- 810
The renpy syntax of ur code (i believe) would be as follows:why not use a if else statement?
if (mom_corrupt > mom_love){
mom_status == corrupt
}
elif (mom_love>mom_corrupt){
mom_status == love
}
or smth like that, sorry if the syntax is wrong, having a jumble of languages in my head right now
if mom_corrupt > mom_love:
mom_status = "corrupt" #assuming ur storing strings in mom_status
else:
mom_status = "love" #else instead of elif so that the exception corrupt==love is included.
end if
your suggestion gets the job done, however i believe prinplup's
def mom_is_love(): return (momlove > momcorruption)
def mom_is_corrupt() : return (momcorruption > momlove)
is a better implementation. This is because you can simply call these functions at any time in the code, however with the if else method, you would have to write that if statement each time which chews up time. Using functions saves time.
However, the second function is essentially redundant, as the first function will return false if momcorruption >= momlove.
So, I suggest:
def mom_is_love(): return (momlove > momcorruption).
so if you want an if statement where the condition is such that mom's corruption is higher than or equal to mom's love, then you simply need to do
if (not mom_is_love()):
Last edited: