I have a gun entity in my project, and gave it an action named; gun_act
In WED I attached that action to the gun.
The action is working alright, because I put a rotation script in the action, and the gun starts to rotate.
Now I want the load a function when the player walks trough the gun.
What do I have to put in the my.emask, within the gun_act action?
This is the gun action:
Code:
action gun_act(){
while(1){
my.pan += 5*time_step;
wait(1);
}
my.emask |= ENABLE_IMPACT;
my.event = gun_func;
}
The funtion that needs to run is called gun_func, as seen in the script above.
But that function never runs...
That function is above the action in the script.
What did I do wrong?