Modme Forums

help muisc box

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


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);
 self PlaySound("song1");


Reply By: mathfag

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


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.