Skip to content

Commit 03b6392

Browse files
committed
fix karl dying :(
1 parent d3023ad commit 03b6392

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
dofile_once( "data/scripts/lib/utilities.lua" )
2+
3+
local entity_id = GetUpdatedEntityID()
4+
local x, y = EntityGetTransform( entity_id )
5+
6+
local targets = EntityGetInRadiusWithTag( x, y, 20, "small_friend" )
7+
if ( #targets > 0 ) then
8+
for i,t in ipairs( targets ) do
9+
if ( EntityHasTag( t, "polymorphed") == false ) and not EntityHasTag(t, "racing_cart") then
10+
EntityKill( t )
11+
12+
EntitySetComponentsWithTagEnabled( entity_id, "driver", true )
13+
EntitySetComponentsWithTagEnabled( entity_id, "driverless", false )
14+
15+
EntityAddTag( entity_id, "small_friend" )
16+
return
17+
end
18+
end
19+
end

0 commit comments

Comments
 (0)