Modme Forums

need help giving a empty perk bottle from script

Game Modding | Call of Duty: Black Ops 3 | Scripting


ModmeBot:

Thread By: tbone-5
i cant figure out how to give natesmiths empty perk bottle to the player from a shootable objects script & have it be to all players. right now i have this set can't figure out how to make it give the drop & it would need give it to all players.

player zm_perks::give_random_perk();


ModmeBot:

Reply By: natesmithzombies
Sorry for the delayed response. I found out my hotel had a lazy river so what grown man wouldnt want to go in circles for a few hours? lol well here you go:



1) Add this too the bottom of your mapname.gsc (assuming you have already added the my powerup to your mapname.gsc)

Alternative Code Link

function main_shootable_perk_slot() { trigs = GetEntArray( "shootale_perk_slot", "targetname" ); level.shot_perk_slots = 0; level.shot_perk_slots_goal = trigs.size; foreach( trig in trigs ) trig thread waittill_shot(); } function waittill_shot() { self waittill( "trigger", player ); level.shot_perk_slots++; player PlayLocalSound( "meteor_affirm" ); // change to any sound you want to play to the player if( level.shot_perk_slots == level.shot_perk_slots_goal ) reward_all_players(); } function reward_all_players() { players = GetPlayers(); foreach( player in players ) nsz_powerup_empty_bottle::grab_bottle( player ); }



Then in your mapname.gsc add this line in your function main:

main_shootable_perk_slot(); 



That should work, but I cant test it as I am away on vacation and on a laptop that cant run Bo3


ModmeBot:

Reply By: tbone-5

natesmithzombiesSorry for the delayed response. I found out my hotel had a lazy river so what grown man wouldnt want to go in circles for a few hours? lol well here you go:



1) Add this too the bottom of your mapname.gsc (assuming you have already added the my powerup to your mapname.gsc)

Alternative Code Link

function main_shootable_perk_slot() { trigs = GetEntArray( "shootale_perk_slot", "targetname" ); level.shot_perk_slots = 0; level.shot_perk_slots_goal = trigs.size; foreach( trig in trigs ) trig thread waittill_shot(); } function waittill_shot() { self waittill( "trigger", player ); level.shot_perk_slots++; player PlayLocalSound( "meteor_affirm" ); // change to any sound you want to play to the player if( level.shot_perk_slots == level.shot_perk_slots_goal ) reward_all_players(); } function reward_all_players() { players = GetPlayers(); foreach( player in players ) nsz_powerup_empty_bottle::grab_bottle( player ); }



Then in your mapname.gsc add this line in your function main:

main_shootable_perk_slot(); 



That should work, but I cant test it as I am away on vacation and on a laptop that cant run Bo3


thanks a lot ill test this now & tell you if it works, i have a very small question my friend wants to know for his ported weapon, is it easy to make the gib effect in bo3 for the FX that make the zombies explode play 100% of the time with scripts? or would you have to script the FX to gib 100% of the time for the gun explosion? nothing in ape fixes it even gib options, zombies only explode when close otherwise they just fall over


ModmeBot:

Reply By: natesmithzombies

tbone-5
natesmithzombiesSorry for the delayed response. I found out my hotel had a lazy river so what grown man wouldnt want to go in circles for a few hours? lol well here you go:



1) Add this too the bottom of your mapname.gsc (assuming you have already added the my powerup to your mapname.gsc)

Alternative Code Link

function main_shootable_perk_slot() { trigs = GetEntArray( "shootale_perk_slot", "targetname" ); level.shot_perk_slots = 0; level.shot_perk_slots_goal = trigs.size; foreach( trig in trigs ) trig thread waittill_shot(); } function waittill_shot() { self waittill( "trigger", player ); level.shot_perk_slots++; player PlayLocalSound( "meteor_affirm" ); // change to any sound you want to play to the player if( level.shot_perk_slots == level.shot_perk_slots_goal ) reward_all_players(); } function reward_all_players() { players = GetPlayers(); foreach( player in players ) nsz_powerup_empty_bottle::grab_bottle( player ); }



Then in your mapname.gsc add this line in your function main:

main_shootable_perk_slot(); 



That should work, but I cant test it as I am away on vacation and on a laptop that cant run Bo3


thanks a lot ill test this now & tell you if it works, i have a very small question my friend wants to know for his ported weapon, is it easy to make the gib effect in bo3 for the FX that make the zombies explode play 100% of the time with scripts? or would you have to script the FX to gib 100% of the time for the gun explosion? nothing in ape fixes it even gib options, zombies only explode when close otherwise they just fall over


Is that a projectile weapon in the settings?


ModmeBot:

Reply By: tbone-5

natesmithzombies
tbone-5
natesmithzombiesSorry for the delayed response. I found out my hotel had a lazy river so what grown man wouldnt want to go in circles for a few hours? lol well here you go:



1) Add this too the bottom of your mapname.gsc (assuming you have already added the my powerup to your mapname.gsc)

Alternative Code Link

function main_shootable_perk_slot() { trigs = GetEntArray( "shootale_perk_slot", "targetname" ); level.shot_perk_slots = 0; level.shot_perk_slots_goal = trigs.size; foreach( trig in trigs ) trig thread waittill_shot(); } function waittill_shot() { self waittill( "trigger", player ); level.shot_perk_slots++; player PlayLocalSound( "meteor_affirm" ); // change to any sound you want to play to the player if( level.shot_perk_slots == level.shot_perk_slots_goal ) reward_all_players(); } function reward_all_players() { players = GetPlayers(); foreach( player in players ) nsz_powerup_empty_bottle::grab_bottle( player ); }



Then in your mapname.gsc add this line in your function main:

main_shootable_perk_slot(); 



That should work, but I cant test it as I am away on vacation and on a laptop that cant run Bo3


thanks a lot ill test this now & tell you if it works, i have a very small question my friend wants to know for his ported weapon, is it easy to make the gib effect in bo3 for the FX that make the zombies explode play 100% of the time with scripts? or would you have to script the FX to gib 100% of the time for the gun explosion? nothing in ape fixes it even gib options, zombies only explode when close otherwise they just fall over


Is that a projectile weapon in the settings?


Yes the weapon is a projectile weapon. its the scavanger he set it up so that when the projectile impacts it spawns a grenade weapon that detonates after 3 seconds so that grenade weapon is the actual damage source, he wants it so zombies always explode like it did on COTD, no errors on that script for the shootable perk slot but i can't figure the trigger for it in radiant.


ModmeBot:

Reply By: natesmithzombies

tbone-5
natesmithzombies
tbone-5
natesmithzombiesSorry for the delayed response. I found out my hotel had a lazy river so what grown man wouldnt want to go in circles for a few hours? lol well here you go:



1) Add this too the bottom of your mapname.gsc (assuming you have already added the my powerup to your mapname.gsc)

Alternative Code Link

function main_shootable_perk_slot() { trigs = GetEntArray( "shootale_perk_slot", "targetname" ); level.shot_perk_slots = 0; level.shot_perk_slots_goal = trigs.size; foreach( trig in trigs ) trig thread waittill_shot(); } function waittill_shot() { self waittill( "trigger", player ); level.shot_perk_slots++; player PlayLocalSound( "meteor_affirm" ); // change to any sound you want to play to the player if( level.shot_perk_slots == level.shot_perk_slots_goal ) reward_all_players(); } function reward_all_players() { players = GetPlayers(); foreach( player in players ) nsz_powerup_empty_bottle::grab_bottle( player ); }



Then in your mapname.gsc add this line in your function main:

main_shootable_perk_slot(); 



That should work, but I cant test it as I am away on vacation and on a laptop that cant run Bo3


thanks a lot ill test this now & tell you if it works, i have a very small question my friend wants to know for his ported weapon, is it easy to make the gib effect in bo3 for the FX that make the zombies explode play 100% of the time with scripts? or would you have to script the FX to gib 100% of the time for the gun explosion? nothing in ape fixes it even gib options, zombies only explode when close otherwise they just fall over


Is that a projectile weapon in the settings?


Yes the weapon is a projectile weapon. its the scavanger he set it up so that when the projectile impacts it spawns a grenade weapon that detonates after 3 seconds so that grenade weapon is the actual damage source, he wants it so zombies always explode like it did on COTD, no errors on that script for the shootable perk slot but i can't figure the trigger for it in radiant.


For the trigger just insert a trigger>damage with the targetname - shootale_perk_slot. Lets get that sorted and then we can give scavenger a shot


ModmeBot:

Reply By: tbone-5

natesmithzombies
tbone-5
natesmithzombies
tbone-5
natesmithzombiesSorry for the delayed response. I found out my hotel had a lazy river so what grown man wouldnt want to go in circles for a few hours? lol well here you go:



1) Add this too the bottom of your mapname.gsc (assuming you have already added the my powerup to your mapname.gsc)

Alternative Code Link

function main_shootable_perk_slot() { trigs = GetEntArray( "shootale_perk_slot", "targetname" ); level.shot_perk_slots = 0; level.shot_perk_slots_goal = trigs.size; foreach( trig in trigs ) trig thread waittill_shot(); } function waittill_shot() { self waittill( "trigger", player ); level.shot_perk_slots++; player PlayLocalSound( "meteor_affirm" ); // change to any sound you want to play to the player if( level.shot_perk_slots == level.shot_perk_slots_goal ) reward_all_players(); } function reward_all_players() { players = GetPlayers(); foreach( player in players ) nsz_powerup_empty_bottle::grab_bottle( player ); }



Then in your mapname.gsc add this line in your function main:

main_shootable_perk_slot(); 



That should work, but I cant test it as I am away on vacation and on a laptop that cant run Bo3


thanks a lot ill test this now & tell you if it works, i have a very small question my friend wants to know for his ported weapon, is it easy to make the gib effect in bo3 for the FX that make the zombies explode play 100% of the time with scripts? or would you have to script the FX to gib 100% of the time for the gun explosion? nothing in ape fixes it even gib options, zombies only explode when close otherwise they just fall over


Is that a projectile weapon in the settings?


Yes the weapon is a projectile weapon. its the scavanger he set it up so that when the projectile impacts it spawns a grenade weapon that detonates after 3 seconds so that grenade weapon is the actual damage source, he wants it so zombies always explode like it did on COTD, no errors on that script for the shootable perk slot but i can't figure the trigger for it in radiant.


For the trigger just insert a trigger>damage with the targetname - shootale_perk_slot. Lets get that sorted and then we can give scavenger a shot


okay i added the trigger with the target name & nothing happeneds when i shoot it


ModmeBot:

Reply By: natesmithzombies

tbone-5okay i added the trigger with the target name & nothing happeneds when i shoot it


Try adding this at the bottom of main_shootable_perk_slot:

wait(20); 
iprintlnbold( "There are "+trigs.size+" triggers in the map" ); 



If you dont get that statement within 20 seconds of spawning, then the function either isnt running or you dont have the triggers correctly named


ModmeBot:

Reply By: tbone-5

natesmithzombies
tbone-5okay i added the trigger with the target name & nothing happeneds when i shoot it


Try adding this at the bottom of main_shootable_perk_slot:

wait(20); 
iprintlnbold( "There are "+trigs.size+" triggers in the map" ); 



If you dont get that statement within 20 seconds of spawning, then the function either isnt running or you dont have the triggers correctly named


okay i tried this i got the statement saying there was a trigger in the map.


ModmeBot:

Reply By: natesmithzombies

tbone-5
natesmithzombies
tbone-5okay i added the trigger with the target name & nothing happeneds when i shoot it


Try adding this at the bottom of main_shootable_perk_slot:

wait(20); 
iprintlnbold( "There are "+trigs.size+" triggers in the map" ); 



If you dont get that statement within 20 seconds of spawning, then the function either isnt running or you dont have the triggers correctly named


okay i tried this i got the statement saying there was a trigger in the map.


Change the "meteor_affirm" to "zmb_cha_ching". I think this is working and you might not be noticing?


ModmeBot:

Reply By: tbone-5

natesmithzombies
tbone-5
natesmithzombies
tbone-5okay i added the trigger with the target name & nothing happeneds when i shoot it


Try adding this at the bottom of main_shootable_perk_slot:

wait(20); 
iprintlnbold( "There are "+trigs.size+" triggers in the map" ); 



If you dont get that statement within 20 seconds of spawning, then the function either isnt running or you dont have the triggers correctly named


okay i tried this i got the statement saying there was a trigger in the map.


Change the "meteor_affirm" to "zmb_cha_ching". I think this is working and you might not be noticing?


just tried that shot the trigger nothing no sound either, it did not give me any extra perk slots either


ModmeBot:

Reply By: natesmithzombies

tbone-5just tried that shot the trigger nothing no sound either, it did not give me any extra perk slots either


Can you post a picture of the entity info of your placed trigger_damage?


ModmeBot:

Reply By: tbone-5

natesmithzombies
tbone-5just tried that shot the trigger nothing no sound either, it did not give me any extra perk slots either


Can you post a picture of the entity info of your placed trigger_damage?


i got it working great now thanks for the help, can you help on my friends scavanger problem? would appreciate it.