Game Modding | Call of Duty: Black Ops 3 | Scripting
ModmeBot:
Thread By: modric
I am trying to have the shootable door triggers around my map only spawn once eetrig1 is triggered, want to know how to get that to work. Also I want to have the models associated with shootable door triggers to appear after eetrig1 is triggered and maybe have the models disappear after they are triggered by shootable door. I also want to make a new ee script that would be a step in my easter egg where 3 fx and triggers spawn after an eetrig is triggered, and to have a character VO when that step is available. Heres what I have so far:
function EEOrder()
{
eetrig1 = GetEnt( "eetrig1", "targetname" );
eetrig2 = GetEntArray( "shootable_door", "targetname" );
eetrig2 waittill("eetrig1");
}
ModmeBot:
Reply By: mathfag
Here you go up to the models disappearing after you shoot them.
In radiant make sure that the triggers have the KVP script_string - door_trigs
and that each model is a target of a trigger (door 1 will be the target of trigger 1...).
(I never tested this so don't be pissed please :))
function EEOrder()
{
trigs = GetEntArray("door_trigs","script_string");
eetrig1 = GetEnt("eetrig1","targetname");
foreach(trig in trigs)
{
model = GetEnt( trig.target, "targetname" );
model Hide();
trig TriggerEnable(0);
}
eetrig1 waittill("trigger", player);
foreach(trig in trigs)
{
model = GetEnt( trig.target, "targetname" );
model Show();
trig TriggerEnable(1);
trig thread EEOrder2();
}
}
function EEOrder2()
{
model = GetEnt( self.target, "targetname" );
self waittill("trigger", player); //self == trigger == trig
//IDK if you want something done here
//maybe: PlayFX("fx name",self.origin);
self Delete();
model Delete();
}