Game Modding | Call of Duty: Black Ops 3 | Scripting
ModmeBot:
Thread By: simplyzak09 Hi, I'm trying to add a feature to a map I'm working on that if the player keeps and upgrades their starting weapon and shoots 3 perk bottles around the map then a door will open allowing them to access jug. I have looked up example and such from other scripts and stuff to see how it is done and written up this, however in game it doesn't work nothing happens when the trigger is shot. Link to code I was using to build off of:https://pastebin.com/iru9hwX8
ModmeBot:
Reply By: xdferpc to be shootable use trigger_damage to be the jug a button uses trigger_use
ModmeBot:
Reply By: simplyzak09
xdferpc to be shootable use trigger_damage to be the jug a button uses trigger_use function openedoor() { level.shootable_door_count1 = 0; shoot = GetEntArray("shootable_trig", "targetname"); foreach(shooters in shoot) { pulsadores thread opendoor1(); } } function opendoor1() { self waittill("trigger",player); perk = getEnt(self.target,"targetname"); self delete(); perk Delete(); self.target Delete(); door1 = getEnt("door1","targetname"); level.shootable_door_count1++; if(level.shootable_door_count1 == 3) // if you press all the triggers = 3 (You can change it) { door1 delete(); //door open jug1 = getEnt("jug1","targetname"); self waittill("trigger",player); //pulse the jug wait (1); jug1 delete(); a_players = getPlayers(); for ( i = 0; i < a_players.size; i++ ) { a_players[ i ] zm_weapons::weapon_give( getWeapon( "mc96_upgraded" ), undefined, undefined, undefined, 1 ); //give weapon } } }
This doesn't work, the script keep throwing out an error about this line
the error:
ModmeBot:
Reply By: xdferpc sorry men , I have got confused put in that line:
ModmeBot:
Reply By: Symbo You guys should stop using trigger when you need to shoot an object. With
the entity itself can detect damage. It works better and it is more accurate.