Bad.boy! Posted June 3, 2011 Share Posted June 3, 2011 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) 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. Link to comment Share on other sites More sharing options...
spaceeinstein Posted June 3, 2011 Share Posted June 3, 2011 The trick to that mission is to just use 06BC. The SWAT guy is not really shooting, it's a script-generated bullet. Link to comment Share on other sites More sharing options...
Th3MaN1 Posted June 4, 2011 Share Posted June 4, 2011 How's the progress? Link to comment Share on other sites More sharing options...
Bad.boy! Posted June 4, 2011 Author Share Posted June 4, 2011 uhhm, I'm working on the crouch, because to the left is.... (just watch the picture) Link to comment Share on other sites More sharing options...
Th3MaN1 Posted June 4, 2011 Share Posted June 4, 2011 (edited) lolz,that looks like max payne(kinda) Edited June 5, 2011 by Th3MaN1 Link to comment Share on other sites More sharing options...
Bad.boy! Posted June 7, 2011 Author Share Posted June 7, 2011 Little progress, I have to fix some things Link to comment Share on other sites More sharing options...
Michael2Corleone Posted June 7, 2011 Share Posted June 7, 2011 this looks good i was woundering if it's allready made cover/blind fireing mod Link to comment Share on other sites More sharing options...
Th3MaN1 Posted June 8, 2011 Share Posted June 8, 2011 michael2corleone the work is in progress,but when it's ready,it's gonna be cool Link to comment Share on other sites More sharing options...
Th3MaN1 Posted June 13, 2011 Share Posted June 13, 2011 Progress? Link to comment Share on other sites More sharing options...
Bad.boy! Posted June 14, 2011 Author Share Posted June 14, 2011 It isn't dead, I have more then this mod to do. The anim to the right will be finished this/next week. Link to comment Share on other sites More sharing options...
Th3MaN1 Posted June 14, 2011 Share Posted June 14, 2011 I'm happy to hear that the right anim will not take more than a week. Link to comment Share on other sites More sharing options...
BnB Posted June 20, 2011 Share Posted June 20, 2011 It isn't dead, I have more then this mod to do. The anim to the right will be finished this/next week. Ok then please tell us what is your estimated release for this mod? Can't you guess. Link to comment Share on other sites More sharing options...
Th3MaN1 Posted June 20, 2011 Share Posted June 20, 2011 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. Link to comment Share on other sites More sharing options...
Bad.boy! Posted June 20, 2011 Author Share Posted June 20, 2011 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 Link to comment Share on other sites More sharing options...
Th3MaN1 Posted June 21, 2011 Share Posted June 21, 2011 No problem,just work on your mod.I can wait. Link to comment Share on other sites More sharing options...
Bad.boy! Posted June 21, 2011 Author Share Posted June 21, 2011 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 Link to comment Share on other sites More sharing options...
Mickey2Rufus Posted June 22, 2011 Share Posted June 22, 2011 wish i had the skills to help you. but good luck and take as long as you want Link to comment Share on other sites More sharing options...
DK22Pac Posted June 22, 2011 Share Posted June 22, 2011 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, ...) Link to comment Share on other sites More sharing options...
Bad.boy! Posted June 23, 2011 Author Share Posted June 23, 2011 I did that but I can't perform an animation from crouch in script, the player stands automatically up. Link to comment Share on other sites More sharing options...
Blackheart612 Posted June 25, 2011 Share Posted June 25, 2011 Thanks for continuing to do my request... I just recently knew about this thread! Anyway, are you including sneak here? Just Curious... Link to comment Share on other sites More sharing options...
Th3MaN1 Posted June 25, 2011 Share Posted June 25, 2011 Thanks for continuing to do my request... I just recently knew about this thread! Anyway, are you including sneak here? Just Curious... for now,he has to do the script,there's no point to have the anims if you can't use them. Link to comment Share on other sites More sharing options...
Blackheart612 Posted June 25, 2011 Share Posted June 25, 2011 Right but sneak anim is easier cause you don't need firing in it. Link to comment Share on other sites More sharing options...
Bad.boy! Posted June 25, 2011 Author Share Posted June 25, 2011 Does anyone know where the aiming of the player is defined, in the .exe, .dll's or somewhere else? Link to comment Share on other sites More sharing options...
DK22Pac Posted June 25, 2011 Share Posted June 25, 2011 In .exe, I think. Hah, just found that on my PC... "Cover System", ha-ha! I know it's crappy, but I was a newbie in animating when I worked on it... Link to comment Share on other sites More sharing options...
Th3MaN1 Posted June 26, 2011 Share Posted June 26, 2011 Is that cover system for SA?Looks pretty good Link to comment Share on other sites More sharing options...
Bad.boy! Posted June 26, 2011 Author Share Posted June 26, 2011 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. Link to comment Share on other sites More sharing options...
DK22Pac Posted June 26, 2011 Share Posted June 26, 2011 Maybe, try to make different anims with different angles? Link to comment Share on other sites More sharing options...
Bad.boy! Posted June 26, 2011 Author Share Posted June 26, 2011 I'm talking about the aiming part while performing the anim. How did you do that? Link to comment Share on other sites More sharing options...
DK22Pac Posted June 26, 2011 Share Posted June 26, 2011 Get camera position and camera target points, then perform one of different anims. Link to comment Share on other sites More sharing options...
DK22Pac Posted June 26, 2011 Share Posted June 26, 2011 I have made firing while-in-air (only for M4 for this time), I think we also can include it to that mod {$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 Link to comment Share on other sites More sharing options...
Recommended Posts