
I'm sorry but I don't really get those examples as I really don't get the hang of the syntax =x
What if I want something to happen when I go near a model? Something like:
Code: Select all
Model A:
if $x = 0;
do something, set $x = 1;
Model B:
if $x = 0;
say something.
if $x = 1;
do something, set $x = 2;
And, I assume (read the comments

Code: Select all
key1 = 0
level_trigger_1 = [
if (> $key1 0) [ // if $key1 is larger than 0?
trigger 1 1 //I don't get this part.
echo "You unlock the door with the key."
] [
trigger 1 0 //Not this too.
echo "The door is locked."
]
]
level_trigger_2 = [
key1 = (+ $key1 1) //Is this set $key1, $key1 + 1?
echo "You picked up a key."
]
Sorry, but I can't seem to make it work.
I loaded the existing village map and saved it as a new map, and added 2 new mapmodel with tag trigger_level_1 and trigger_level_2. Then I created a new .cfg file and pasted the script inside. I also changed both of them to trigger type 11 and 12 respectively. When I walked near one of them, it disappeared without any messages/texts and the other one just remains there.
Anything I done wrongly?
Again, thanks for all the help!