Closed PascalLadalle closed 4 years ago
Workaround:
I believe it will become true upon being visited. Not much surprise there :)
I think it's the "has been visited before" that is misleading. Should we change this?
=> "The branch title to check if it has been visited before - or is being visited now."
Yes I agree, the wiki should be updated to clarify it becomes true upon being visited
The idea when I made it was to trigger game events to activate after an NPC has given you a bit of info.
You can also do that using yarn state variables, but visited nodes is slightly simpler to use and doesnt require setting and getting stuff at all, so I added it for convenience
On Tue, Apr 28, 2020, 8:27 AM Florian Rival notifications@github.com wrote:
I think it's the "has been visited before" that is misleading. Should we change this?
=> "The branch title to check if it has been visited before - or is being visited now."
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/4ian/GDevelop/issues/1673#issuecomment-620431166, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABRRWVJ2E2TM2AWV3KQMNOLRO2AMHANCNFSM4MLQWKAA .
I have updated the documentation now to say
**Branch title has been visited before**
Check if a branch title has been visited by the player in the past. This becomes true upon that node's visitation. Use this to trigger events in your game, based on what the player has read without the need to set and get yarn state variables.
Parameters
branch title - The branch title to check for being visited before.
Hope that it's clearer now
I understand now. The before is the misleading part. Before means in the past, but this condition works in the present too (first visit VS second visit, as explained in my first post). I suggest:
Branch title has been visited
Check if a branch has been loaded. This condition becomes true as soon as a branch has been accessed. Use this condition to trigger events in your game based on what the player has read without the need to set and get yarn state variables.
Parameters
branch title - The branch title to check.
(I change the "visited by the player" because if you load a branch without displaying it, it will still count as visited, I suppose)
@4ian I can update this in my pr with dialogue tree fixes so it is true only if the currently parsed title is not the one we are checking for. That way it will truly be before and not be true while the player is seeing it.
Would that be a welcome change to the api?
Alternatively I can keep it as is and remove the "before" word from the extension's condition.
Either option would be fine, without hopefuly breaking stuff for people who already use the extension in their projects
Current visit avoids using a command/tag, previous visit avoids using the variable workaround I pasted above... It's easy to fix either way. 🤷
(FYI, I wanted to use the condition to skip the scrolling of a long dialogue (end section of GDSolver) after the first visit.)
I will update the wording of this condition in the extension to exclude "before" then
I have now added the following to my PR: https://github.com/4ian/GDevelop/pull/1671
I will update the wiki once the pr is in
The condition doesn't seem to be working, or I don't understand how it works. The wiki says;
I expect the condition to remain false until a second visit of a branch. But the condition is true during the first visit. As an example, the event below displays the current branch title on first visit: Same result with an empty field (which is underlined red and shouldn't be since the field is optional)