Game Modding | Call of Duty: Black Ops 3 | Scripting
ModmeBot:
Thread By: hahaDuNOOB
hello
i need a script for a normal trigger that when trigger it gives a perk and have to cost the same like the perks like the real perk trigger but only on a trigger use
ModmeBot:
Reply By: mathfag
hahaDuNOOB
hello i need a script for a normal trigger that when trigger it gives a perk and have to cost the same like the perks like the real perk trigger but only on a trigger use
ModmeBot:
Reply By: hahaDuNOOB
mathfag
hahaDuNOOB hello i need a script for a normal trigger that when trigger it gives a perk and have to cost the same like the perks like the real perk trigger but only on a trigger use if i understand you correctly, a player triggers a trigger and it gives him a perk and charges him for it (takes 3000 pts for speed cola, 2500 for jug). what happens if he doesn't have the money? is it a one time use? is it a random perk? does it give the perk to all players/every player random perk?
ModmeBot:
Reply By: soul-toktzt
hahaDuNOOB
mathfag hahaDuNOOB hello i need a script for a normal trigger that when trigger it gives a perk and have to cost the same like the perks like the real perk trigger but only on a trigger use if i understand you correctly, a player triggers a trigger and it gives him a perk and charges him for it (takes 3000 pts for speed cola, 2500 for jug). what happens if he doesn't have the money? is it a one time use? is it a random perk? does it give the perk to all players/every player random perk? it need to act like a normal perk
ModmeBot:
Reply By: xdferpc
mapname.gsc
under
#using scripts\zm\_zm_score;
at funcion main:
thread buyable_powerup();
function buyable_powerup()
{
level.buyable_powerup_cost = 100; // Cost for powerup
level.buyable_powerup_cooldown = 20; // Cooldown in seconds for buyable trigger
while(1)
{
while(1)
{
buyable_powerup_trig = GetEnt("buyable_powerup_trig", "targetname");
buyable_powerup_trig SetHintString("Press and hold &&1 to spawn Powerup [Cost: " + level.buyable_powerup_cost + "]");
buyable_powerup_trig SetCursorHint("HINT_NOICON");
buyable_powerup_spawn = struct::get( "powerup_spawn", "targetname" );
buyable_powerup_trig waittill("trigger", player);
if(player.score >= level.buyable_powerup_cost)
{
player zm_score::minus_to_player_score(level.buyable_powerup_cost);
break;
}
}
buyable_powerup_spawn thread zm_powerups::special_powerup_drop(buyable_powerup_spawn.origin);
//buyable_powerup_spawn thread zm_powerups::specific_powerup_drop("full_ammo", buyable_powerup_spawn.origin);
buyable_powerup_trig SetHintString("Recharing...");
wait(level.buyable_powerup_cooldown);
}
}
ModmeBot:
Reply By: mathfag
these are some lines that you'll need
ModmeBot:
Reply By: mathfag
xdferpc
mapname.gsc under #using scripts\zm\zm_usermap; #using scripts\zm\_zm_score; at funcion main: thread buyable_powerup(); function buyable_powerup(){ level.buyable_powerup_cost = 100; // Cost for powerup level.buyable_powerup_cooldown = 20; // Cooldown in seconds for buyable trigger while(1) { while(1) { buyable_powerup_trig = GetEnt("buyable_powerup_trig", "targetname"); buyable_powerup_trig SetHintString("Press and hold &&1 to spawn Powerup [Cost: " + level.buyable_powerup_cost + "]"); buyable_powerup_trig SetCursorHint("HINT_NOICON"); buyable_powerup_spawn = struct::get( "powerup_spawn", "targetname" ); buyable_powerup_trig waittill("trigger", player); if(player.score >= level.buyable_powerup_cost) { player zm_score::minus_to_player_score(level.buyable_powerup_cost); break; } } buyable_powerup_spawn thread zm_powerups::special_powerup_drop(buyable_powerup_spawn.origin); //buyable_powerup_spawn thread zm_powerups::specific_powerup_drop("full_ammo", buyable_powerup_spawn.origin); buyable_powerup_trig SetHintString("Recharing..."); wait(level.buyable_powerup_cooldown); }}
ModmeBot:
Reply By: hahaDuNOOB
mathfag
these are some lines that you'll need while(1) { trig waittill("trigger", player); { if(player.score >= level.perk_cost) { player zm_score::minus_to_player_score(level.perk_cost); player zm_perks::give_perk( PERK_ELECTRIC_CHERRY, false ); } } }
ModmeBot:
Reply By: mathfag
hahaDuNOOB
mathfag these are some lines that you'll need while(1) { trig waittill("trigger", player); { if(player.score >= level.perk_cost) { player zm_score::minus_to_player_score(level.perk_cost); player zm_perks::give_perk( PERK_ELECTRIC_CHERRY, false ); } } } i still need a model with the lights that is moveable