fix karl dying :(

This commit is contained in:
bgkillas 2024-11-28 08:42:50 -05:00
parent d3023add3a
commit 03b639276b

View file

@ -0,0 +1,19 @@
dofile_once( "data/scripts/lib/utilities.lua" )
local entity_id = GetUpdatedEntityID()
local x, y = EntityGetTransform( entity_id )
local targets = EntityGetInRadiusWithTag( x, y, 20, "small_friend" )
if ( #targets > 0 ) then
for i,t in ipairs( targets ) do
if ( EntityHasTag( t, "polymorphed") == false ) and not EntityHasTag(t, "racing_cart") then
EntityKill( t )
EntitySetComponentsWithTagEnabled( entity_id, "driver", true )
EntitySetComponentsWithTagEnabled( entity_id, "driverless", false )
EntityAddTag( entity_id, "small_friend" )
return
end
end
end