Project X Forums



It is currently Sun Apr 28, 2024 1:38 pm

All times are UTC




Post new topic Reply to topic  [ 13 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: CGObject RopeData[] help. (SOLVED)
PostPosted: Tue Jan 22, 2013 3:14 pm 
Offline
User avatar

Joined: Sun Apr 08, 2012 1:09 pm
Posts: 425
Location: Ukraine, Kyiv
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:
Image

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?

_________________
Things to impress.


Last edited by PyroMan on Wed Jan 23, 2013 2:57 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: CGObject RopeData[] help.
PostPosted: Tue Jan 22, 2013 6:49 pm 
Offline
User avatar

Joined: Sat Nov 27, 2010 12:59 pm
Posts: 346
if the number is very big, but not exactly divisible by 65536, then it could be a Float! :) just like the JetFuel value (pseudo-int float). :)


Top
 Profile  
Reply with quote  
 Post subject: Re: CGObject RopeData[] help.
PostPosted: Tue Jan 22, 2013 7:01 pm 
Offline
User avatar

Joined: Sun Apr 08, 2012 1:09 pm
Posts: 425
Location: Ukraine, Kyiv
StepS wrote:
if the number is very big, but not exactly divisible by 65536, then it could be a Float! :) just like the JetFuel value (pseudo-int 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.

_________________
Things to impress.


Top
 Profile  
Reply with quote  
 Post subject: Re: CGObject RopeData[] help. [SOLVED]
PostPosted: Wed Jan 23, 2013 1:43 pm 
Offline
User avatar

Joined: Sun Apr 08, 2012 1:09 pm
Posts: 425
Location: Ukraine, Kyiv
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.

_________________
Things to impress.


Top
 Profile  
Reply with quote  
 Post subject: Re: CGObject RopeData[] help.
PostPosted: Wed Jan 23, 2013 2:34 pm 
Offline
User avatar

Joined: Sat Nov 27, 2010 12:59 pm
Posts: 346
small worm? :D


Top
 Profile  
Reply with quote  
 Post subject: Re: CGObject RopeData[] help.
PostPosted: Wed Jan 23, 2013 2:47 pm 
Offline
User avatar

Joined: Sun Apr 08, 2012 1:09 pm
Posts: 425
Location: Ukraine, Kyiv
StepS wrote:
small worm? :D


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 :D) - walk on ceiling :D

_________________
Things to impress.


Top
 Profile  
Reply with quote  
 Post subject: Re: CGObject RopeData[] help. (SOLVED)
PostPosted: Wed Jan 23, 2013 3:23 pm 
Offline
User avatar

Joined: Sat Nov 27, 2010 12:59 pm
Posts: 346
Quote:
sick

like this?
http://vk.com/wall-1564696_7147

Quote:
walk on ceiling

do you remember Zed zombiemode? there was a Climb weapon!


Top
 Profile  
Reply with quote  
 Post subject: Re: CGObject RopeData[] help. (SOLVED)
PostPosted: Wed Jan 23, 2013 4:26 pm 
Offline
User avatar

Joined: Sun Apr 08, 2012 1:09 pm
Posts: 425
Location: Ukraine, Kyiv
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".

_________________
Things to impress.


Top
 Profile  
Reply with quote  
 Post subject: Re: CGObject RopeData[] help. (SOLVED)
PostPosted: Wed Jan 23, 2013 4:55 pm 
Offline
User avatar

Joined: Sat Nov 27, 2010 12:59 pm
Posts: 346
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


Top
 Profile  
Reply with quote  
 Post subject: Re: CGObject RopeData[] help. (SOLVED)
PostPosted: Wed Jan 23, 2013 6:38 pm 
Offline
User avatar

Joined: Sun Apr 08, 2012 1:09 pm
Posts: 425
Location: Ukraine, Kyiv
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.

_________________
Things to impress.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 47 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Skin by Lucas Kane