Search In
• More options...
Find results that contain...
Find results in...

# Minigun and missiles help

## Recommended Posts

If I use an integer, the missile only goes north/south. If I use a float, the angle is opposite still O_O

##### Share on other sites

If I use an integer, the missile only goes north/south. If I use a float, the angle is opposite still O_O

WTF If you dont know how to handle sine and cosine that's true!

@Anurag_Anmol You must put it! Multiply the sine with -1.0

Object.Throw([email protected], [email protected], [email protected], 0.0) 0.0 is the height that the missile will reach and then will fall!

You can use actor #NULL

`:RocketsFiring_30                                        0407: store_coords_to [email protected] [email protected] [email protected] from_car [email protected] with_offset [email protected] 3.0 -1.2  [email protected] = Object.Create(3786, [email protected], [email protected], [email protected]) [email protected] = Object.Create(3065, [email protected], [email protected], [email protected])  [email protected] = Car.Angle([email protected])Object.Angle([email protected]) = [email protected]: object [email protected] scale_model 0.2  08D2: object [email protected] scale_model 1.5  069A: attach_object [email protected] to_object [email protected] with_offset 0.0 0.0 0.0 rotation 0.0 0.0 90.0 0906: set_object [email protected] mass_to 25000.0           0908: set_object [email protected] turn_mass_to 25000.0 Object.ToggleInMovingList([email protected]) = True  Object.ToggleInMovingList([email protected]) = True  Object.CollisionDetection([email protected]) = False   04D9: object [email protected] set_scripted_collision_check  10750: set_object [email protected] visibility 002F6: [email protected] = sine [email protected] // (float) 02F7: [email protected] = cosine [email protected] // (float) [email protected] *= 75.0 [email protected] *= 75.0 [email protected] *= -1.0Object.Throw([email protected], [email protected], [email protected], 1.0) `

Edited by BnB

##### Share on other sites

I tried that already! The angle still is opposite to the actual angle if I multiply the sine by -1.0. If I multiply it by -1 then the missile goes north/south depending on the current angle (if closer to Z angle 0.0 then the missile will go north)

Edit : BTW im anurag. Well look at the Anurag account's sig

Edit 2 : Script below -

`CODE DELETED`

Edited by Nahiyan

##### Share on other sites

Have a look to ZAZ's missile script

Edited by BnB

##### Share on other sites

Still -________________________________________-

Ahh god dammit it hates meh

##### Share on other sites

Code updated try to use

`02F6: [email protected] = sine [email protected] // (float)02F7: [email protected] = cosine [email protected] // (float) `

##### Share on other sites

Oh my GAWD!!!!!!!!!!!!!!!!!!!!!!!!!!

I'm pretty sure I had the problem before I switched it to the other opcode but wtf it works now!

Now, I need help how to make the missile go at an angle (Y angle) if the heli is umm tilted.

##### Share on other sites

Have a look to ZAZ's missile script

failure in URL

URL=http://http://zazmahall.de/ZAZGTASANATORIUM/zazmoddat00100/Missile.zip

2 - Thats the problem, I don't know how to make it go downwards/upwards. Just getting the x/y angle and using that for the throw directly won't really work. And what offsets do I use for the second throw? (more importantly, how do I get them?)

in this way for example

`0381: throw_object [email protected] velocity_in_direction [email protected] [email protected] 0.00392: object [email protected] toggle_in_moving_list  [email protected] = 0:CollisionDetection_32wait 001BB: store_object [email protected] position_to [email protected] [email protected] [email protected]: create_smoke_at [email protected] [email protected] [email protected] velocity [email protected] [email protected] [email protected] RGBA 0.0 0.0 0.0 0.0 size 0.3 last_factor 5.001BB: store_object [email protected] position_to [email protected] [email protected] [email protected]: [email protected] = ground_z_at [email protected] [email protected] [email protected]: [email protected] -= [email protected] // (float)if0023:   1.5 > [email protected]: jump_if_false @CollisionDetection_330381:  throw_object [email protected] velocity_in_direction [email protected] [email protected] 5.0:CollisionDetection_33if or04DA:   has_object [email protected] [email protected] >= 5000jf @CollisionDetection_3201BB: store_object [email protected] position_to [email protected] [email protected] [email protected]: create_explosion_at [email protected] [email protected] [email protected] type 11 camera_shake 1.0`

In addition did you use the wrong object for collisioncheck in that script which you posted >here<

[email protected] = 3065, BBALL_col and must be used for collisionscheck

Edited by ZAZ

##### Share on other sites

lol thats outdated.

Updated script -

`CODE DELETED`

Nearly a hundred lines >

I'll try that method now.

EDIT : I put that method in, but I'm having some loop error. Can't find it. Guess I'll just keep following the flow.

EDIT 2 : I think I found it. I used the same variable for getting/using ground_z and for seeing if the missile was launched. Now trying the method.

EDIT 3 : The rocket bounces on the ground when it hits them. I don't need that, but I need this -

Y Angle + X/Y offset = Z float for use in Object Throwing.

Is that possible in SCM? If so, how to do it?

EDIT 4 : NVM, Atmin close da thread pl0x (reported from Anurag_Anmol account)

Edited by Nahiyan

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×