Game Modding | Call of Duty: Black Ops 3 | Scripting
ModmeBot:
Thread By: TrueGamerCalls
My question is how to minus what a current level.something? This is what I tried so far, which the teleporter script works correctly, I'm even able to play a sound after the waitill trigger and it will work, but for whatever reason this doesn't work. I tried debugging and it doesn't seem to do anything and its not the scripts I'm using it for.
ModmeBot:
Reply By: Harry Bo21
TrueGamerCalls
My question is how to minus what a current level.something? This is what I tried so far, which the teleporter script works correctly, I'm even able to play a sound after the waitill trigger and it will work, but for whatever reason this doesn't work. I tried debugging and it doesn't seem to do anything and its not the scripts I'm using it for. // I modifed the teleporter script from unitownpapi (forgot his name) to minus // level.hearts by one function player_teleport() { destination = GetEnt( self.target, "targetname" ); while(1) { self waittill( "trigger", player ); level.hearts --; // This is what I've tried player SetOrigin( destination.origin ); player SetPlayerAngles( destination.angles ); } }
ModmeBot:
Reply By: TrueGamerCalls
Harry Bo21
TrueGamerCalls My question is how to minus what a current level.something? This is what I tried so far, which the teleporter script works correctly, I'm even able to play a sound after the waitill trigger and it will work, but for whatever reason this doesn't work. I tried debugging and it doesn't seem to do anything and its not the scripts I'm using it for. // I modifed the teleporter script from unitownpapi (forgot his name) to minus // level.hearts by one function player_teleport() { destination = GetEnt( self.target, "targetname" ); while(1) { self waittill( "trigger", player ); level.hearts --; // This is what I've tried player SetOrigin( destination.origin ); player SetPlayerAngles( destination.angles ); } } that code is correct, but you would need to make sure you have "initialised" level.hearts "first" level.hearts = 1; you should check if its even finding that entity e_entity = getEnt( self.target, "targetname" ); iPrintLnBold( "FOUND ENTITY? : " + isDefined( e_entity ) ); and its "up town papi..."
ModmeBot:
Reply By: Harry Bo21
TrueGamerCalls
Harry Bo21 TrueGamerCalls My question is how to minus what a current level.something? This is what I tried so far, which the teleporter script works correctly, I'm even able to play a sound after the waitill trigger and it will work, but for whatever reason this doesn't work. I tried debugging and it doesn't seem to do anything and its not the scripts I'm using it for. // I modifed the teleporter script from unitownpapi (forgot his name) to minus // level.hearts by one function player_teleport() { destination = GetEnt( self.target, "targetname" ); while(1) { self waittill( "trigger", player ); level.hearts --; // This is what I've tried player SetOrigin( destination.origin ); player SetPlayerAngles( destination.angles ); } } that code is correct, but you would need to make sure you have "initialised" level.hearts "first" level.hearts = 1; you should check if its even finding that entity e_entity = getEnt( self.target, "targetname" ); iPrintLnBold( "FOUND ENTITY? : " + isDefined( e_entity ) ); and its "up town papi..." EDIT: I tested it out and it didn't show the debugging text. Don't know what to do. I put a trigger use somewhere to test it out and I was able to minus the level.hearts that way, but the way I'm trying to do it is not working. I did put my own debugging test and I got it to work, so its just not removing any level.hearts
ModmeBot:
Reply By: TrueGamerCalls
Harry Bo21
TrueGamerCalls Harry Bo21 TrueGamerCalls My question is how to minus what a current level.something? This is what I tried so far, which the teleporter script works correctly, I'm even able to play a sound after the waitill trigger and it will work, but for whatever reason this doesn't work. I tried debugging and it doesn't seem to do anything and its not the scripts I'm using it for. // I modifed the teleporter script from unitownpapi (forgot his name) to minus // level.hearts by one function player_teleport() { destination = GetEnt( self.target, "targetname" ); while(1) { self waittill( "trigger", player ); level.hearts --; // This is what I've tried player SetOrigin( destination.origin ); player SetPlayerAngles( destination.angles ); } } that code is correct, but you would need to make sure you have "initialised" level.hearts "first" level.hearts = 1; you should check if its even finding that entity e_entity = getEnt( self.target, "targetname" ); iPrintLnBold( "FOUND ENTITY? : " + isDefined( e_entity ) ); and its "up town papi..." EDIT: I tested it out and it didn't show the debugging text. Don't know what to do. I put a trigger use somewhere to test it out and I was able to minus the level.hearts that way, but the way I'm trying to do it is not working. I did put my own debugging test and I got it to work, so its just not removing any level.hearts you also had a space between "level.hearts" and the "--" thats not how this operator works var--; // yes var --; // no var -= 1; // yes var = var - 1; // yes
ModmeBot:
Reply By: Harry Bo21
...
reread my answer...
ModmeBot:
Reply By: TrueGamerCalls
Harry Bo21
... reread my answer...