how can i make a moving model that reacts to being shot?
i want to make a bullsye that acts as moving target and a script runs when it gets hit or destroyed by weapons
like in the map uje when u hit the moving duck it dies?
how can i make a moving model that reacts to being shot?
i want to make a bullsye that acts as moving target and a script runs when it gets hit or destroyed by weapons
like in the map uje when u hit the moving duck it dies?
bullseye
{
pain
{
// ouch! i'm hit..
}
}
When the bullseye gets hit, the code in the pain event-handler will be executed… time for You to destroy the bullseye
If the script_mover runs out of health, the code of the death event-handler will be executed…(just something You would like to know)
With use of an accum it is easy to keep a record of howmany times the moving target has been hit:
bullseye
{
spawn
{
wait 50
accum 0 set 0
}
pain
{
// increase total hits
accum 0 inc 1
}
}
It is more difficult to process this script_mover-local accum into something usefull, like a score to display…