Page 1 of 1

Prevent specific vehicles from spawning?

Posted: Sun Dec 04, 2016 9:47 am
by maroonmed
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.

Re: Prevent specific vehicles from spawning?

Posted: Thu Dec 08, 2016 12:51 pm
by murgh
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.