Raised This Month: $ Target: $400
 0% 

Trying to Understand #define Macros values in War3TFT


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
zXCaptainXz
Member
Join Date: May 2017
Old 09-02-2022 , 15:27   Re: Trying to Understand #define Macros values in War3TFT
Reply With Quote #4

Tasks are used to execute functions in a timely manner. You can schedule a function to be executed once, multiple times, or infinitely, while passing the required parameters. Check this link out for parameter descriptions https://www.amxmodx.org/api/amxmodx/set_task

In some cases, especially when you are executing a function that loops indefinitely and which is unique to each player (for example, a function that checks if you have been camping in the same place for too long), you can assign each task an ID related to each player (player 1 gets task 1, player 2 gets task 2...). You can do the same for multiple tasks, you can have multiple tasks with the same ID with no problem at all. The problem however, is that you cannot manage those tasks, say if you wanna remove them or check if they exist. Thus, for each task you wanna loop over players, one way to do it is to define base IDs (each macro you are asking about represent each functionality which should be looped over every player) for each function and offset them by 32 each, then you offset that base id by each player's id to get that player's task for that specific function.

Tl;dr changing those values is totally useless, if not even harmful to the plugin's execution. You can change them, but make sure they are offset by at least 32 each, or a task assigned for function one player will conflict with another on another player.

Sorry for the long explanation, this is not a beginner topic, I hope I made myself as clear as possible.
zXCaptainXz is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:39.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode