WLF Posted March 27, 2017 Report Share Posted March 27, 2017 Hi all! How can I check the changing of a variable? For example "humanity".What is the difference between functions "server_getDiff" & "server_getDiff2"? Why '_diff_humanity = ["humanity",player] call server_getDiff2;' returns me 'any' ? Link to comment Share on other sites More sharing options...
0 Relentless Posted March 27, 2017 Report Share Posted March 27, 2017 Do you me with "changing" the change from the variables from 1.0.5.1 to 1.0.6.1 or the changing of the variable while running a script? Both a very easy. There is a file in the documents folder on the official github which includes all changed variables to the new version. And if you mean script-side then you can just print out the value or the string of the variable to the game so you see what it is. Link to comment Share on other sites More sharing options...
0 WLF Posted March 27, 2017 Author Report Share Posted March 27, 2017 I mean I want run a script when specific variable is changed. Namely, when humanity is changed run script which print out a text with amount humanity changed (+5 when Z killed or +75 (-75) when AI killed). Link to comment Share on other sites More sharing options...
0 Relentless Posted March 27, 2017 Report Share Posted March 27, 2017 I would suggest you add that directly to the corresponding mission system then. Look for the function where the mission system recognizes when an AI is killed. So in this script there should be something like player humanity += config_humanity You know? So look for the file where the system gives you humanity for killing an AI and add a message to that loop. Could be something like this: if (_aiKilled) then { player _humanity += 25; [nil,nil,rTitleText,"Player xyz gained 25 humanity for killing an AI!", "PLAIN",10] call RE; }; Actually this is just an example and this would be a global message everyone could see on the server. Link to comment Share on other sites More sharing options...
0 WLF Posted March 27, 2017 Author Report Share Posted March 27, 2017 No, I don't need global messages, just for player. Link to comment Share on other sites More sharing options...
Question
WLF
Hi all!
How can I check the changing of a variable? For example "humanity".
What is the difference between functions "server_getDiff" & "server_getDiff2"?
Why '_diff_humanity = ["humanity",player] call server_getDiff2;' returns me 'any' ?
Link to comment
Share on other sites
4 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now