local blood_fade_time = 0 --time until blood will disappear (set to 0 for it to stay always) local spread_delay = 50 --how quickly the blood pool grows local growth_amount = 5 --how much the blood pool grows each tick local starting_size = 50 --how big the blood pool starts (%) local stop_scaling_after = 35 --limit the blood spread ticks (0 will make it always grow) local size = {} local scale_time = {} local newStopScalingAfter = {} blood = {} function blood_for_enemies_init(e) blood[e] = 1 Hide(e) CollisionOff(e) end function blood_for_enemies_main(e) CollisionOff(e) if blood[e] == 1 then Hide(e) StartTimer(e) timer[e] = GetTimer(e) + blood_fade_time scale_time[e] = GetTimer(e) size[e] = starting_size Scale(e,size[e]) newStopScalingAfter[e] = stop_scaling_after else Show(e) if stop_scaling_after == 0 or newStopScalingAfter[e] > 0 then if GetTimer(e) > scale_time[e] then scale_time[e] = GetTimer(e)+spread_delay newStopScalingAfter[e] = newStopScalingAfter[e] - 1 size[e] = size[e]+growth_amount Scale(e,size[e]) end end if blood_fade_time > 0 and GetTimer(e) > timer[e] then Hide(e) blood[e] = 1 end end end