In my current game i have NPC’s who can say several different things in each scene. I first attempt to implement it like this:
[code]
Instead of talking to Bob for the first time during Scene 1, say “‘Hello,’ says Bob”
Instead of talking to Bob for the second time during Scene 1, say “‘Hello again,’ says Bob”
Instead of talking to Bob for the first time during Scene 2, say “‘I loved you in Scene 1,’ says Bob”[/code]
Unfortunately, this doesn’t work because the repetition counter doesn’t seem to take scenes into consideration. If i talk to Bob during scene 1, then the last rule will never fire in Scene 2, since i have already talked to Bob once. The scene condition differs from every other condition in this regard. If, for example, i write:
Instead of talking to Bob while wearing the hat for the first time, say "'Nice hat', says Bob"
Then i can talk to Bob as many times as i want to without the hat, and the rule will still fire the first time i talk to him with it. Is there any way to somehow reset the counter during scenes?
Another thing:
I get tired of writing “…during scene X” after almost every single rule, so i have tried to somehow group rules for a scene into a rulebook like this:
[code]
Instead of talking to Bob during Scene 1:
Follow the scene 1 conversation rules.
The Scene 1 conversation rules is a rulebook.
A scene 1 conversation rule:
If the current action is talking to Bob for the first time:
say “‘Hello,’ says Bob”.[/code]
This also doesn’t work, since “for the first time” doesn’t seem to be a part of the current action. Without it, it works fine, but i need Bob to be able to say several different things in each scene. The stuff he says in Scene 2 should be completely independent of what he said in Scene 1. I could implement my own counter, but i also need to be able to take conditions like “…when wearing the hat” into consideration, which seems really hard to do manually - i would need seperate counters for each set of conditions.
This seems like it should be a pretty basic thing to do. Am i missing something?