Game Modding | Call of Duty: Black Ops 3 | Scripting
ModmeBot:
Thread By: Ahmed02354
Can I make 2 power switches each for another area?
ModmeBot:
Reply By: lightningplayz23
Ahmed02354
Can I make 2 power switches each for another area?
ModmeBot:
Reply By: CaptainHT
Have two or more power switch prefabs, one switch in one zone, and another switch in another zone. Stamp both of the power switch prefabs. (Click prefab at the top and click "stamp.") Then add a Kvp, The property/ key needs to be "Script_int," while the value needs to be "power_zone." After you are done with this, have anything that requires power in your desired zone. After you have put your Perk or Pack a Punch machine in the desired zone, stamp the perk or pap. Then go to your perk machine or pack a punch and add a kvp. The same as before the property/key needs to be "Script_int," while the value needs to be "power_zone." Save then compile and run your map. Then you should have multiple power switches in your map.
P.S. I haven't tested, but you should have to put a variable after the "power_zone" for example: "power_zone_a" It should work. But you can experiment with this.
ModmeBot:
Reply By: SwanK
Please post results, I'm trying to do the same thing and have no idea how to do this.
ModmeBot:
Reply By: mathfag
Get 2 power switch prefabs and stamp them. Remove the structs (or you'll get client field mismatch). Change the targetnames of the triggers to elec_switch1 and elec_switch2. Change the handle models into a script_models and change their targetnames to elec_switch_handle1 and elec_switch_handle2. Copy paste this code in to your mapname.gsc
in function main(), under zm_usermap::main();
At the bottom:
ModmeBot:
Reply By: itznvy
Script works. Only issue, however it is small is that whenever you flip the switches for power they don't move up like they did before. My guess is because you said to remove the script_struct. +1 win.
ModmeBot:
Reply By: mathfag
itznvy
Script works. Only issue, however it is small is that whenever you flip the switches for power they don't move up like they did before. My guess is because you said to remove the script_struct. +1 win.
ModmeBot:
Reply By: itznvy
mathfag
itznvy Script works. Only issue, however it is small is that whenever you flip the switches for power they don't move up like they did before. My guess is because you said to remove the script_struct. +1 win. they do flip. maybe you forgot to change them to script_models
ModmeBot:
Reply By: mathfag
itznvy
mathfag itznvy Script works. Only issue, however it is small is that whenever you flip the switches for power they don't move up like they did before. My guess is because you said to remove the script_struct. +1 win. they do flip. maybe you forgot to change them to script_models I made them script models i'll double check