View previous topic :: View next topic |
Author |
Message |
WRP_Beater
New Member


Joined: 26 May 2020 Posts: 2
7 Bank Notes
Items
|
|
Is there a way to write a script that can spawns in a given human actor or car? I know I can create an empty model with model_create (but that's only a frame), or I can duplicate an existing actor. I would however like to spawn a car or actor that's not already present on the map, just like you can with MafiaCon. |
|
Back to top |
|
 |
ASM.
Mafiascene Veteran Modder


Joined: 10 Jan 2014 Posts: 327
677 Bank Notes
Items
|
|
From what I know the game does not expose actor spawning via the script system, at least not directly. In the vanilla missions all required actors are typically already present in the mission file with some getting deactivated via init scripts in case they're only needed at a later point in mission. In some cases the designers didn't even bother with deactivation but simply put those actors in unreachable places and relocate them for 'activation'.
That being said you should be able to spawn actors indirectly via *.chg files. Depending on your use-case this could be a workable solution. Note however that the game only supports one active differences-file at a time; loading an additional *.chg file removes all actors from the previous one. You can patch this behavior via Mafia Patcher, though (option AllowMultipleDiffs). |
|
Back to top |
|
 |
WRP_Beater
New Member


Joined: 26 May 2020 Posts: 2
7 Bank Notes
Items
|
|
Alright, this seems to work fine with some limitations. Thanks! |
|
Back to top |
|
 |
|
|