Game Modding | Call of Duty: Black Ops 3 | Scripting
Nikon:
In my custom map I want to create a buyable max ammo on the wall. An example would be Pistol Defense from WaW, in 2 boxes of the map there were two buyable max ammos and I can't seem to find a script that allows me to put in a buyable max ammo or really any powerup that works. Hence why I'm asking here.
KillJoy:
Nikon:
Hey, I added everything correctly and my map just won't load. Here's exactly what I did in these images. What am I doing wrong?
KillJoy:
its not the powerup script, your problem persists elsewhere
Nikon:
its not the powerup script, your problem persists elsewhere
Nikon:
its not the powerup script, your problem persists elsewhere
Sleepy216:
in your main function replace:
thread buyable_powerup_1();
with:
then remove:
trig = getent( "trig_1", "targetname" );
from your function buyable_powerup_1
then replace every other instance of "trig" in the same function with "self".
example of what you should change:
that should let you have as many buyable locations as you like.
edit whoops I forgot to mention the struct, you want to change that to:
struct = struct::get(self.target, "targetname");
then in radiant remove the targetname you have set to the struct, deselect it afterward.
then select the trigger for the ammo, then select the struct again. press w.
Now you can copy those two for each location. each trigger needs to target just one struct.
sorry about that, I just assumed the script gave the player ammo, not spawned the actual max ammo powerup.
I can be smooth brained sometimes.
Nikon:
in your main function replace:
thread buyable_powerup_1();
with:
then remove:
trig = getent( "trig_1", "targetname" );
from your function buyable_powerup_1
then replace every other instance of "trig" in the same function with "self".
example of what you should change:
that should let you have as many buyable locations as you like.
edit whoops I forgot to mention the struct, you want to change that to:
struct = struct::get(self.target, "targetname");
then in radiant remove the targetname you have set to the struct, deselect it afterward.
then select the trigger for the ammo, then select the struct again. press w.
Now you can copy those two for each location. each trigger needs to target just one struct.
sorry about that, I just assumed the script gave the player ammo, not spawned the actual max ammo powerup.
I can be smooth brained sometimes.
Sleepy216:
that's because you have to change every instance of the word "trig" to "self" in the function buyable_powerup_1()
you only changed the example one i gave, all the other lines still say trig.
Nikon:
that's because you have to change every instance of the word "trig" to "self" in the function buyable_powerup_1()
you only changed the example one i gave, all the other lines still say trig.
Sleepy216:
Ahhh I'm sorry. I wasn't reading that properly. I can't believe I just overlooked that. It works now! Thanks for the help man!