Skip to content

Commit

Permalink
fix karl dying :(
Browse files Browse the repository at this point in the history
  • Loading branch information
bgkillas committed Nov 28, 2024
1 parent d3023ad commit 03b6392
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions quant.ew/data/scripts/buildings/racing_cart_check.lua
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 03b6392

Please sign in to comment.