UGX-Mods

Call of Duty: Black Ops 3 => Help Desk => Scripting => Topic started by: HanGoveR_115 on July 22, 2017, 03:12:08 pm

Title: buildable flashlight possible?
Post by: HanGoveR_115 on July 22, 2017, 03:12:08 pm
Hey guys,

I want to know if it is possible to attach a light to the players.
I want to put in my map a buildable flashlight or just a simple flashlight. who can be used like a weapons or the sheild.

Thanks for your help.
Title: Re: buildable flashlight possible?
Post by: Doodles_Inc on September 16, 2017, 08:53:53 pm
So, if want to do it, you need to search a lot on custom weapons, study the shield script (located on bo3, share, raw, scripts) and maybe on how lightning works on the COD engine, coz, IDK if dynamic lights is good for your map, maybe it wont get a good result and get really heavy.
Title: Re: buildable flashlight possible?
Post by: Archaicvirus on November 30, 2017, 01:49:34 am
Hey guys,

I want to know if it is possible to attach a light to the players.
I want to put in my map a buildable flashlight or just a simple flashlight. who can be used like a weapons or the sheild.

Thanks for your help.

You need to use an fx light, more info in your root/docsmodtools folder to set up the fx. I highly suggest creating your own fx in radiant. It's basically a bunch of settings you adjust, tutorials are out there. Once you have an fx light, you can link an empty to the player, then do PlayFXOnTag() on the empty. Check out my tutorial on buildables here https://ugx-mods.com/forum/index.php/topic,15031.0.html (https://ugx-mods.com/forum/index.php/topic,15031.0.html). You will also need a method for the player to toggle the flashlight. In the docsmodtools folder open the scriptapi html file, hit ctrl + f and search for buttonpressed(). That will give you hooks for keystrokes, so you can write a function to toggle the light. That plus adjusting the spawn position of the empty script_model and adjusting the angle of the light, color, etc.