target | Kontaktpunkt |
normal | Normalen-Vektor der getroffenen Oberfläche |
bounce | Vekktor in Abprallrichtung |
function bounce_event() { if (event_type == EVENT_FRICTION) { ent_playsound(my,whamm,50); } } action bounceball() { my.ENABLE_FRICTION = ON; // C-Script: make entity sensitive for physics collisions my.emask |= ENABLE_FRICTION; // lite-C my.event = bounce_event; ... // initiate physics behavior }