Jump to content

Making an object fall on its own


Recommended Posts

 

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

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

 

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 0 User Currently Viewing
    0 members, 0 Anonymous, 0 Guests

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.