Entity:GetSpawnEffect
Açıklama
Bu varlıkta doğma (spawn) anında bir doğma efekti gösterip göstermememiz gerektiğini döndürür.
Döndürülen Değerler
Örnek
Sandbox modunun cl_init.lua dosyasından alınmıştır.
function GM:NetworkEntityCreated( ent )
--
-- If the entity wants to use a spawn effect
-- then create a propspawn effect if the entity was
-- created within the last second (this function gets called
-- on every entity when joining a server)
--
if ( ent:GetSpawnEffect() && ent:GetCreationTime() > ( CurTime() - 1.0 ) ) then
local ed = EffectData()
ed:SetEntity( ent )
util.Effect( "propspawn", ed, true, true )
end
end
Çıktı: Varlığın spawnEffect bayrağının true olarak ayarlanıp ayarlanmadığını ve son saniye içinde oluşturulup oluşturulmadığını kontrol eder, ardından propspawn efektini gösterir.
Tüm sunucular · GmodTR Launcher · Rehber · GMod Wiki · GmodTR nedir? · Sunucu ekle · Discord