Posts
7
Respect
Forum Rank
Legless Crawler
Primary Group
Member
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!Has the ability to issue warnings to users, edit and remove posts from the forum and to move topics to other boards. Upholds the rules of the forum. Moderates Chat Rooms. |
Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. | |
Nuclear | DARKLEGION's requested title |
Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager. |
I'll respond to this in detail when I get home in a few hours.
Has the ability to issue warnings to users, edit and remove posts from the forum and to move topics to other boards. Upholds the rules of the forum. Moderates Chat Rooms. |
Has the ability to issue warnings to users, edit and remove posts from the forum and to move topics to other boards. Upholds the rules of the forum. Moderates Chat Rooms. |
I like the watch_trigger example. Essentially I would create my "watch_trigger" function (calling it whatever I would like) and thread it at whatever point I want to.
For example, and please correct me if I'm wrong, say I want to (and this is from something I have heard has been done) give a player who has used up all of his/her spawn credits an RC bomb every 30 seconds. In the "onPlayerKilled(...)" overridden function, I would start a thread for function spectatorMode (after checking if no more respawn credits) that ends on end of round. Pseudo-code function looks like:
Then, in some other part of the code I do notify("weapon_used"), yes? Now, how do I detect that the weapon was used. Is there a callback for attack button pressed? I know there is AttackButtonPressed(), but this is a function that returns false. It sounds like I should replace waittill with while(!(curPlayer AttackButtonPressed())) { }. But that would mean creating more threads for everything that I would want to do.
With that, I also built a mod that displays the rgb values and hero light temp and sky color temp, and I wanted to update these values with keypresses. I could do a threaded function that loops forever and checks for each type of button press, but I would rather have a function that is triggered when a button is pressed. Or even better, textboxes where values can be input and sliders for each. But that isn't something I want to work on later. One thing at a time, yes? In any case, the detecting key presses and acting on it as the keypress happens is something doable with a threaded function, but I don't now how to detect which key was pressed without a bunch of if statements. I'd rather have a switch(keyPressed) { ... }.
Has the ability to issue warnings to users, edit and remove posts from the forum and to move topics to other boards. Upholds the rules of the forum. Moderates Chat Rooms. |
I greatly appreciate you taking the time to respond. It usually turns out that I don't really know what I'm trying to accomplish until I type it out. It just happened that for this, I typed it out in a forum post. I definitely understood (or thought I understood) the concept of "Self" being an entity. From what I saw, though, self seemed to take on the entity that instantiated the function. I wasn't completely convinced and am still a little bit confused about it. So the direct question is: does Self always refer to the player?
Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. | |
BO3 Modtools Alpha | This user has access to the Black Ops 3 Modtools Alpha |