1. Make new script, name it and save in game directory(f.e. test)
2. in tour new and empty script write:
Code:
action my_new_behaviour
{
while(1)
{
my.pan += 5 * time_step;
wait(1);
}
}
Your behaviour must be acttion not function!
Then in your main.wdl, over the main function write:
Code:
include <test.wdl>:
Save all.
Now open wed (you have to reopen wed to see new scripts)
Place somewhere a model, then right click on the model -> properties -> open behaviour and You should see your new action "my_new_behaviour". Chose it and close properties.
Click ok, build and run.