UGX-Mods

Call of Duty: Black Ops 3 => Help Desk => Scripting => Topic started by: OptomusPrime22 on December 01, 2016, 12:47:08 am

Title: Adding Objects with script
Post by: OptomusPrime22 on December 01, 2016, 12:47:08 am
So I'm doing an easter egg and when I shoot the first object I want it to then add the second object into the map, how would I go about scripting this?
Title: Re: Adding Objects with script
Post by: MakeCents on December 03, 2016, 08:43:50 pm
So I'm doing an easter egg and when I shoot the first object I want it to then add the second object into the map, how would I go about scripting this?

You could either spawn things in, or simply put every thing in the map, then hide all but the one, then unhide I've at a time, after one is shot. This is easier if it's randomized. Then choosing next is simply l indexing the next item in the array.
Title: Re: Adding Objects with script
Post by: OptomusPrime22 on December 03, 2016, 11:24:55 pm
You could either spawn things in, or simply put every thing in the map, then hide all but the one, then unhide I've at a time, after one is shot. This is easier if it's randomized. Then choosing next is simply l indexing the next item in the array.

What would the script look like... Kind of a noob but not at the same time lol
Title: Re: Adding Objects with script
Post by: MakeCents on December 04, 2016, 04:49:05 am
What would the script look like... Kind of a noob but not at the same time lol

Well its not super easy to script. If I were doing it I would setup a prefab in radiant with a damage trigger and a model as the target of the trigger. Copy that around a few times, as many as you like, then I would add structs where you wanted the shootables, with a targetname. If you wanted them in a certain order, I would add a kvp for script_noteworthy.

From there you would get the triggers, get the model for the triggers, and get the structs. Link the triggers to the models, hide all the models. Then unhide one of the models, wait for it to be triggered, and unhide another.