Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. Red Dead Redemption 2

      1. PC
      2. Gameplay
      3. Missions
      4. Help & Support
    2. Red Dead Online

      1. Gameplay
      2. Find Lobbies & Outlaws
      3. Help & Support
      4. Frontier Pursuits
    1. Crews & Posses

      1. Recruitment
    2. Events

    1. GTA Online

      1. DLC
      2. Find Lobbies & Players
      3. Guides & Strategies
      4. Vehicles
      5. Content Creator
      6. Help & Support
      7. The Diamond Casino Heist
    2. Grand Theft Auto Series

    3. GTA 6

    4. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    5. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA IV Mods
    6. GTA Chinatown Wars

    7. GTA Vice City Stories

    8. GTA Liberty City Stories

    9. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA SA Mods
    10. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA VC Mods
    11. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA III Mods
    12. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    13. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. News

    2. Forum Support

    3. Site Suggestions

Sign in to follow this  
roby65

Launch a missile?

Recommended Posts

roby65

Is there a way to launch a missile by scm? biggrin.gif

Share this post


Link to post
Share on other sites
Great Saiyaman

it is possible but where do u want the missile to come from?

Share this post


Link to post
Share on other sites
roby65

from....anything biggrin.gif

Share this post


Link to post
Share on other sites
Great Saiyaman

like what? do you want it to launch from an airplane/jet, helicopter boat in the water what?

Share this post


Link to post
Share on other sites
roby65

possible from an object?

Share this post


Link to post
Share on other sites
Great Saiyaman

i cant help until i know what you want it to be launched from

Share this post


Link to post
Share on other sites
roby65

i simply want it to be launched from anywhere it can (for example from the air, from an actor, an object etc...)

Share this post


Link to post
Share on other sites
Great Saiyaman

it can be launched from pretty much anywhere

Share this post


Link to post
Share on other sites
roby65
it can be launched from pretty much anywhere

how?

Share this post


Link to post
Share on other sites
Great Saiyaman

by coding it in...

Share this post


Link to post
Share on other sites
roby65
by coding it in...

sly.gifsly.gifsly.gif

 

post code or don't post anymore

Share this post


Link to post
Share on other sites
Great Saiyaman

ok i wont post anymore, i wouldnt make a code for someone who is rude

Share this post


Link to post
Share on other sites
roby65

you posted a lot of post without helping me in any way...... wink.gif

i just asked for code and you always answered with useless posts.....

Share this post


Link to post
Share on other sites
PatrickW

He asked a sensible question. It's impossible to answer your question if you're not being specific.

But by now I think you've been so rude, that I highly doubt if anyone wil be answering your question,

even if you were being specific enough.

Share this post


Link to post
Share on other sites
ZAZ

 

i simply want it to be launched from anywhere it can (for example from the air, from an actor, an object etc...)

Wow. How do you shoot a rocket from an object ?

I dont know any code to let shoot a rocket.

Or use a code to let hydra or hunter chasing CJ.

 

I think the rocket shooting like by using Rocket Loucher or Hydra is execodet.

We can try to do the same

 

Spawn the missile object and throw it

Press NO-key to start the rocket

 

:Missile_0003A4: name_thread 'JPR':Missile_010001: wait  0 ms00D6: if 00256: player $PLAYER_CHAR defined004D: jump_if_false @Missile_0100D6: if  000E1:   key_pressed  0  10  004D: jump_if_false @Missile_010247: request_model #missile:Missile_020001: wait  0 ms00D6: if  00248:   model #missile available004D: jump_if_false @Missile_020172: [email protected] = actor $PLAYER_ACTOR z_angle04C4: create_coordinate [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR offset 1.0 0.5  0.10107: [email protected] = create_object #missile at  [email protected] [email protected] [email protected]: set_object [email protected] z_angle_to  [email protected]: wait  1000 ms0172: [email protected] = actor $PLAYER_ACTOR z_angle0819: [email protected] = actor $PLAYER_ACTOR distance_from_ground0007: [email protected] =  80.1  // floating-point values 02F6: [email protected] = cosine [email protected]  // sinus swapped with cosine02F7: [email protected] = sinus [email protected] // cosine swapped with sinus 006B: [email protected] *= [email protected]  // floating-point values006B: [email protected] *= [email protected]  // floating-point values0013: [email protected] *=  -1.0  // floating-point values000B: [email protected] +=  1.0  // floating-point values0392: object [email protected] toggle_in_moving_list  10381: throw_object [email protected] distance [email protected] [email protected] [email protected]: release_model #missile0001: wait  1000 ms01C4: remove_references_to_object [email protected]  // This object will now disappear when the player looks away0002: jump @Missile_01

 

 

Now the rocket fly to a point. But it wont explode. We must use create_explosion.

The problem is to check the moment when the explosion should be.

I tried to check if object has collided but no succsess

Any help is welcome

 

 

:Missile_0003A4: name_thread 'JPR':Missile_010001: wait  0 ms00D6: if 00256: player $PLAYER_CHAR defined004D: jump_if_false @Missile_0100D6: if  000E1:   key_pressed  0  10  004D: jump_if_false @Missile_010247: request_model #missile:Missile_020001: wait  0 ms00D6: if  00248:   model #missile available004D: jump_if_false @Missile_020172: [email protected] = actor $PLAYER_ACTOR z_angle04C4: create_coordinate [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR offset 1.0 0.5  0.10107: [email protected] = create_object #missile at  [email protected] [email protected] [email protected]: set_object [email protected] z_angle_to  [email protected]: object [email protected] set_scripted_collision_check  10382: set_object [email protected] collision_detection  10906: [email protected]  30000.0//set_object mass0908: [email protected]  30000.0//set_object turn_mass0001: wait  1000 ms0172: [email protected] = actor $PLAYER_ACTOR z_angle0819: [email protected] = actor $PLAYER_ACTOR distance_from_ground0007: [email protected] =  80.1  // floating-point values 02F6: [email protected] = cosine [email protected]  // sinus swapped with cosine02F7: [email protected] = sinus [email protected] // cosine swapped with sinus 006B: [email protected] *= [email protected]  // floating-point values006B: [email protected] *= [email protected]  // floating-point values0013: [email protected] *=  -1.0  // floating-point values000B: [email protected] +=  1.0  // floating-point values0392: object [email protected] toggle_in_moving_list  10381: throw_object [email protected] distance [email protected] [email protected] [email protected]@ =  0  // floating-point values:Missile_050001: wait  0 ms00D6: if 00256: player $PLAYER_CHAR defined004D: jump_if_false @Missile_0500D6: if  2104DA:   has_object [email protected] collided0019:   [email protected] >  2800  // integer values004D: jump_if_false @Missile_050400: create_coordinate [email protected] [email protected] [email protected] from_object [email protected] offset  0.0  0.0  0.0020C: create_explosion_with_radius 3 at [email protected] [email protected] [email protected]: create_temporary_explosion_fire [email protected] [email protected] [email protected]  50249: release_model #missile0001: wait  1000 ms01C4: remove_references_to_object [email protected]  // This object will now disappear when the player looks away0002: jump @Missile_01

 

Share this post


Link to post
Share on other sites
roby65

this is great!!!! biggrin.gifbiggrin.gifbiggrin.gif

 

i suggest you to check the direction for obstacles when you launch it, and store these coords so you know when the object will reach that point!

 

thanks for your help!!!! turn.gifturn.gifturn.gif

Share this post


Link to post
Share on other sites
ZAZ

 

this is great!!!!  biggrin.gif  biggrin.gif  biggrin.gif

 

i suggest you to check the direction for obstacles when you launch it, and store these coords so you know when the object will reach that point!

 

thanks for your help!!!!  turn.gif  turn.gif  turn.gif

 

How to check for the object obstacle ? Any code ?

 

 

I got now a working collision check.

I replaced the missile object with bball_col.

I think the reason is because the bball_col have an entry in the object.dat

 

bball_col  10.0,  10.0  1.00,  0.3,  50.0,  0.0,  0.1,	0,	2,	1,  0,	0,	0.0, 0.0, 0.0,  none

 

Yes try the script to shoot bball_col

 

:Missile_0003A4: name_thread 'JPR':Missile_010001: wait  0 ms00D6: if 00256: player $PLAYER_CHAR defined004D: jump_if_false @Missile_0100D6: if  000E1:   key_pressed  0  10  004D: jump_if_false @Missile_010247: request_model #bball_col:Missile_020001: wait  0 ms00D6: if  00248:   model #bball_col available004D: jump_if_false @Missile_020172: [email protected] = actor $PLAYER_ACTOR z_angle04C4: create_coordinate [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR offset 1.0 0.5  0.10107: [email protected] = create_object #bball_col at  [email protected] [email protected] [email protected]: set_object [email protected] z_angle_to  [email protected]: object [email protected] set_scripted_collision_check  10382: set_object [email protected] collision_detection  10906: [email protected]  30000.0//set_object mass0908: [email protected]  30000.0//set_object turn_mass0001: wait  1000 ms0172: [email protected] = actor $PLAYER_ACTOR z_angle0819: [email protected] = actor $PLAYER_ACTOR distance_from_ground0007: [email protected] =  80.1  // floating-point values 02F6: [email protected] = cosine [email protected]  // sinus swapped with cosine02F7: [email protected] = sinus [email protected] // cosine swapped with sinus 006B: [email protected] *= [email protected]  // floating-point values006B: [email protected] *= [email protected]  // floating-point values0013: [email protected] *=  -1.0  // floating-point values000B: [email protected] +=  1.0  // floating-point values0392: object [email protected] toggle_in_moving_list  10381: throw_object [email protected] distance [email protected] [email protected] [email protected]@ =  0  // floating-point values:Missile_050001: wait  0 ms00D6: if 00256: player $PLAYER_CHAR defined004D: jump_if_false @Missile_0500D6: if  2104DA:   has_object [email protected] collided0019:   [email protected] >  2800  // integer values004D: jump_if_false @Missile_050400: create_coordinate [email protected] [email protected] [email protected] from_object [email protected] offset  0.0  0.0  0.0020C: create_explosion_with_radius 3 at [email protected] [email protected] [email protected]: create_temporary_explosion_fire [email protected] [email protected] [email protected]  50249: release_model #bball_col0001: wait  1000 ms01C4: remove_references_to_object [email protected]  // This object will now disappear when the player looks away0002: jump @Missile_01

 

 

I thought i can add now an entry of missile with same parameter like bball_col to object.dat

but what a pity it doesnt work.

missile 10.0, 10.0 1.00, 0.3, 50.0, 0.0, 0.1, 0, 2, 1, 0, 0, 0.0, 0.0, 0.0, none

Share this post


Link to post
Share on other sites
Great Saiyaman

ZAZ is this for sanny or mb? and whats the create_thread part?

Share this post


Link to post
Share on other sites
ZAZ

 

ZAZ is this for sanny or mb? and whats the create_thread part?

Its a thread for a main for sanny.

To make a cleo script add the cleo directive.

 

I got it now. The script rocks biggrin.giflol.gif

 

In the new script I use a new object:

3786, missile_05_SFXR, missiles_SFS, 100, 65536

 

Added a line to object.dat

 

missile_05_SFXR  10.0,  10.0  1.00,  0.3,  50.0,  0.0,  0.1,	0,	2,	1,  0,	0,	0.0, 0.0, 0.0,  none

 

 

 

The Rocket script:

 

:Missile_0003A4: name_thread 'JPR':Missile_010001: wait  0 ms00D6: if 00256: player $PLAYER_CHAR defined004D: jump_if_false @Missile_0100D6: if  000E1:   key_pressed  0  10  004D: jump_if_false @Missile_010247: request_model #missile_05_SFXR:Missile_020001: wait  0 ms00D6: if  00248:   model #missile_05_SFXR available004D: jump_if_false @Missile_020172: [email protected] = actor $PLAYER_ACTOR z_angle04C4: create_coordinate [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR offset 1.0 0.5  0.10107: [email protected] = create_object #missile_05_SFXR at  [email protected] [email protected] [email protected]: [email protected] +=  270.0  // floating-point values0177: set_object [email protected] z_angle_to  [email protected]: object [email protected] set_scripted_collision_check  10382: set_object [email protected] collision_detection  10906: [email protected]  30000.0//set_object mass0908: [email protected]  30000.0//set_object turn_mass0001: wait  1000 ms0172: [email protected] = actor $PLAYER_ACTOR z_angle0819: [email protected] = actor $PLAYER_ACTOR distance_from_ground0007: [email protected] =  80.1  // floating-point values 02F6: [email protected] = cosine [email protected]  // sinus swapped with cosine02F7: [email protected] = sinus [email protected] // cosine swapped with sinus 006B: [email protected] *= [email protected]  // floating-point values006B: [email protected] *= [email protected]  // floating-point values0013: [email protected] *=  -1.0  // floating-point values000B: [email protected] +=  1.0  // floating-point values0392: object [email protected] toggle_in_moving_list  10381: throw_object [email protected] distance [email protected] [email protected] [email protected]@ =  0  // floating-point values:Missile_050001: wait  0 ms00D6: if 00256: player $PLAYER_CHAR defined004D: jump_if_false @Missile_0500D6: if  2104DA:   has_object [email protected] collided0019:   [email protected] >  2800  // integer values004D: jump_if_false @Missile_050400: create_coordinate [email protected] [email protected] [email protected] from_object [email protected] offset  0.0  0.0  0.0020C: create_explosion_with_radius 3 at [email protected] [email protected] [email protected]: create_temporary_explosion_fire [email protected] [email protected] [email protected]  50249: release_model #missile_05_SFXR0001: wait  1000 ms01C4: remove_references_to_object [email protected]  // This object will now disappear when the player looks away0002: jump @Missile_01

 

Share this post


Link to post
Share on other sites
Great Saiyaman

so is this for cleo?

Share this post


Link to post
Share on other sites
roby65

you can use it in cleo but also in sanny builder using create_thread smile.gif

Share this post


Link to post
Share on other sites
Great Saiyaman

but what is the create thread? is it like create_thread @missile or what?

Share this post


Link to post
Share on other sites
roby65

004F: create_thread @Missile_00

 

turn.gifturn.gif

Share this post


Link to post
Share on other sites
ZAZ

 

06BD: no_obstacles_between [email protected] [email protected] [email protected] and [email protected] [email protected] [email protected] solid 1 car 0 actor 0 object 0 particle 0

 

with this code you can check for collision with objects, actors etc.

but to find the collision point you have to do a little cicles  confused.gif

 

Yes, needs a complex script. And thats not all. What happens if an other object in the area ?

Share this post


Link to post
Share on other sites
Great Saiyaman

how do i make it so the rocket goes until it hits something? not just stop

Share this post


Link to post
Share on other sites
roby65

you can create a thread for every missile colgate.gif

 

so you can use local vars to avoid conflicts biggrin.gif

Share this post


Link to post
Share on other sites
Great Saiyaman

i just needed the missile to go and not blow up and stop in the middle of the air

Share this post


Link to post
Share on other sites
ZAZ

 

how do i make it so the rocket goes until it hits something? not just stop

I have allready posted it in my 3. post. Read It!!!!!!!!!!!!!

You must also modify the object.dat and use the object missile_05_SFXR.

 

Share this post


Link to post
Share on other sites
roby65

is there a way to make the missile move but without being affected by the gravity? confused.gif

Share this post


Link to post
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

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

Sign in to follow this  

  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

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