Modme Forums
Menu:

spawning triggers

Game Modding | Call of Duty: Black Ops 3 | Scripting


ModmeBot:

Thread By: mathfag
SOLVED
Anyone know how to spawn a trigger_use via script or at least give a trigger_radius a hintstring?

for radius:

trig = Spawn("trigger_radius",self.origin+(0,0,40),flags, height, radius);
trig SetHintString("Press ^3[{+activate}]^7 to do something");


ModmeBot:

Reply By: soul-toktzt
Spawn a trigger_use? The way i do it is i hide the trigger_use with Hide(); and make it appear with Show(); after activating a different trigger.


ModmeBot:

Reply By: mathfag
Never mind. I did it with a trigger_radius and

function SetGunHint(text, trig)
{

    self.grow_soul_hud Destroy();
    self.grow_soul_hud = NewClientHudElem( self );
    self.grow_soul_hud.horzAlign = "center";
    self.grow_soul_hud.vertAlign = "middle";
    self.grow_soul_hud.alignX = "center";
    self.grow_soul_hud.alignY = "middle";
    self.grow_soul_hud.foreground = 1;
    self.grow_soul_hud.fontscale = 1;
    self.grow_soul_hud.alpha = 1;
    self.grow_soul_hud.color = ( 0.44, .74, .94 );
    self.grow_soul_hud SetText(text);
    while(isdefined(trig) && self IsTouching(trig))
    {
        wait(.05);
    }
    self.grow_soul_hud SetText("");
    self.grow_soul_hud Destroy();
    self.grow_soul_hud = undefined;
}