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

naut765

Rotating player while in air

Recommended Posts

naut765

Hello I am new at forum and I am making a ironman fly mod 

I want to rotate my player according to my mouse please help in San Andreas 

Edited by naut765

Share this post


Link to post
Share on other sites
ZAZ

I assume, you mean San Andreas, you need to learn script coding, for main.scm or cleo scripts

 

opcode 083E: let the player rotate

Edited by ZAZ

Share this post


Link to post
Share on other sites
naut765
7 hours ago, ZAZ said:

I assume, you mean San Andreas, you need to learn script coding, for main.scm or cleo scripts

 

opcode 083E: let the player rotate

Yes you assumed right but can you give full explanation please 

Where should I write it 

Share this post


Link to post
Share on other sites
ZAZ

It needs scripting experience. A newbie can't do it

it needs to bring the player into air, but without parachute, otherwise the parachute extern script will catch him, move him, let him do animation and then he isn't anymore in air

opcode 00A1: and opcode 083C: are suitable to bring the player into air

Share this post


Link to post
Share on other sites
naut765
6 hours ago, ZAZ said:

It needs scripting experience. A newbie can't do it

it needs to bring the player into air, but without parachute, otherwise the parachute extern script will catch him, move him, let him do animation and then he isn't anymore in air

opcode 00A1: and opcode 083C: are suitable to bring the player into air

I have did everything it can bring into air and its height is locked (I do it so that it will not fall down) but i only want to rotate him according to my camera 

Share this post


Link to post
Share on other sites
ZAZ

Then post your script 

Share this post


Link to post
Share on other sites
naut765
8 hours ago, ZAZ said:

Then post your script 

I will post and I was successful to do it in pc but it is not compiling for android as android don't have 

This opcode

0AB1: call @MAIN_5359 0 [email protected]

and it is only working with this opcode 

Here is my script for pc

 

 

 

 

03A4: script_name 'CYBORG' 

:CYBORG_23
0007: [email protected] = 15.0 
0007: [email protected] = 2.0 
0007: [email protected] = 0.0 
0001: wait 0 
00D6: if and
0256:   is_player_playing $PLAYER_CHAR 
02F2:   is_char_model $PLAYER_ACTOR model #SPECIAL01 
80DF:   not is_char_in_any_car $PLAYER_ACTOR 
004D: goto_if_false @CYBORG_23
00D6: if or
02D8:   is_char_holding_weapon $PLAYER_ACTOR weapon 0 
02D8:   is_char_holding_weapon $PLAYER_ACTOR weapon 1 
004D: goto_if_false @CYBORG_23
00D6: if 
0A51:   is_widget_pressed 39
004D: goto_if_false @CYBORG_23
0050: gosub @CYBORG_2438

:CYBORG_2170
0001: wait 0
00D6: if 
80DF:   not is_char_in_any_car $PLAYER_ACTOR 
004D: goto_if_false @CYBORG_23 
083C: set_char_velocity $PLAYER_ACTOR to 0.0 0.0 50.0 
0006: [email protected] = 0 
066A: create_fx_system_on_char_with_direction "NITRO" char $PLAYER_ACTOR offset 0.0 0.0 0.0 rotation -3.0 -4.0 -5.0 type 1 store_to [email protected] 
066A: create_fx_system_on_char_with_direction "NITRO" char $PLAYER_ACTOR offset 0.0 0.0 0.0 rotation -3.0 -5.0 4.0 type 1 store_to [email protected] 
066A: create_fx_system_on_char_with_direction "NITRO" char $PLAYER_ACTOR offset 0.0 0.0 0.0 rotation -5.0 4.0 3.0 type 1 store_to [email protected] 
066A: create_fx_system_on_char_with_direction "NITRO" char $PLAYER_ACTOR offset 0.0 0.0 0.0 rotation -5.0 4.0 -3.0 type 1 store_to [email protected] 
0883: attach_fx_system_to_char_bone [email protected] char $PLAYER_ACTOR bodypart 22 
0883: attach_fx_system_to_char_bone [email protected] char $PLAYER_ACTOR bodypart 32 
0883: attach_fx_system_to_char_bone [email protected] char $PLAYER_ACTOR bodypart 43 
0883: attach_fx_system_to_char_bone [email protected] char $PLAYER_ACTOR bodypart 53 
064C: play_fx_system [email protected] 
0001: wait 100 
064C: play_fx_system [email protected] 
0001: wait 200 
064C: play_fx_system [email protected] 
0001: wait 150 
064C: play_fx_system [email protected] 
0001: wait 50 
0687: clear_char_tasks $PLAYER_ACTOR 

:CYBORG_2491
0001: wait 0 
00D6: if and
8118:   not is_char_dead $PLAYER_ACTOR 
8741:   not has_char_been_arrested $PLAYER_ACTOR 
004D: goto_if_false @CYBORG_4775 
0050: gosub @CYBORG_4206 
0819: get_char_height_above_ground $PLAYER_ACTOR store_to [email protected] 
00D6: if 
0021:   [email protected] > 1.2 
004D: goto_if_false @CYBORG_2875 
00E2: get_pad_state 0 button 1 store_to [email protected] 
00D6: if 
8039:   not  [email protected] == -128 
004D: goto_if_false @CYBORG_4257 
0007: [email protected] = 0.0 
04C4: get_offset_from_char_in_world_coords $PLAYER_ACTOR offset 0.0 0.0 0.0 store_to [email protected] [email protected] [email protected] 
04C4: get_offset_from_char_in_world_coords $PLAYER_ACTOR offset 0.0 5.0 5.0 store_to [email protected] [email protected] [email protected] 
0063: [email protected] -= [email protected] // (float) 
0063: [email protected] -= [email protected] // (float) 
0063: [email protected] -= [email protected] // (float) 
0013: [email protected] *= 0.0 
0013: [email protected] *= 0.0 
0013: [email protected] *= 0.06 
0050: gosub @CYBORG_4208 

:CYBORG_2708
0812: task_play_anim_non_interruptable $PLAYER_ACTOR anim "IM_FLYIDLE" ifp "MIRONMAN" framedelta 4.0 loop 1 lockX 1 lockY 1 lockF 1 time -1 

:CYBORG_2745
0050: gosub @CYBORG_4206 
083C: set_char_velocity $PLAYER_ACTOR to [email protected] [email protected] [email protected] 
0AB1: call @CYBORG_5359 0 [email protected]  
0173: set_char_heading $PLAYER_ACTOR to [email protected] 
083E: set_char_rotation $PLAYER_ACTOR to 0.0 0.0 [email protected] 
0050: gosub @CYBORG_3727 
00D6: if 
0A51:   is_widget_pressed 10
004D: goto_if_false @CYBORG_2491 

:CYBORG_2875
0050: gosub @CYBORG_4068 
0050: gosub @CYBORG_4208 
0050: gosub @CYBORG_2913 
0792: clear_char_tasks_immediately $PLAYER_ACTOR 
0001: wait 300 
0002: goto @CYBORG_23 

:CYBORG_2913
0687: clear_char_tasks $PLAYER_ACTOR 
0650: kill_fx_system [email protected] 
0650: kill_fx_system [email protected] 
0650: kill_fx_system [email protected] 
0650: kill_fx_system [email protected] 
0051: return 

:CYBORG_3727
00D6: if and
80DF:   not is_char_in_any_car $PLAYER_ACTOR 
0039:   [email protected] == 0 
0A51:   is_widget_pressed 71
004D: goto_if_false @CYBORG_4068 
00D6: if or
02D8:   is_char_holding_weapon $PLAYER_ACTOR weapon 0 
02D8:   is_char_holding_weapon $PLAYER_ACTOR weapon 1 
004D: goto_if_false @CYBORG_4068 
0050: gosub @CYBORG_4111 
032A: set_camera_behind_char_distance 2 
03F0: use_text_commands 1 
00D6: if and
0019:   [email protected] > 70 
0A51:   is_widget_pressed 51
004D: goto_if_false @CYBORG_4206 
04C4: get_offset_from_char_in_world_coords $PLAYER_ACTOR offset 0.0 0.0 0.0 store_to [email protected] [email protected] [email protected] 
068D: get_active_camera_coordinates [email protected] [email protected] [email protected] 
0087: [email protected] = [email protected] // (float) 
0087: [email protected] = [email protected] // (float) 
0087: [email protected] = [email protected] // (float) 
0063: [email protected] -= [email protected] // (float) 
0063: [email protected] -= [email protected] // (float) 
0063: [email protected] -= [email protected] // (float) 
0013: [email protected] *= -15.0 
0013: [email protected] *= -15.0 
0013: [email protected] *= 15.0 
005B: [email protected] += [email protected] // (float) 
005B: [email protected] += [email protected] // (float) 
0063: [email protected] -= [email protected] // (float) 
000B: [email protected] += 15.0 
04C4: get_offset_from_char_in_world_coords $PLAYER_ACTOR offset 0.0 0.5 0.7 store_to [email protected] [email protected] [email protected] 
06BC: fire_single_bullet [email protected] [email protected] [email protected] target [email protected] [email protected] [email protected] energy 90 
0006: [email protected] = 0 
0051: return 

:CYBORG_4111
00D6: if 
0039:   [email protected] == 0 
004D: goto_if_false @CYBORG_4206 
0107: create_object #MINIGUN at 0.0 0.0 -100.0 store_to [email protected] 
069B: attach_object_to_char [email protected] char $PLAYER_ACTOR offset 0.0 -0.5 0.5 rotation 0.0 25.0 90.0 
0AAD: set_audio_stream_state [email protected] to 1 
0006: [email protected] = 1 
0051: return 

:CYBORG_4068
00D6: if 
0039:   [email protected] == 1 
004D: goto_if_false @CYBORG_4206 
0108: delete_object [email protected] 
0050: gosub @CYBORG_4100 
0051: return 

:CYBORG_4100
015A: restore_camera 
0006: [email protected] = 0 
0051: return 

:CYBORG_4206
0051: return 

:CYBORG_4208
00D6: if 
0039:   [email protected] == 1 
004D: goto_if_false @CYBORG_4206 
0AAD: set_audio_stream_state [email protected] to 0 
0AAE: release_audio_stream [email protected] 
0650: kill_fx_system [email protected] 
0650: kill_fx_system [email protected] 
0006: 2[email protected] = 0 
0051: return 

:CYBORG_4257
00D6: if 
0A51:   is_widget_pressed 29
004D: goto_if_false @CYBORG_4315 
0050: gosub @CYBORG_4208 
0007: [email protected] = 8.0 
0007: [email protected] = 15.0 
0050: gosub @CYBORG_4703 
0002: goto @CYBORG_2708 

:CYBORG_4315
0812: task_play_anim_non_interruptable $PLAYER_ACTOR anim "FALL_SKYDIVE_ACCEL" ifp "PARACHUTE" framedelta 4.0 loop 1 lockX 1 lockY 1 lockF 1 time -1 
00D6: if 
0039:   [email protected] == 0 
004D: goto_if_false @CYBORG_4626 
066A: create_fx_system_on_char_with_direction "NITRO" char $PLAYER_ACTOR offset 0.0 0.0 0.0 rotation 2.0 -2.0 -3.0 type 1 store_to [email protected] 
066A: create_fx_system_on_char_with_direction "NITRO" char $PLAYER_ACTOR offset 0.0 0.0 0.0 rotation 2.0 -2.0 3.0 type 1 store_to [email protected] 
0883: attach_fx_system_to_char_bone [email protected] char $PLAYER_ACTOR bodypart 21 
0883: attach_fx_system_to_char_bone [email protected] char $PLAYER_ACTOR bodypart 31 
064C: play_fx_system [email protected] 
064C: play_fx_system [email protected] 
0006: [email protected] = 1 

:CYBORG_4626
0007: [email protected] = 120.0 
0050: gosub @CYBORG_4703 
0002: goto @CYBORG_2745

:CYBORG_4703
068D: get_active_camera_coordinates [email protected] [email protected] [email protected] 
068E: get_active_camera_point_at [email protected] [email protected] [email protected] 
0063: [email protected] -= [email protected] // (float) 
0063: [email protected] -= [email protected] // (float) 
0063: [email protected] -= [email protected] // (float) 
006B: [email protected] *= [email protected] // (float) 
006B: [email protected] *= [email protected] // (float) 
006B: [email protected] *= [email protected] // (float) 
0051: return 

:CYBORG_2438
04ED: request_animation "MIRONMAN" 
0247: request_model 1582 
0051: return 
0001: wait 2000 

:CYBORG_4775
0050: gosub @CYBORG_4208 
0050: gosub @CYBORG_2913 
0002: goto @CYBORG_23 

:CYBORG_5359
068D: get_active_camera_coordinates [email protected] [email protected] [email protected] 
068E: get_active_camera_point_at [email protected] [email protected] [email protected] 
0063: [email protected] -= [email protected] // (float) 
0063: [email protected] -= [email protected] // (float) 
0604: get_heading_from_vector_2d [email protected] [email protected] store_to [email protected] 
0AB2: ret 1 [email protected]

 

 

 

Share this post


Link to post
Share on other sites
ZAZ

Not only 0AB1: blocks compiling by mobile mode, the audio codes also

 

But at first the cleo directive is missing, i assume it should be a cleo script right?

Or a script for main.scm? sorry i don't know about mobile modding

 

Also, it isn't neccesary to use 0AB1: call @MAIN_5359 0 [email protected] for that script

Do you know how this code works?

 

Template for you:

{$CLEO .cs}
thread 'ROTATE'

while true
    wait 0
    if
        0256:   player $PLAYER_CHAR defined 
    then
        if 
            0AB0:   key_pressed 8
        then
            05BC: AS_actor $PLAYER_ACTOR jump 1
            wait 500
            30@ =  0.0
            
                        
            while 0256:   player $PLAYER_CHAR defined
                wait 0
                if
                    0AB0:   key_pressed 8
                then
                    083C: set_actor $PLAYER_ACTOR velocity_in_direction_XYZ 0.0 0.0 2.5
                    0A4A: store_joystick_X_offset_to 21@ Y_offset_to 22@
                    005B: 30@ += 21@  // (float)                    
                    083E: set_actor $PLAYER_ACTOR rotation 30@ 0.0 0.0 while_in_air                                        
                else
                    break
                end
            end
            
            wait 1000
        end
    end
end 

 

Hold Backspace key and move mouse left/right to let player rotate forward/backward

 

 

 

Edited by ZAZ

Share this post


Link to post
Share on other sites
naut765
7 hours ago, ZAZ said:

Not only 0AB1: blocks compiling by mobile mode, the audio codes also

 

But at first the cleo directive is missing, i assume it should be a cleo script right?

Or a script for main.scm? sorry i don't know about mobile modding

 

Also, it isn't neccesary to use 0AB1: call @MAIN_5359 0 [email protected] for that script

Do you know how this code works?

 

Template for you:

{$CLEO .cs}
thread 'ROTATE'

while true
    wait 0
    if
        0256:   player $PLAYER_CHAR defined 
    then
        if 
            0AB0:   key_pressed 8
        then
            05BC: AS_actor $PLAYER_ACTOR jump 1
            wait 500
            30@ =  0.0
            
                        
            while 0256:   player $PLAYER_CHAR defined
                wait 0
                if
                    0AB0:   key_pressed 8
                then
                    083C: set_actor $PLAYER_ACTOR velocity_in_direction_XYZ 0.0 0.0 2.5
                    0A4A: store_joystick_X_offset_to 21@ Y_offset_to 22@
                    005B: 30@ += 21@  // (float)                    
                    083E: set_actor $PLAYER_ACTOR rotation 30@ 0.0 0.0 while_in_air                                        
                else
                    break
                end
            end
            
            wait 1000
        end
    end
end 

 

Hold Backspace key and move mouse left/right to let player rotate forward/backward

 

 

 

Thanks for help I think it will work in android I will try it in android

 

Share this post


Link to post
Share on other sites
naut765
12 hours ago, ZAZ said:

Not only 0AB1: blocks compiling by mobile mode, the audio codes also

 

But at first the cleo directive is missing, i assume it should be a cleo script right?

Or a script for main.scm? sorry i don't know about mobile modding

 

Also, it isn't neccesary to use 0AB1: call @MAIN_5359 0 [email protected] for that script

Do you know how this code works?

 

Template for you:

{$CLEO .cs}
thread 'ROTATE'

while true
    wait 0
    if
        0256:   player $PLAYER_CHAR defined 
    then
        if 
            0AB0:   key_pressed 8
        then
            05BC: AS_actor $PLAYER_ACTOR jump 1
            wait 500
            30@ =  0.0
            
                        
            while 0256:   player $PLAYER_CHAR defined
                wait 0
                if
                    0AB0:   key_pressed 8
                then
                    083C: set_actor $PLAYER_ACTOR velocity_in_direction_XYZ 0.0 0.0 2.5
                    0A4A: store_joystick_X_offset_to 21@ Y_offset_to 22@
                    005B: 30@ += 21@  // (float)                    
                    083E: set_actor $PLAYER_ACTOR rotation 30@ 0.0 0.0 while_in_air                                        
                else
                    break
                end
            end
            
            wait 1000
        end
    end
end 

 

Hold Backspace key and move mouse left/right to let player rotate forward/backward

 

 

 

This script help me but I needed to rotate it according to the camera not mouse as mobile don't have mouse

So please help me to rotate player according to the camera 

Share this post


Link to post
Share on other sites
ZAZ

 

5 hours ago, naut765 said:

mobile don't have mouse

 

There must exist an equivalent to opcode 0A4A:

 

maybe

0A5A: get_widget_value 156 [email protected]
 

or
0A5B: get_widget_value2 40 $1019 $1020

 

look what code is used in pool mission script


at Line number 41254

:POOL2_13627
0A4A: store_joystick_X_offset_to 201@ Y_offset_to 202@ 
00D6: if or
00E1:   player 180@ pressed_key 0 
0021:   201@ > 0.01 
0023:   -0.01 > 201@ 
004D: jump_if_false @POOL2_13780 
0176: $TEMPVAR_ANGLE = object 82@ Z_angle 
0494: get_joystick 180@ direction_offset_to $MOVE_AXIS_X $MOVE_AXIS_Y $SPECIAL_AXIS_X $SPECIAL_AXIS_Y 
008F: 42@ = integer $MOVE_AXIS_X to_float 
0017: 42@ /= 128.0 
0013: 42@ *= 1.0 
005F: $TEMPVAR_ANGLE += 42@ // (float) 
0013: 201@ *= -0.4 
005F: $TEMPVAR_ANGLE += 201@ // (float) 
0453: set_object 82@ XYZ_rotation 0.0 0.0 0.0 
0177: set_object 82@ Z_angle_to $TEMPVAR_ANGLE









at Line number 41600

:POOL2_15852
0A4A: store_joystick_X_offset_to 201@ Y_offset_to 202@ 
005B: 200@ += 202@ // (float) 
00D6: if 
0021:   200@ > 128.0 
004D: jump_if_false @POOL2_15899 
0007: 200@ = 128.0

 

Share this post


Link to post
Share on other sites
naut765
On 1/31/2020 at 6:10 PM, ZAZ said:

 

 

There must exist an equivalent to opcode 0A4A:

 

maybe

0A5A: get_widget_value 156 [email protected]
 

or
0A5B: get_widget_value2 40 $1019 $1020

 

look what code is used in pool mission script


at Line number 41254

:POOL2_13627
0A4A: store_joystick_X_offset_to 201@ Y_offset_to 202@ 
00D6: if or
00E1:   player 180@ pressed_key 0 
0021:   201@ > 0.01 
0023:   -0.01 > 201@ 
004D: jump_if_false @POOL2_13780 
0176: $TEMPVAR_ANGLE = object 82@ Z_angle 
0494: get_joystick 180@ direction_offset_to $MOVE_AXIS_X $MOVE_AXIS_Y $SPECIAL_AXIS_X $SPECIAL_AXIS_Y 
008F: 42@ = integer $MOVE_AXIS_X to_float 
0017: 42@ /= 128.0 
0013: 42@ *= 1.0 
005F: $TEMPVAR_ANGLE += 42@ // (float) 
0013: 201@ *= -0.4 
005F: $TEMPVAR_ANGLE += 201@ // (float) 
0453: set_object 82@ XYZ_rotation 0.0 0.0 0.0 
0177: set_object 82@ Z_angle_to $TEMPVAR_ANGLE









at Line number 41600

:POOL2_15852
0A4A: store_joystick_X_offset_to 201@ Y_offset_to 202@ 
005B: 200@ += 202@ // (float) 
00D6: if 
0021:   200@ > 128.0 
004D: jump_if_false @POOL2_15899 
0007: 200@ = 128.0

 

Sorry it didn't help me something more 

Ok fine I want to make a whiplash attack mod

I get a chain script of ghost rider but I want to change the FX system 'molotov flame' to the electric sparks which FX system should I use

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.

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.


  • 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.