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. Gameplay
      2. Missions
      3. Help & Support
    2. Red Dead Online

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

      1. Recruitment
    2. Events

    1. GTA Online

      1. Arena War
      2. After Hours
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Grand Theft Auto Series

    3. GTA Next

    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 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 Mods
    10. GTA Vice City

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

      1. Guides & Strategies
      2. Help & Support
      3. GTA 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

Bad.boy!

Blind Firing mod

Recommended Posts

Bad.boy!

I'm making a blind firing mod, with anim and script. I've done 1 anim alread and the other is almost done to. (more will come)

user posted image

 

I need some help with the script. I don't know if it's even possible to make free aim within an anim (it's probably hard coded), and I'm not going to make free aim. I want to make the player shoot the gun. So I looked at the main.scm, in the mission "reuniting the families". And copied the part where an actor is shooting from an anim (the guy who is upside down in a vent).

 

 

0812: AS_actor [email protected] perform_animation "SWT_VENT_01" IFP_file "SWAT" 1000.0 loopA 0 lockX 0 lockY 0 lockF 0 time -1 // versionB }{[email protected] = 0 [email protected] = 2 [email protected] = 1 :DRUGS4_21729if  [email protected] == 2 else_jump @DRUGS4_21914 if   not Actor.Dead([email protected])else_jump @DRUGS4_21914 if   Actor.Animation([email protected]) == "SWT_VENT_01"else_jump @DRUGS4_21914 0613: [email protected] = actor [email protected] animation "SWT_VENT_01" time if  [email protected] == 1.0 else_jump @DRUGS4_21914 Actor.PutAt([email protected], 2217.85, -1188.86, 1028.93)0085: [email protected] = [email protected] // (int) [email protected] = 2220.538 [email protected] = -1189.594 [email protected] = 1029.845 008B: [email protected] = $PLAYER_ACTOR // (int) gosub @DRUGS4_66848 [email protected] = 3--------:DRUGS4_668480615: define_AS_pack_begin [email protected] 05D3: AS_actor -1 goto_point [email protected] [email protected] [email protected] mode 6 -1 ms // versionA 0638: AS_actor -1 stay_put 1 04EB: AS_actor -1 crouch 1 0634: AS_actor -1 attack_using_weapon_actor [email protected] unknown 4 unknown 5000 unknown 80 0616: define_AS_pack_end [email protected] 0618: assign_actor [email protected] to_AS_pack [email protected] 061B: remove_references_to_AS_pack [email protected] return -------- :DRUGS4_21914if  [email protected] == 1 else_jump @DRUGS4_22013 if  [email protected] > 3166 else_jump @DRUGS4_22013 if   not Actor.Dead([email protected])else_jump @DRUGS4_22013 0812: AS_actor [email protected] perform_animation "SWT_VENT_02" IFP_file "SWAT" 1000.0 loopA 0 lockX 0 lockY 0 lockF 0 time -1 // versionB [email protected] = 2 :DRUGS4_22013if  [email protected] == 2 else_jump @DRUGS4_22153 if   not Actor.Dead([email protected])else_jump @DRUGS4_22153 if   Actor.Animation([email protected]) == "SWT_VENT_02"else_jump @DRUGS4_22153 0613: [email protected] = actor [email protected] animation "SWT_VENT_02" time if  [email protected] == 1.0 else_jump @DRUGS4_22153 Actor.PutAt([email protected], 2217.85, -1188.86, 1028.93)05E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR [email protected] = 3 :DRUGS4_22153if  [email protected] == 1 else_jump @DRUGS4_22336 if   not Actor.Dead([email protected])else_jump @DRUGS4_22336 Actor.Health([email protected]) = 1500615: define_AS_pack_begin [email protected] 05D3: AS_actor -1 goto_point 2193.064 -1188.77 1029.845 mode 7 10000 ms // versionA 05D3: AS_actor -1 goto_point 2206.833 -1188.83 1029.845 mode 7 10000 ms // versionA 05D3: AS_actor -1 goto_point 2209.588 -1190.2 1029.845 mode 7 10000 ms // versionA 05D3: AS_actor -1 goto_point 2209.7 -1197.323 1029.845 mode 7 10000 ms // versionA 05D4: AS_actor -1 rotate_angle 358.428 0638: AS_actor -1 stay_put 1 0616: define_AS_pack_end [email protected] 0618: assign_actor [email protected] to_AS_pack [email protected] 061B: remove_references_to_AS_pack [email protected] [email protected] = 2 :DRUGS4_22336if  [email protected] == 2 else_jump @DRUGS4_22884 if   not Actor.Dead([email protected])else_jump @DRUGS4_22884 if 0102:   actor [email protected] in_sphere 2209.7 -1197.323 1029.845 radius 3.0 3.0 3.0 sphere 0 stopped_on_foot else_jump @DRUGS4_22884 if 851A:   not actor [email protected] damaged_by_actor $PLAYER_ACTOR else_jump @DRUGS4_22884 if 00FF:   actor $PLAYER_ACTOR sphere 0 in_sphere 2209.7 -1197.323 1029.845 radius 3.0 3.0 3.0 on_foot else_jump @DRUGS4_22884 0395: clear_area 0 at 2209.7 -1197.323 10.0 radius 10.0 if   not Actor.Dead([email protected])else_jump @DRUGS4_22537 Actor.DestroyWithFade([email protected])jump @DRUGS4_22542 :DRUGS4_22537Actor.RemoveReferences([email protected])

 

 

But I don't understand everything, can some one explain the use of AS_pack. And AS_actor "-1", why -1, why not [email protected], and what does -1 exactly mean? And why putting an actor on a place (several times)? And does this "05E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR " make the actor shoot from an anim, because it doesn't work if I do something like that.

Share this post


Link to post
Share on other sites
spaceeinstein

The trick to that mission is to just use 06BC. The SWAT guy is not really shooting, it's a script-generated bullet.

Share this post


Link to post
Share on other sites
Th3MaN1

How's the progress?

Share this post


Link to post
Share on other sites
Bad.boy!

uhhm, I'm working on the crouch, because to the left is.... (just watch the picture)

 

user posted image

Share this post


Link to post
Share on other sites
Th3MaN1

lolz,that looks like max payne(kinda)

 

 

Edited by Th3MaN1

Share this post


Link to post
Share on other sites
Bad.boy!

Little progress, I have to fix some things

 

user posted image

 

Share this post


Link to post
Share on other sites
Michael2Corleone

this looks good i was woundering if it's allready made cover/blind fireing mod

Share this post


Link to post
Share on other sites
Th3MaN1

michael2corleone the work is in progress,but when it's ready,it's gonna be cool

Share this post


Link to post
Share on other sites
Th3MaN1

Progress?

Share this post


Link to post
Share on other sites
Bad.boy!

It isn't dead, I have more then this mod to do. The anim to the right will be finished this/next week. tounge2.gif

Share this post


Link to post
Share on other sites
Th3MaN1

I'm happy to hear that the right anim will not take more than a week.

Share this post


Link to post
Share on other sites
BnB
It isn't dead, I have more then this mod to do. The anim to the right will be finished this/next week.  tounge2.gif

Ok then please tell us what is your estimated release for this mod?

Can't you guess.

Share this post


Link to post
Share on other sites
Th3MaN1

Well I can't guess neither,but it will take some time.He isn't only working on this mod i'm pretty sure and he doesn't waste all his time with this,and he will have to make a scrpit so you can shoot while in cover.So if I would have to guess,1 month,maybe 2.

Share this post


Link to post
Share on other sites
Bad.boy!

I only have little time for mods, and I use that time for my area 69 mod. And I have school.

I have much more time in the holidays 2-3 weeks

Share this post


Link to post
Share on other sites
Th3MaN1

No problem,just work on your mod.I can wait.

Share this post


Link to post
Share on other sites
Bad.boy!

Does anyone know how to perform an animation from crouch (script)? I can only make an actor perform an animation from stand.

 

This doesn't work

 

0812: AS_actor $PLAYER_ACTOR perform_animation "BLIND_CROUCH" IFP_file "B_FIRE" 1000.0 loopA 0 lockX 0 lockY 0 lockF 0 time -1

 

Share this post


Link to post
Share on other sites
Mickey2Rufus

wish i had the skills to help you. but good luck and take as long as you want biggrin.gif

Share this post


Link to post
Share on other sites
DK22Pac
Does anyone know how to perform an animation from crouch (script)? I can only make an actor perform an animation from stand.

Apply your anim to upper bones only (head, hands, ...)

Share this post


Link to post
Share on other sites
Bad.boy!

I did that but I can't perform an animation from crouch in script, the player stands automatically up.

Share this post


Link to post
Share on other sites
Blackheart612

Thanks for continuing to do my request... I just recently knew about this thread!

Anyway, are you including sneak here? Just Curious... lol.gif

Share this post


Link to post
Share on other sites
Th3MaN1
Thanks for continuing to do my request... I just recently knew about this thread!

Anyway, are you including sneak here? Just Curious... lol.gif

for now,he has to do the script,there's no point to have the anims if you can't use them.

Share this post


Link to post
Share on other sites
Blackheart612

Right but sneak anim is easier cause you don't need firing in it.

Share this post


Link to post
Share on other sites
Bad.boy!

Does anyone know where the aiming of the player is defined, in the .exe, .dll's or somewhere else?

Share this post


Link to post
Share on other sites
DK22Pac

In .exe, I think.

Hah, just found that on my PC... "Cover System", ha-ha! lol.gif

I know it's crappy, but I was a newbie in animating when I worked on it...

user posted imagebiggrin.gif

Share this post


Link to post
Share on other sites
Th3MaN1

Is that cover system for SA?Looks pretty good

Share this post


Link to post
Share on other sites
Bad.boy!

 

In .exe, I think.

I know it's hard coded, but how to see the part that makes the player fire, I only came this far:

 

 

File 'C:\Program Files (x86)\Rockstar Games\GTA San Andreas\gta_sa.exe': 0:   00000400   00455E00    0x00401000    -R-X   .text 1:   00456200   00000600    0x00857000    -R-X   _rwcseg 2:   00456800   0004B400    0x00858000    -R--   .rdata 3:   004A1C00   00040000    0x008A4000    -RW-   .data 4:   004E1C00   00010C00    0x00C9E000    -RW-   _TEXT_HA 5:   004F2800   00000200    0x00CAF000    -RW-   _rwdseg 6:   004F2A00   00000600    0x00CB0000    -R--   .rsrc 7:   004F3000   00649C00    0x00CB1000    -RWX   .text 8:   00B3CC00   00005A00    0x012FB000    -RWX   .init 9:   00B42600   00254400    0x01301000    -RWX   .data10:   00D96A00   00021000    0x01556000    -RWX   .HOODLUMFile 'WINMM.dll':File 'vorbisfile.dll': 0:   00000400   00000200    0x10001000    -R-X   .text 1:   00000600   00000200    0x10002000    -R--   .rdata 2:   00000800   00000200    0x10003000    -RW-   .data 3:   00000A00   00000200    0x10004000    -R--   .relocFile 'WS2_32.dll':File 'EAX.DLL': 0:   00001000   00022000    0x10001000    -R-X   .text 1:   00023000   00002000    0x10023000    -R--   .rdata 2:   00025000   00005000    0x10025000    -RW-   .data 3:   0002A000   00001000    0x1002C000    -R--   .rsrc 4:   0002B000   00003000    0x1002D000    -R--   .relocFile 'KERNEL32.dll':File 'USER32.dll':File 'GDI32.dll':File 'ADVAPI32.dll':

 

 

and:

 

 

File MapIdx Offset Size Address Name---- -------- -------- ---------- --------------------0: 00000000 00000014 0x00000000 I--- MSDOS Header1: 00000014 0000006C 0x00000000 ---- (undefined)2: 00000080 00000004 0x00000000 I--- PE Magic ("PE\0\0")3: 00000084 00000014 0x00000000 I--- COFF Header4: 00000098 000000E0 0x00000000 I--- COFF Optional Header5: 00000178 0000018C 0x00000000 I--- Section Headers6: 00000304 000000FC 0x00000000 ---- (undefined)7: 00000400 00455E00 0x00401000 -R-X .text8: 00456200 00000600 0x00857000 -R-X _rwcseg9: 00456800 00000378 0x00858000 IR-- IAT Index10: 00456B78 00049B6C 0x00858378 -R-- .rdata11: 004A06E4 000000A0 0x008A1EE4 -R-- Delay Import Descriptor12: 004A0784 00000080 0x008A1F84 -R-- .rdata13: 004A0804 000000C8 0x008A2004 IR-- Import Table14: 004A08CC 0000037C 0x008A20CC -R-- .rdata15: 004A0C48 00000E58 0x008A2448 IR-- Import Data (Hints, Strings)16: 004A1AA0 00000160 0x008A32A0 -R-- .rdata17: 004A1C00 00040000 0x008A4000 -RW- .data18: 004E1C00 00010C00 0x00C9E000 -RW- _TEXT_HA19: 004F2800 00000200 0x00CAF000 -RW- _rwdseg20: 004F2A00 00000520 0x00CB0000 IR-- Resource Table21: 004F2F20 000000E0 0x00CB0520 -R-- .rsrc22: 004F3000 00649C00 0x00CB1000 -RWX .text23: 00B3CC00 00005A00 0x012FB000 -RWX .init24: 00B42600 00254400 0x01301000 -RWX .data25: 00D96A00 00000368 0x01556000 -RWX .HOODLUM26: 00D96D68 0000001C 0x01556368 IRWX Debug Table Index27: 00D96D84 00005600 0x01556384 -RWX .HOODLUM28: 00D9C384 00000069 0x01556384 IRWX CODEVIEW29: 00D9C3ED 0001B613 0x015563ED -RWX .HOODLUM

 

 

As you can see there's a lot of Hoodlum in there, how did he do it?

And there is many hex data that I don't know.

Share this post


Link to post
Share on other sites
DK22Pac

Maybe, try to make different anims with different angles?

Share this post


Link to post
Share on other sites
Bad.boy!

I'm talking about the aiming part while performing the anim.

How did you do that?

Share this post


Link to post
Share on other sites
DK22Pac

Get camera position and camera target points, then perform one of different anims.

Share this post


Link to post
Share on other sites
DK22Pac

I have made firing while-in-air (only for M4 for this time), I think we also can include it to that mod biggrin.gif

user posted image user posted image user posted image

 

{$CLEO .cs}{$I atest_attach.txt}const   M4TIME = [email protected] = object.Create(#COLT45, 0.0, 0.0, -1010.0)0750: set_object [email protected] visibility 0while true   003D:   if       player.Defined(0)   then       if and           not actor.Driving($player_actor)           not actor.Dead($player_actor)           0818: $player_actor in_air           00E1: player 0 pressed_key 17       then           0470: [email protected] = actor $player_actor current_weapon           if               [email protected] == 31           then               if                   [email protected] > M4TIME               then                   0AB1: call_scm_func @ATEST_ATTACH 6 $player_actor attach_to_object [email protected] offset 0.0 0.0 0.0 on_bone 6                   0400: store_coords_to [email protected] [email protected] [email protected] from_object [email protected] with_offset 0.683 -0.035 0.11                   0400: store_coords_to [email protected] [email protected] [email protected] from_object [email protected] with_offset 30.683 -0.035 0.11                   object.PutAt([email protected], 0.0, 0.0, -1010.0)                   06BC: create_M4_shoot_from [email protected] [email protected] [email protected] target [email protected] [email protected] [email protected] energy 1                    09F1: play_audio_at_actor $player_actor event 1157                    058A: create_gun_flash_from [email protected] [email protected] [email protected] to [email protected] [email protected] [email protected]                   [email protected] = 0               end           end       end   endend 

 

atest_attach.txt (scm-function by Ryosuke)

 

goto @end_atest_attach:ATEST_ATTACH0A9F: [email protected] = current_thread_pointer000A: [email protected] += 0x44 0A96: [email protected] = actor [email protected] struct0085: [email protected] = [email protected] // (int) 000A: [email protected] += 0x18 0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 00AA7: call_function 0x734A40 num_params 1 pop 1 [email protected] [email protected] // _clumpGetFirstSkinAtomicHAnimHierarchy0012: [email protected] *= 0x4000A: [email protected] += 0x488 005A: [email protected] += [email protected] // (int) 0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0000A: [email protected] += 0x140A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 00A8D: [email protected] = read_memory 0x7C51E0 size 4 virtual_protect 1 00D6: if 0039: [email protected] == 0x0424548B jf @ATEST_ATTACH_10AA7: call_function 0x7C51E0 num_params 2 pop 2 [email protected] [email protected] [email protected] // _RpHAnimIDGetIndex0AA7: call_function 0x7C5160 num_params 1 pop 1 [email protected] [email protected] // _RpHAnimHierarchyGetMatrixArray0012: [email protected] *= 0x40005A: [email protected] += [email protected] // (int) 0AA5: call 0x7EDDD0 num_params 4 pop 4 [email protected] 1 [email protected] [email protected] @ATEST_ATTACH_2:ATEST_ATTACH_10AA7: call_function 0x7C51A0 num_params 2 pop 2 [email protected] [email protected] [email protected] // _RpHAnimIDGetIndex0AA7: call_function 0x7C5120 num_params 1 pop 1 [email protected] [email protected] // _RpHAnimHierarchyGetMatrixArray0012: [email protected] *= 0x40005A: [email protected] += [email protected] // (int) 0AA5: call 0x7EDD90 num_params 4 pop 4 [email protected] 1 [email protected] [email protected]:ATEST_ATTACH_20177: set_object [email protected] Z_angle_to 0.0 0A98: [email protected] = object [email protected] struct000A: [email protected] += 0x140A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0000A: [email protected] += -0x140AA6: call_method 0x411990 struct [email protected] num_params 0 pop 0 // sub_4119900AA6: call_method 0x59AD20 struct [email protected] num_params 1 pop 0 [email protected] // _CMatrix__copyTo0AA6: call_method 0x4241C0 struct [email protected] num_params 1 pop 0 [email protected] // sub_4241C0000A: [email protected] += 0x180A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0if8039:   not  [email protected] == 0jf @ATEST_ATTACH_3 000A: [email protected] += 0x40A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0000A: [email protected] += 0x100AA6: call_method 0x59AD70 struct [email protected] num_params 1 pop 0 [email protected] // _CMatrix__copyTo:ATEST_ATTACH_3000A: [email protected] += -0x180AA6: call_method 0x532B00 struct [email protected] num_params 0 pop 0 // _RwFrameUpdateObject0AB2: ret 0:end_atest_attach

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

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