Ywa Posted October 17, 2010 Share Posted October 17, 2010 Hello. I'm trying to change a model (that means both mesh/physbody) for an entity and keep its properties intact (like velocity, keys, position, angles, color,etc). I've browsed the wiki to find a function suitable for me. I'm not sure about Set/GetEntityUserData. The wiki doesn't seem to say much. Anyone care to help me with a detailed explanation on how these 2 functions work. More over, how can I solve my SetModel function problem? Help is much appreciated. Quote Link to comment Share on other sites More sharing options...
Aily Posted October 17, 2010 Share Posted October 17, 2010 Hello. I'm trying to change a model (that means both mesh/physbody) for an entity and keep its properties intact (like velocity, keys, position, angles, color,etc). I've browsed the wiki to find a function suitable for me. I'm not sure about Set/GetEntityUserData. The wiki doesn't seem to say much. Anyone care to help me with a detailed explanation on how these 2 functions work. More over, how can I solve my SetModel function problem? Help is much appreciated. You forget to say on what programming language? In BMax: Type MyData field x,y,z end type c=createcube() md:MyData=new MyData md.x=1 md.y=2 md.z=3 setentityuserdata c,md ' and now we can get data: md=MyData(getentityuserdata(c)) print md.x print md.y print md.z Quote "Better" is big enemy of "good" Link to comment Share on other sites More sharing options...
Ywa Posted October 17, 2010 Author Share Posted October 17, 2010 Language doesn't matter, thanks anyway. What about solving the SetModel function? I mean, isn't there any way than copying every property? Quote Link to comment Share on other sites More sharing options...
Masterxilo Posted October 17, 2010 Share Posted October 17, 2010 There's a function to copy all the keys over to some other entity, but the physics and position attributes you have to copy yourself. Quote Hurricane-Eye Entertainment - Site, blog. Link to comment Share on other sites More sharing options...
Ywa Posted October 17, 2010 Author Share Posted October 17, 2010 Okay, thanks for clearing things up. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.