if storyArc1 == 0 and day >= 7 and variablex>=10 and time == 0 and "label park"
what do i need to add that it triggers only if i go to the park at day >=7....?
Not sure to understand your question, so pick the right answer
If what you want is "player go to the park, this event must be triggered if this and that", then it's in the park label that you must do it :
Code:
label park:
if storyArc1 == 0 and day >= 7 and variablex >= 10:
jump park_event1
elif storyArc2 == 5 and day >= 20:
call park_event2
return
[put here the default code for the park]
I used two triggers to show you how it can be done ; more specifically the fact that you
must return (or
jump somewhere else) after the
call. Some people use this structure :
Code:
label park:
if condition:
jump somewhere
elif condition:
call somewhere
else:
default content
But I prefer the one I used because it limit the indentation of the main code. In the same time it mark clearly that it's what happen by default ; default being the most common occurrence. The rest (what in the if/elif/else structure) being the exception.
Putting the trigger here isn't the only solution, but it's the better one. It naturally split the events in two categories :
- global events
Those that happen because of a generic situation. By example "two day after you said that you love her, she phone you".
- local events
Those that happen because the player entered a given location "at the right time". By example, when the player enter into the park at 10AM, he can see the pretty girl next door walking her dog... and when he finally have enough courage, he try to talk to her.
This separation between the two is clearly seen by the fact that the triggers aren't at all at the same place. In the same time, if you want to change a trigger for an event related to the park, or add a new event to the park, you know that you need to look at the start of the "park" label.
If what you want is "this event must be triggered if this and that, and it the player goes to the park at day 7", then it's in the main event label that you work, but you also need to make a little change in the "park" label :
Code:
default parkDay7 = False
label mainEventTest:
if storyArc1 == 0 and day >= 7 and variablex >= 10 and parkDay7 is True:
jump park_event1
[...]
label park:
if day == 7:
$ parkDay7 = True
[...]
Here, you use a flag to keep track of the fact that the player was in the park at day 7. Then you use this flag to check if the condition are reach or not.
I used an equality as condition, but it works with any condition, even multiple ones.