Victor Koulikov
Veteran
- Messages
- 17
- Reaction score
- 3
- Points
- 558
I've managed to change the perk limit by making my own script, by using BO3 tutorials and figuring out that "inti()" is like "main()" (At least that's how it seemed when I changed the perk limit). But when I applied the same logic to changing the starting weapon, nothing worked. I tried one line, level.start_weapon = getWeapon("m1911_zm") I tried this,
startingWeapon = "m1911_zm";
weapon = getWeapon(startingWeapon);
level.start_weapon = (weapon);"
I tried different spacing between level.perk_purchase_limit = 13; and the weapon line(s), nothing worked. I tried using a custom loadout function, but I think that's only in BO3. I don't understand why this simple code doesn't work. I would highly appreciate if someone knew how to code this specifically in BO2. If anyone is curious, this is the whole script. And in case anyone is wondering, I want to change it to the already default starting pistol because I want to have it in Origins for the Mustang and Sally.
//
//
init()
{
thread onplayerconnect();
//SetDvar("r_enablePlayerShadow", 1); // Causes laser flickering
level.perk_purchase_limit = 13;
}
onplayerconnect()
{
while(true)
{
level waittill("connecting", player);
player thread onplayerspawned();
player thread showConnectMessage();
}
}
onplayerspawned()
{
self endon( "disconnect" );
displayMessage = true;
while(true)
{
self waittill( "spawned_player" );
}
}
showConnectMessage()
{
self endon( "disconnect" );
self waittill( "spawned_player" );
self iprintln("^1Redacted^7: " + self.name);
}
startingWeapon = "m1911_zm";
weapon = getWeapon(startingWeapon);
level.start_weapon = (weapon);"
I tried different spacing between level.perk_purchase_limit = 13; and the weapon line(s), nothing worked. I tried using a custom loadout function, but I think that's only in BO3. I don't understand why this simple code doesn't work. I would highly appreciate if someone knew how to code this specifically in BO2. If anyone is curious, this is the whole script. And in case anyone is wondering, I want to change it to the already default starting pistol because I want to have it in Origins for the Mustang and Sally.
//
//
init()
{
thread onplayerconnect();
//SetDvar("r_enablePlayerShadow", 1); // Causes laser flickering
level.perk_purchase_limit = 13;
}
onplayerconnect()
{
while(true)
{
level waittill("connecting", player);
player thread onplayerspawned();
player thread showConnectMessage();
}
}
onplayerspawned()
{
self endon( "disconnect" );
displayMessage = true;
while(true)
{
self waittill( "spawned_player" );
}
}
showConnectMessage()
{
self endon( "disconnect" );
self waittill( "spawned_player" );
self iprintln("^1Redacted^7: " + self.name);
}