DSE - Cause event to NOT trigger SOLVED

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
Tachyglossus
Regular
Posts: 164
Joined: Wed Dec 01, 2010 7:43 pm
Projects: Sprite Art for: "Final Banquet", "365 Days"
Location: British Columbia
Contact:

DSE - Cause event to NOT trigger SOLVED

#1 Post by Tachyglossus »

Is there an easy way to stop an event from happening based on a variable?

Let's say I had this variable, say, girlmad = True

ANd then I wanted in the code where it defines whether an event runs or not to have an exception.

Say it was something like, uh...

Code: Select all

$ event("girl_heart1", "act == 'hangout' and love >= 10", event.once(), priority=190)
$ event("girl_heart2", "act == 'stayhome' and love >= 20", event.once(), event.depends("girl_heart1"))
$ event("girl_heart3", "act == 'juggle_penguins' and love >= 35", event.once(), event.depends("girl_heart2"))
If I wanted to add an event definition that would pretty much tell the dispatcher to not run the events depending on a variable (girlmad) being true even if all the requirements were met.

Is this possible without doing some back-door coding or weird, long, annoying if statements for every possibility?

Or would I have to make a higher priority event that is identical to all of the above PLUS "and girlmad == True" and then reroute it to call one of the regular events for that action/period?

I hope I am making sense.
Last edited by Tachyglossus on Thu Jun 23, 2011 9:46 pm, edited 1 time in total.

User avatar
Showsni
Miko-Class Veteran
Posts: 563
Joined: Tue Jul 24, 2007 12:58 pm
Contact:

Re: DSE - Cause event to NOT trigger

#2 Post by Showsni »

Can't you just add

Code: Select all

and not girlmad
to the requirements?

Tachyglossus
Regular
Posts: 164
Joined: Wed Dec 01, 2010 7:43 pm
Projects: Sprite Art for: "Final Banquet", "365 Days"
Location: British Columbia
Contact:

Re: DSE - Cause event to NOT trigger

#3 Post by Tachyglossus »

...You can use 'not'?

I did Look through indeces and the tutorials, but I suppose I didn't look deep enough.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot], scruffles