Project X Forums http://px.worms2d.info/forum/ |
|
CGObject RopeData[] help. (SOLVED) http://px.worms2d.info/forum/viewtopic.php?f=15&t=589 |
Page 1 of 2 |
Author: | PyroMan [ Tue Jan 22, 2013 3:14 pm ] |
Post subject: | CGObject RopeData[] help. (SOLVED) |
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? |
Author: | StepS [ Tue Jan 22, 2013 6:49 pm ] |
Post subject: | Re: CGObject RopeData[] help. |
if the number is very big, but not exactly divisible by 65536, then it could be a Float! ![]() ![]() |
Author: | PyroMan [ Tue Jan 22, 2013 7:01 pm ] |
Post subject: | Re: CGObject RopeData[] help. |
StepS wrote: if the number is very big, but not exactly divisible by 65536, then it could be a Float! ![]() ![]() Hehe, well i will try to work on it a bit deeper. Maybe that's a float of worm's angle or sprite frame, which is kinda same in this case. ty. |
Author: | PyroMan [ Wed Jan 23, 2013 1:43 pm ] |
Post subject: | Re: CGObject RopeData[] help. [SOLVED] |
NEVERMIND! I found the answer about sprites without this ropedata. Its really not used. Damn.. HOW POWERFULL ProjectX! I found the way to get an acces to currently animating sprites for worm and take control of everything that possible to do with them: size, color, rotation, transparency, etc. Currently solving the problem with Invisibility. When all sprites under control, invisibility doesn`t work. But i have a few ideas how to solve this issue. I think my solution will be usefull for creating weaps that don`t affect on invisibility aswell. |
Author: | StepS [ Wed Jan 23, 2013 2:34 pm ] |
Post subject: | Re: CGObject RopeData[] help. |
small worm? ![]() |
Author: | PyroMan [ Wed Jan 23, 2013 2:47 pm ] |
Post subject: | Re: CGObject RopeData[] help. |
StepS wrote: small worm? ![]() ye, i made that for small worm)) but actually possible do anything. I`ll make Fat worm and Sick worm (dynamically changed color) aswell. Also, as long as i can rotate that sprites, with reading landscape angle i can make SpiderWorm (sW clan-mates will be happy ![]() ![]() |
Author: | StepS [ Wed Jan 23, 2013 3:23 pm ] |
Post subject: | Re: CGObject RopeData[] help. (SOLVED) |
Quote: sick like this? http://vk.com/wall-1564696_7147 Quote: walk on ceiling do you remember Zed zombiemode? there was a Climb weapon! |
Author: | PyroMan [ Wed Jan 23, 2013 4:26 pm ] |
Post subject: | Re: CGObject RopeData[] help. (SOLVED) |
Lol, never seen that zombie mode)) I mean any ARGB color, that possible to change each frame, as much as needed. Climb script and weapon currently usable in Curtis's CWeps. I saw how it work. But SpiderWorming will work in abit different way. Not only read howfar from the landscape, but also read landscape's exact angle under worm's feet. And rotate worm if angleis over 45degree or if its 180 even. But i think principle, which used to keep worm xclose enough to the landcape, will be mostly same as "Climb". |
Author: | StepS [ Wed Jan 23, 2013 4:55 pm ] |
Post subject: | Re: CGObject RopeData[] help. (SOLVED) |
i hope there wont be too much compatibility issues once projectx 1.0 (realtime) is released, but all of the turnbased scripts will be have to almost fully rewritten, for sure |
Author: | PyroMan [ Wed Jan 23, 2013 6:38 pm ] |
Post subject: | Re: CGObject RopeData[] help. (SOLVED) |
StepS wrote: i hope there wont be too much compatibility issues once projectx 1.0 (realtime) is released, but all of the turnbased scripts will be have to almost fully rewritten, for sure Well when wthis problem will occur, we will fix it. For now i wanna try make it. Any news about px 1.0? Hopefully it will be using EAX aswell. |
Page 1 of 2 | All times are UTC |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |