Показать сообщение отдельно
Старый 18.02.2024, 10:53   #197
Haku вне форума Haku
Аватар для Haku
Senior Member
Сообщений: 156
Репутация: 225
Haku has a spectacular aura about Haku has a spectacular aura about Haku has a spectacular aura about
Judge
Информация о репутации (Haku)
×
За активное участие в жизни форума и помощь пользователям вы можете получить очки репутации. За определённое количество очков репутации вам будет присвоенно соответствующее звание. Полученное звание всегда будет отображаться в нижней части области Вашего профиля, слева от сообщения.
Detective
0
Gangster
55
Thug
100
Haku / 225
Judge
159
Enforcer
260
Priest
396
Snitch
780
Hitman
800
Councilor
1200
Deputy
2501
Overseer
4896
Press
6020
Don
20000

Развернуть для просмотра

Цитата:

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
Вложения
Тип файла: zip Elevator.zip (24.5 Кб, 58 просмотров)
цитата