yair1221 Posted September 4, 2010 Share Posted September 4, 2010 how can I make an object just fall? for example i throw an object to the air but when the throw's power is off, i want the object to fall, as if gravity Link to comment https://gtaforums.com/topic/458512-making-an-object-fall-on-its-own/ Share on other sites More sharing options...
BnB Posted September 4, 2010 Share Posted September 4, 2010 0392: make_object 1@ moveable 1 0172: 0@ = actor $PLAYER_ACTOR Z_angle 02F6: 2@ = sine 0@ // (float) 02F7: 3@ = cosine 0@ // (float) 006B: 2@ *= 50.0 // (float) 006B: 3@ *= 50.0 // (float) 0013: 2@ *= -1.0 0381: throw_object 1@ velocity_in_direction 2@ 3@ 3.0 3.0 is the height you want to get the object If you dont use sine and cosine the object will be thrown at north Link to comment https://gtaforums.com/topic/458512-making-an-object-fall-on-its-own/#findComment-1060112598 Share on other sites More sharing options...
TheSiggi Posted September 4, 2010 Share Posted September 4, 2010 simply attatch an object with physical properties to it e.g. the basketball Link to comment https://gtaforums.com/topic/458512-making-an-object-fall-on-its-own/#findComment-1060112610 Share on other sites More sharing options...
yair1221 Posted September 4, 2010 Author Share Posted September 4, 2010 you mean creating a basketball and attaching the object to the basketball? Link to comment https://gtaforums.com/topic/458512-making-an-object-fall-on-its-own/#findComment-1060112636 Share on other sites More sharing options...
BnB Posted September 4, 2010 Share Posted September 4, 2010 That's right. Attach any object to a basketball and throw the basketball. Link to comment https://gtaforums.com/topic/458512-making-an-object-fall-on-its-own/#findComment-1060112638 Share on other sites More sharing options...
yair1221 Posted September 4, 2010 Author Share Posted September 4, 2010 oh i need to throw it anyway, are there any other objects that have 'physical properties' Link to comment https://gtaforums.com/topic/458512-making-an-object-fall-on-its-own/#findComment-1060112651 Share on other sites More sharing options...
BnB Posted September 4, 2010 Share Posted September 4, 2010 Maybe but basketball is the best. Link to comment https://gtaforums.com/topic/458512-making-an-object-fall-on-its-own/#findComment-1060112667 Share on other sites More sharing options...
TheSiggi Posted September 4, 2010 Share Posted September 4, 2010 yep, the basketball has the best physics and yes, there other objects like the flare I think. If you want other oportunities search in the main.scm for objects that are used with collision and collidied opcodes alot Link to comment https://gtaforums.com/topic/458512-making-an-object-fall-on-its-own/#findComment-1060112672 Share on other sites More sharing options...
yair1221 Posted September 4, 2010 Author Share Posted September 4, 2010 flares didnt work for me they stayed in the same place even when i used throw Link to comment https://gtaforums.com/topic/458512-making-an-object-fall-on-its-own/#findComment-1060112717 Share on other sites More sharing options...
BnB Posted September 4, 2010 Share Posted September 4, 2010 #BBALL_COL or 3065 is the model of the basketball. Link to comment https://gtaforums.com/topic/458512-making-an-object-fall-on-its-own/#findComment-1060112736 Share on other sites More sharing options...
yair1221 Posted September 4, 2010 Author Share Posted September 4, 2010 then why does that script crash: thread 'Missile':submissilewait 0if$subon == 1jf @submissileif0ab0: 96jf @submissile0407: store_coords_to 10@ 11@ 12@ from_car $dummy with_offset 0.0 50.0 0.01@ = object.Create(#bbal_col, 10@, 11@, 12@)0392: make_object 1@ moveable 10174: 0@ = car $dummy Z_angle 02F6: 2@ = sine 0@ // (float)02F7: 3@ = cosine 0@ // (float)006B: 2@ *= 50.0 // (float)006B: 3@ *= 50.0 // (float)0013: 2@ *= -1.00381: throw_object 1@ velocity_in_direction 2@ 3@ 3.0 4@ = object.Create(#MISSILE, 0.0, 0.0, 0.0)069A: attach_object 4@ to_object 1@ with_offset 0.0 0.0 0.0 rotation 0.0 0.0 0.0 repeatwait 0until 04DA: has_object 1@ collidedobject.StorePos(1@, 2@, 3@, 4@)0948: create_explosion_at 2@ 3@ 4@ type 7 camera_shake 5.0 object.Destroy(1@)object.RemoveReferences(1@)wait 500jump @submissileend_thread Link to comment https://gtaforums.com/topic/458512-making-an-object-fall-on-its-own/#findComment-1060113074 Share on other sites More sharing options...
ZAZ Posted September 4, 2010 Share Posted September 4, 2010 then why does that script crash: main.scm? how should we know if your $dummy car is valid coded post a complete script which don't use any stuff of other threads Link to comment https://gtaforums.com/topic/458512-making-an-object-fall-on-its-own/#findComment-1060113090 Share on other sites More sharing options...
BnB Posted September 4, 2010 Share Posted September 4, 2010 When it crash? First attach the model and then throw it! Link to comment https://gtaforums.com/topic/458512-making-an-object-fall-on-its-own/#findComment-1060113092 Share on other sites More sharing options...
yair1221 Posted September 4, 2010 Author Share Posted September 4, 2010 it crashed when i pressed 0 and the $dummy is defined as a car but never mind ill try later a new script Link to comment https://gtaforums.com/topic/458512-making-an-object-fall-on-its-own/#findComment-1060113373 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