Развернуть для просмотра
Цитата:
Simple map with basic working elevator (no sounds included).
Collisions problem:
Mafia has no support for custom moving collisions. Although, there are some possibilites eg. to use "Truck" definition from "mise09-krajina". In this case player is directly linked to the parent object - car (similar to tram / metro) and there isn't "sliding effect". But manipulating is slightly bad.
Also there are f*ckingbox script commands for creating dynamic collisions. But only for creating and not moving!
Fortunately in mission: "mise18-pristav" - second LH port mission is used car with "dynamic" collisions. These colls are used for truck body to player be able enter the truck. Car with this colls can be moved with mo worries.
Therefore, this technique is used for our elevator.
Collisions:
Every 4ds model of car in the game can have "SPECCOLLSxx" dummies for its "special collisions". These colls must be enables by:
car_setspeccoll xx, 1
...(xx is actor's id)
and disabled by:
car_setspeccoll xx, 0
If special colls are enabled car physics and speed are diabled (and vice versa). After enabling you can move with "car" (elevator) via actor_setplacement and spec colls are automatically updated. White moving, spec colls disabling is not needed (also due to physics activation).
Spec colls can be disabled eg. when elevator is critically damaged. Then physics is activated and elevator falls to the floor.
Also (important), before elevator moves, player must stand on the elevator's SPECCOLL and not on the another collision from tree.klz. Only in this case initial player position is automatically updated
|
[свернуть]
Небольшой пример работы лифта из этой темы (сайт более недоступен) http://mafiascene.com/forum/viewtopi...82e439e264b7cf
|