Hmm, thinking about this a bit from the point of view of establishing a system using existing features: one thing that would work for sequencing errors like this is to subvert the intended usage of the <$linkID> placeholder, which generates a background <$n> type counter for each binder item. Hence if both the linkID for the Cause and Effect items are printed somewhere, we can see at a glance if there is a sequencing problem if Cause is greater than Effect:
Note the first placeholder is linked to the other scene, pullings its linkID into this scene.
To take the concept one step further, one could gather these little contingencies into a folder in the binder as stand-alone notes on narrative flow. Where relevant (perhaps in both the Gun is place and Gun is used scenes) one could then use the <$include> placeholder to print the warning in both places. In that case you would want to hyperlink both linkIDs to create static references to these scenes.
The advantage there is less I would say in terms of keeping the output uniform between dependent scenes, and more about having a central repository of such dependencies on hand. And keep in mind that if you write the note from the dependency “card”, and link to both scenes from it, then each scene will get a backlink Bookmark to the depencing. Not only will the include placeholder let you know something is up, but you can view what’s up right in the inspector.
Of course this isn’t logic. The message will display even if “Gun is placed: 3 → Gun is used: 5”, but if these notes are easy to spot and turn on as needed for proofing, then it could help a lot in keeping things lined up neatly after a big shuffle.
Actual logic would probably mean Scrivener needing to dip into Tinderbox-ey waters, with if/then/else placeholder constructs and so forth. Maybe some day, but I wouldn’t cross my fingers over that one.
Now on the other hand, a technologically inclined individual might devise a simple logical markup system (or better yet, reuse a language that already exists) and attach a post-processing script to the compile settings to in effect achieve this, allowing for red flags to pop up only when needed, etc. I could for example have a “Warning” Style that I can type little instructions into like so:
red_flag("There is no gun!") if (<$linkID> > <$linkID>)
Then have the style prefix/suffix insert markers that the post-processing script looks for and executes the contents of as code, with naturally some definition of the red_flag method somewhere else in the script, to handle the presentation of the warning itself.