TriggerEffects()
Hi guys,
I searched through all script files but I didnt find where TriggerEffects() is defined and also not where the variables for it (like sounds or cinematics) are defined in code.
Can someone help me out?
As I'm posting this thread, maybe anyone has a idea why my own scripted building isnt displayed on the minimap ?
Greetings Vhelium
[EDIT] I overlooked the Actor class which called the TriggerEffects in the EffectManager. But I still didnt find the values and where the effectTable is initialized [/EDIT]
I searched through all script files but I didnt find where TriggerEffects() is defined and also not where the variables for it (like sounds or cinematics) are defined in code.
Can someone help me out?
As I'm posting this thread, maybe anyone has a idea why my own scripted building isnt displayed on the minimap ?
Greetings Vhelium
[EDIT] I overlooked the Actor class which called the TriggerEffects in the EffectManager. But I still didnt find the values and where the effectTable is initialized [/EDIT]
Comments
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->Script.Load("lua/GeneralEffects.lua")
Script.Load("lua/ClientEffects.lua")
Script.Load("lua/PlayerEffects.lua")
Script.Load("lua/DamageEffects.lua")
Script.Load("lua/MarineStructureEffects.lua")
Script.Load("lua/MarineWeaponEffects.lua")
Script.Load("lua/AlienStructureEffects.lua")
Script.Load("lua/AlienWeaponEffects.lua")<!--c2--></div><!--ec2-->
what exactly do you want to start in game?
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->testSound = PrecacheAsset("sound/NS2.fev/marine/common/pickup_gun")
origin = player:GetOrigin()
Shared.PlayWorldSound(nil, testSound, nil, origin)<!--c2--></div><!--ec2-->
But they never handle it that way, they always use things like:
<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>self:TriggerEffects("armory_health", {effecthostcoords = Coords.GetTranslation(ent:GetOrigin())})</div>
And I thought I will do it the same way.
But if that is infeasible, I'll keep it how you proposed.
self:TriggerEffects -> Looks in MarineStructureEffects.lua:318, theres definied:
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--> {sound = "sound/NS2.fev/marine/common/health"},
{cinematic = "cinematics/marine/spawn_item.cinematic"},<!--c2--></div><!--ec2-->
this calls EffectManager.lua:205
this calls then EffectManager.lua:312
and so on and after like 1000 entry of code it calls a Shared Command like
Shared.CreateEffect or Shared.PlaySound etc.
self:TriggerEffects -> Looks in MarineStructureEffects.lua:318, theres definied:
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--> {sound = "sound/NS2.fev/marine/common/health"},
{cinematic = "cinematics/marine/spawn_item.cinematic"},<!--c2--></div><!--ec2--><!--QuoteEnd--></div><!--QuoteEEnd-->
Just seen your fast reponse.
Now its clear, I overlooked the Effects files.
Thank you for your help!