stef538 Posted March 27, 2014 Share Posted March 27, 2014 Hey guys, I was wondering if it was possible to scale a object. This is what i already have : SApple = World.CreateObject("cj_proc_brick", Player.Character.CurrentVehicle.Position); Wait(1); SApple.AttachToVehicle(Player.Character.CurrentVehicle, Vector3.RelativeFront * 4, Vector3.Zero); Function.Call("SET_OBJECT_SCALE", SApple, 6.0 * (Player.Character.CurrentVehicle.Speed / 100)); Anyway, whatever i try, the object won't become bigger. Does anyone have an idea ? Link to comment Share on other sites More sharing options...
LordOfTheBongs Posted March 27, 2014 Share Posted March 27, 2014 look in the SCO scripts how it is used... it is used in the pool_game sco by all 3 episodes and it is used always right after 2 other properties are set... collision and visibility to false (which makes no sense but obviously they do for a reason) sco code: [code if (NOT (DOES_OBJECT_EXIST( l_U500 ))) { CREATE_OBJECT( -809347846, l_U459[0]._fU0._fU0, l_U459[0]._fU0._fU4, l_U459[0]._fU0._fU8, ref l_U500, 1 ); ADD_OBJECT_TO_INTERIOR_ROOM_BY_KEY( l_U500, l_U239 ); SET_OBJECT_COLLISION( l_U500, 0 ); SET_OBJECT_VISIBLE( l_U500, 0 ); SET_OBJECT_SCALE( l_U500, l_U529 ); }[/code] l_U500 is the object by the way and l_U529 is the scale value so whenever r* uses the native they make the object invisible and have no collision, kinda odd but im thinking the native doesnt work in the way the name describes try not attaching to the vehicle and testing Link to comment Share on other sites More sharing options...
pedro2555 Posted March 27, 2014 Share Posted March 27, 2014 Can you try: bool scaled = Function.Call<bool>("SET_OBJECT_SCALE", SApple, .5f); And tell me the visual result and the scaled property state? They remove collisions because the scaling applies visually only so the object will keep their boundaries. Link to comment Share on other sites More sharing options...
stef538 Posted March 27, 2014 Author Share Posted March 27, 2014 (edited) Can you try: bool scaled = Function.Call<bool>("SET_OBJECT_SCALE", SApple, .5f); And tell me the visual result and the scaled property state? They remove collisions because the scaling applies visually only so the object will keep their boundaries. Trying Now! EDIT It's not working, it says : "Object reference is not set to instance of an object" Edited March 27, 2014 by stef538 Link to comment Share on other sites More sharing options...
stef538 Posted March 27, 2014 Author Share Posted March 27, 2014 LORD_OF_THE_BONGS Tried, but it's not working.. Link to comment Share on other sites More sharing options...
pedro2555 Posted March 27, 2014 Share Posted March 27, 2014 Reference not set to an instance of an object, assuming this is because of SApple, then that object was not created in game. Link to comment Share on other sites More sharing options...
stef538 Posted March 27, 2014 Author Share Posted March 27, 2014 Fixed that issue by deleting the . before the 5f, anyway no matter what i try, it is still not working.. Link to comment Share on other sites More sharing options...
pedro2555 Posted March 27, 2014 Share Posted March 27, 2014 '5f' is 10 orders of magnitude bigger than '.5f'. '.5f' is the same as '0.5f'. Let get home and I will take a try at this. Link to comment Share on other sites More sharing options...
LordOfTheBongs Posted March 27, 2014 Share Posted March 27, 2014 (edited) did u ever try spawning this object to see what r* is doing... CREATE_OBJECT( -809347846, l_U459[0]._fU0._fU0, l_U459[0]._fU0._fU4, l_U459[0]._fU0._fU8, ref l_U500, 1 ); the hash for the model is odd because ive never noticed any being a negative number Edited March 27, 2014 by LordOfTheBongs Link to comment Share on other sites More sharing options...
stef538 Posted March 27, 2014 Author Share Posted March 27, 2014 (edited) Well, let me try (: EDITNope.. Nothing.. Edited March 27, 2014 by stef538 Link to comment Share on other sites More sharing options...
LordOfTheBongs Posted March 27, 2014 Share Posted March 27, 2014 yeah it seems like that native might never get used in game even though it is in the sco code, like u saw yourself the hash spawns nothing. Maybe this was some kind of test code that never got implemented... well if i were you i wouldnt spend too much more time on it, might make u crazy lol Link to comment Share on other sites More sharing options...
Skorpro Posted March 28, 2014 Share Posted March 28, 2014 Hi, the int -809347846 is a "ghostball" object model and was used as a kind of coord/move helper (player was attached to it) in pool_game.sco & ambsavebed.sco... eModel = EC_NF_ghostball unsigned int => 3485619450 => 0xCFC254FA Unfortunately the SET_OBJECT_SCALE native has no effect I've tested dozens of objects with/without collision, visibility, freeze, proof... but nothing happens. I was pissed off because GTA SA has a similar opcode and it was funny to use it. AgentWD40 and LordOfTheBongs 2 Link to comment Share on other sites More sharing options...
stef538 Posted March 30, 2014 Author Share Posted March 30, 2014 Awh Anyway, thanks everybody Link to comment Share on other sites More sharing options...
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