UGX-Mods

Call of Duty: Black Ops 3 => Help Desk => Scripting => Topic started by: reckfullies on October 03, 2016, 12:39:17 am

Title: Triggers not working
Post by: reckfullies on October 03, 2016, 12:39:17 am
I just finished making a buildable script and when I load into the game all my triggers that have the target names that I have in my script just show this:
(https://www.ugx-mods.com/forum/proxy.php?request=http%3A%2F%2Fimgur.com%2Fvj5nSag.jpg&hash=4504b8b21512cf952ec4f7df7301d13f301e9012)

Code for getting the ents:
Code Snippet
Plaintext
buildTable = GetEnt("build_table", "targetname");
buildTable SetHintString("Missing Parts!");
buildTable SetCursorHint("HINT_NOICON");

part1_trig = GetEnt("build_part1", "targetname");
part1_trig SetHintString("Press and hold &&1 to pickup ^3part1");
part1_trig SetCursorHint("HINT_NOICON");

part2_trig = GetEnt("build_part2", "targetname");
part2_trig SetHintString("Press and hold &&1 to pickup ^3part2");
part2_trig SetCursorHint("HINT_NOICON");

part3_trig = GetEnt("build_part3", "targetname");
part3_trig SetHintString("Press and hold &&1 to pickup ^3part3");
part3_trig SetCursorHint("HINT_NOICON");

I am unsure what is going on and it's really been annoying me.

Double Post Merge: October 03, 2016, 12:49:06 am
I just found out that it does work, but only once ive activated the trigger from one of my other scripts.

Why would this be the case? These two scripts aren't connected in any way, and neither are the triggers
Title: Re: Triggers not working
Post by: MakeCents on October 03, 2016, 08:51:15 pm
It must be where you are calling them from. You must not have used thread before the call. Then in one script it is waiting for the trigger, and then after it is triggered, completes that function call and moves onto the one you have here....?
Title: Re: Triggers not working
Post by: reckfullies on October 03, 2016, 08:53:50 pm
It must be where you are calling them from. You must not have used thread before the call. Then in one script it is waiting for the trigger, and then after it is triggered, completes that function call and moves onto the one you have here....?

Yep, turns out I was accidentally not threading one of them.