Prevent specific vehicles from spawning?

Discussion about Mods for Prison Architect

Moderator: NBJeff

maroonmed
level0
Posts: 3
Joined: Thu Jun 30, 2016 12:18 am

Prevent specific vehicles from spawning?

Postby maroonmed » Sun Dec 04, 2016 9:47 am

Is it possible for mods to prevent specific vehicles from spawning, e.g. hearses upon deaths? I didn't see anything in the modding API that would support this.
murgh
level2
level2
Posts: 232
Joined: Sat Jan 30, 2016 11:52 am

Re: Prevent specific vehicles from spawning?

Postby murgh » Thu Dec 08, 2016 12:51 pm

Give it Properties Scripted in materials.txt and then make /scripts/Hearse.lua in your mods folder with this little script:

Code: Select all

function Create()
end

function Update()
    this.Delete()
end


Nothing more about it. Putting delete() in the update function makes them vanish after a game was loaded with a Hearse on the map as well as delete them almost immediately once freshly spawned.

Return to “Modding”

Who is online

Users browsing this forum: No registered users and 10 guests