Modme Forums
Menu:

help muisc box

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


ModmeBot:

Thread By: xdferpc
I'm trying to make a music box that by pressing f plays a song

but put a " trigger_use" with "cursor hint = hint_active " in the game say no avadiable

I also put a " trigger_use" with "cursor hint = hint_noicon " and nothing comes out in the game


here the script


function music1()
{
 
 trigs = GetEnt( "mus1", "targetname" );
 
 
 foreach( trig in trigs )
 trig thread waittill_press();
 
}

function waittill_press()
{
 
 self SetHintString("Press f to play music ");
 self SetCursorHint("HINT_NOICON");
 self waittill("trigger",player);
 IPrintLnBold("eeeee");
 
 self PlaySound("song1");
 
 
}


ModmeBot:

Reply By: mathfag

trigs = GetEntArray( "mus1", "targetname" );


ModmeBot:

Reply By: TrueGamerCalls
"NO ICON" is a result of the game not being able to find the trigger.

You may be able to fix it by

1. Making sure the targetname is spelled correctly in both script and Radiant

2. Make sure your trigger use isn't inside any models, I suck at using Radiant and sometimes this fixes the issue.