Posts
2,789
Respect
352Add +1
Forum Rank
King of the Zombies
Primary Group
Community Daedra
Login Issues
Forgot password?Activate Issues
Account activation email not received? Wrong account activation email used?Other Problems?
Contact Support - Help Center Get help on the UGX Discord. Join it now!Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. | |
Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community. |
cool. very simple, with script documentation just like treyarch's utility functions. can you teach me what the % symbol does again?
Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
cool. very simple, with script documentation just like treyarch's utility functions. can you teach me what the % symbol does again?
Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. | |
Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community. |
Modulus? Its the remainder when dividing.
It returns the modulo of the division. So for example:
10 % 2 returns 0 (as 10/2=5, not a double/float but an integer)
9 % 2 returns 1 (as 9/2 returns a double/float, 8/2 doesn't. 9-8 = 1, so 1 is the answer)
19 % 4 returns 3 (as 19/4 returns a double/float, 16/4 doens't. 19-16=3, so 3 is the answer)
Bad explaination but it works this way. It'll check how much times the number after the % can be in the number before the %, and it'll return the rest (the number before the % minus the number of the last time the number after % could be inserted)
Modulus? Its the remainder when dividing.
Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. | |
Has shown excellence and experience in the area of custom scripting in the UGX-Mods community. | |
BO3 Modtools Alpha | This user has access to the Black Ops 3 Modtools Alpha |
Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. | |
UGX V.I.P. | |
Has shown excellence and experience in the area of custom mapping in the UGX-Mods community. | |
Has shown excellence and experience in the area of custom scripting in the UGX-Mods community. | |
BO3 Modtools Alpha | This user has access to the Black Ops 3 Modtools Alpha |
10/10 variable names by the way.
Maybe should just cast the int as an actual int.
int = int(int);
10/10 variable names by the way.
(Just in case someone passes a double.)
Haha ya, nothing like using keywords as your own variables.
Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. | |
UGX V.I.P. | |
Has shown excellence and experience in the area of custom mapping in the UGX-Mods community. | |
Has shown excellence and experience in the area of custom scripting in the UGX-Mods community. | |
BO3 Modtools Alpha | This user has access to the Black Ops 3 Modtools Alpha |
To my knowledge, int is not a keyword in GSC. The reason its highlighted in the code box is probably because its set to highlight C language keywords, which GSC is based off of.
You would be correct, but it is still bad practice to do so.
Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. | |
UGX V.I.P. | |
Has shown excellence and experience in the area of custom mapping in the UGX-Mods community. | |
Has shown excellence and experience in the area of custom scripting in the UGX-Mods community. | |
BO3 Modtools Alpha | This user has access to the Black Ops 3 Modtools Alpha |
Woah dude, why are you attacking Leviathan?
I couldn't care less what happens in developer mode as long as it runs fine for everyone
e - besides Awesome Pieman did the majority of scripting for Leviathan and he doesn't know proper scripting practices since he is self taught.
I would also like to counter your argument with why would Treyarch allow you to use undefined variables in the first place (ie the isDefined function, which is quite handy) without them actually working.
Aye mate you don't know me so y don't you shut tf up ok buddy
Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. | |
Box Mappers Elite | |
Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager. | |
Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community. |