probably this is a question to Entuser or those who has an idea how PX works and how read some values that it provides. Well hopefully i will get an answer about this array.
Basically i would like to know what kind of data contains in that array.
In px wiki its written this: "RopeData : int[ ] - Unused." But i need to use it, at this moment.
I`m pretty sure that this array contains data that shows when rope has breaking points, like shown on pictures:
I`ve tryed to read that values, but they are very unusual for me, dunno did they divided by smth (i guess definitely not defided by 65535), what values for what assumes?
I found that mostly RopeData[1] is changing everytime. Rest - change sometimes when rope as rounded over some girder, etc.
Please help me to find out how to read those data. Basically i need to know last breaking point (center point of rope rotation).
u ask me why? i`m making powerful lib with rewritten animations with possibility to change currently running sprite sizes, their angles, colors, flipping and dynamically change it all, for cool weapon utilities.
At this moment, i`ve succesfully rewrote roping animations (actually make it look absolutely same as original), but the only problem - is rope`s breaking points. I need to read position of center points. And i think RopeData array will help me with that.
this small script will hep to read values:
Code:
require utils, stepsutils;
override void CWorm::Message(CObject* sender,EMType Type,int MSize,CMessageData* MData){
super;
local w = GetCurrentWorm();
if (Type == M_FRAME) {
if (gframe % 25) {}
else {
local NUMBER = 6; // actually i dunno what is the length of this array. but 6 works. Try larger
if (w != NullObj && w->RopeAttached > 0) {
for (local i = 0; i < NUMBER; i++) {
local b = int(w->RopeData[i]);
local a = MakeNumberString("ropeData[ ", i, " ]: ");
local c = MakeNumberString(a, b, "");
GG->WriteToChat( 1, c, false);
}
}
}
}
}
result in chat will be smth like:
RopeData[0]: 0
RopeData[1]: -73352
RopeData[2]: 167
RopeData[3]: 0
RopeData[4]: 13451
RopeData[5]: 0
etc...
ANY ideas?