Jump to content

A few opcode questions...


Recommended Posts

I have an idea for a simple mod, but I'm not sure if there are any opcodes available for the effects I want.

 

I don't know how flexible opcodes are supposed to be, but this was my idea:

 

For example, this...

0724: set_hunter 114@ follow_and_attack_player $PLAYER_ACTOR radius 50.0

 

...could be changed to something like this?

 

0724: set_hunter 114@ follow_and_attack_actors_type  6 radius 50.0

 

 

And this...

 

0841: flying_vehicle 114@ use_secondary_gun 1

 

...to this?

 

0841: flying_vehicle 114@ use_primary_gun 1

 

 

Basically my idea is to create a backup mod. When the player wanted level is 2 or above, pressing a (previously assigned) key will call a hunter that will attack cops, using its minigun instead of its rockets.

Link to comment
https://gtaforums.com/topic/276283-a-few-opcode-questions/
Share on other sites

 

(which, by the way, is the essence of mission scripting)

I know what you trying to say. wink.gif

 

I couldn't test it before because I didn't have a thread ready to test it in. Anyway, you were right, it crashes the game.

 

Here's what I have right now, it's not the intended final version, but more of a rushed version for testing purposes (I just started to use SANNY, so this is a straight MB>SANNY conversion):

 

:AIRSUP_0003A4: name_thread 'AIRSUP':AIRSUP_010001: wait 500 ms00D6: if 100E1: key_pressed  0  800E1: key_pressed  0  10004D: jump_if_false @AIRSUP_010247: request_model #HUNTER 0247: request_model #WFYPRO:AIRSUP_020001: wait 500 ms00D6: if 10248:   model #HUNTER available0248:   model #WFYPRO available004D: jump_if_false @AIRSUP_0204C4: create_coordinate 3@ 4@ 5@ from_actor $PLAYER_ACTOR offset  0.0 20.0 30.0 00A5: 1@ = create_vehicle #HUNTER at 3@ 4@ 5@  // Load the vehicle model before using this0129: 0@ = create_actor  8 #WFYPRO in_car 1@ driverseat  // Load the ped model before using this0249: release_model #HUNTER 0249: release_model #WFYPRO07AF: 6@ = player $PLAYER_CHAR group0631: put_actor 0@ in_group 6@ 06F0: set_group 6@ separation_range  1000.0 04BA: set_vehicle 1@ speed_instantly  10.0 07CB: set_actor 0@ supporting_group_fire  1 0841: flying_vehicle 1@ use_secondary_gun 10002: jump @AIRSUP_01

 

I tried a workaround by taking the pilot into the player's group, to see if it would support group fire using the vehicle guns.

 

All that happened was the cute pigtailed chick arriving in the hunter, and when I ordered her to attack a random ped, she landed the heli and attacked on foot.

 

The dumbest thing is, I actually have foreseen it. confused.gif

Edited by Krailer
Link to comment
https://gtaforums.com/topic/276283-a-few-opcode-questions/#findComment-4207387
Share on other sites

Well yeah, I actually thought it was funny. biggrin.gif

 

About the opcode to attack actors, there's 0724 but I don't know how it could work with random peds. I'm not sure if I misleaded you, by "ordering to attack a ped" I meant using the already ingame feature (lock-on with fists/melee + attack) which makes all recuited gang members to attack the ped that was locked locked-on.

 

I also ran into another problem, I have dead pilots pilling up on the streets. I already tried to use 0118 to check if actor is dead and 034F to destroy it, still actors don't disappear when killed. I am missing something? dontgetit.gif

Link to comment
https://gtaforums.com/topic/276283-a-few-opcode-questions/#findComment-4208944
Share on other sites

Thanks. smile.gif

 

However it's not working with this other thread I made:

 

:KICKASS103A4: name_thread 'KICK'0247: request_model #WFYPRO:KICKASS20001: wait 300 ms00D6: if 20256:  player $PLAYER_CHAR defined00E1: key_pressed  0  800E1: key_pressed  0  10004D: jump_if_false @KICKASS200D6: if 00248:   model #WFYPRO available004D: jump_if_false @KICKASS204C4: create_coordinate 1@ 2@ 3@ from_actor $PLAYER_ACTOR offset  0.0 5.0 5.0 07AF: 4@ = player $PLAYER_CHAR group009A: 5@ = create_actor #WFYPRO type  8 at  1@ 2@ 3@  // Load the ped model before using this0249: release_model #WFYPRO0631: put_actor 5@ in_group 4@ 07FE: set_actor 5@ fighting_style_to  7  6 0223: set_actor 5@ health_to  300 08AF: set_actor 5@ health_indicator_to  300 035F: set_actor 5@ armour_add  100 :KICKASS30001: wait 300 ms00D6: if 00118:   actor 5@ dead004D: jump_if_false @KICKASS201C2: remove_references_to_actor 5@  // Like turning an actor into a random pedestrian034F: destroy_actor_with_fade 5@  // The actor fades away like a ghost0002: jump @KICKASS2

 

The dead actors never disappear. I also tried using 056D together with 0118, but to no avail. confused.gif

 

But for some reason, it works like this:

 

:KICKASS103A4: name_thread 'KICK'0247: request_model #WFYPRO:KICKASS20001: wait 300 ms00D6: if 20256:  player $PLAYER_CHAR defined00E1: key_pressed  0  800E1: key_pressed  0  10004D: jump_if_false @KICKASS200D6: if 00248:   model #WFYPRO available004D: jump_if_false @KICKASS204C4: create_coordinate 1@ 2@ 3@ from_actor $PLAYER_ACTOR offset  0.0 5.0 5.0 07AF: 4@ = player $PLAYER_CHAR group009A: 5@ = create_actor #WFYPRO type  8 at  1@ 2@ 3@  // Load the ped model before using this0249: release_model #WFYPRO01C2: remove_references_to_actor 5@  // Like turning an actor into a random pedestrian0631: put_actor 5@ in_group 4@ 07FE: set_actor 5@ fighting_style_to  7  6 0223: set_actor 5@ health_to  300 08AF: set_actor 5@ health_indicator_to  300 035F: set_actor 5@ armour_add  100 00D6: if 00118:   actor 5@ dead004D: jump_if_false @KICKASS2034F: destroy_actor_with_fade 5@  // The actor fades away like a ghost0002: jump @KICKASS2

 

Thing is, I don't want the references removed at that stage, because doing so will make the actor attack using a pistol most of the times (like other unnarmed gang members do after being recruited). I tried to bypass that using 2 methods, first by setting the actor's current weapon to 0, then by deleting all items in its possession. Both methods failed, so I even tried to check if current actor's weapon was 0, if not then change to 0, and it still didn't work (it would seem that stuff involving gang weapons is overrided by something else I'm missing). notify.gif

 

Anyway, I still don't get why 01C2 isn't working in the first version. Is it because the references have to be removed before the ped dies?

Link to comment
https://gtaforums.com/topic/276283-a-few-opcode-questions/#findComment-4210468
Share on other sites

it is because the code will actually hit :KICKASS3 only once instantly after the actor is created. the next hit is when you press buttons again but that concerns NEW actor and not anymore the one you created before.

fix the jump destination like that

 

...00E1: key_pressed  0  10004D: jump_if_false @KICKASS3...

 

to arrange some label that is checked per iteration. remember that creating 2 actors with any code like that will render first actor to be "undeletable". you might define some quantity limit for actors active at the moment and sort their handles as array.

and maybe replace order of delete to be 034F then 01C2- it does not actually matter so much but that is more safe i believe.

for code 2: you have to rewrite it or the purpose of it has to be really strange?

when you will have the code ready it will crash at KICKASS3 until you add single check 056D at the beginning of this label.

Edited by PLPynton
Link to comment
https://gtaforums.com/topic/276283-a-few-opcode-questions/#findComment-4211371
Share on other sites

The way that jumps work seemed fairly easy to understand at first, but I see it can be tricky sometimes. Thanks for the explanation. smile.gif

 

I thought about what you said regarding 2 or more actors being created, and in fact, my idea is to spwan a single actor. Here's what I did:

 

:KICKASS103A4: name_thread 'KICK':KICKASS20001: wait 300 ms00D6: if 20256:  player $PLAYER_CHAR defined00E1: key_pressed  0  800E1: key_pressed  0  10004D: jump_if_false @KICKASS5:KICKASS30247: request_model #WFYPRO:KICKASS40001: wait 300 ms00D6: if 00248:   model #WFYPRO available004D: jump_if_false @KICKASS404C4: create_coordinate 1@ 2@ 3@ from_actor $PLAYER_ACTOR offset  0.0 5.0 1.0 07AF: 4@ = player $PLAYER_CHAR group009A: 5@ = create_actor #WFYPRO type  8 at  1@ 2@ 3@  // Load the ped model before using this0631: put_actor 5@ in_group 4@ 07FE: set_actor 5@ fighting_style_to  6  6 0223: set_actor 5@ health_to  300 08AF: set_actor 5@ health_indicator_to  300 0249: release_model #WFYPRO:KICKASS50001: wait 300 ms00D6: if 00118:   actor 5@ dead004D: jump_if_false @KICKASS601C2: remove_references_to_actor 5@  // Like turning an actor into a random pedestrian:KICKASS60001: wait 300 ms00D6: if 0856D:   NOT   carcass_of_actor 5@ valid004D: jump_if_false @KICKASS50002: jump @KICKASS2

 

I made it so that the code gets trapped bewteen labels 5 and 6, to prevent a 2nd actor from being spawned until the first actor is no longer valid, and it works.

 

I also removed 034F as it seemed to be unnecessary, as soon as the actor is turned into a random ped it will fade away when dead, like normal peds do. Or should I keep the opcode just to be safe?

 

By code 2 you mean the last thread I posted, without the 3rd label? It never crashed the game, although it was not intended to be used like that. I was testing the possibility of using 07FE with peds (in this case, pedtype 8), by turning the actor into a random ped and see if the opcode will still have effect (it worked to some extent, actor attacks using assigned fighting style, but draws pistol after attacking a cop, and then keeps the weapon).

 

Just to share some results, there's another approach (in a different thread) I have tried. I used 092B to get the group member and 0237 to set gang weapons to unnarmed. However, recruiting an unnarmed gang member will give him a pistol, so I used 048F and 01B9 (separately) as a countermeasure, but none worked. Then I tried 02D8 to check if actor has pistol and 0555 to remove it. Now this had some strange effects, with most of the recruited members having a pistol, but randomly some being bare-handed (holding a joint) and I was like, yay! But when ordered to attack some ped, they draw a desert eagle and start shooting... notify.gif

Edited by Krailer
Link to comment
https://gtaforums.com/topic/276283-a-few-opcode-questions/#findComment-4211870
Share on other sites

  • 2 weeks later...

Thanks for nice feedback.

 

I wasn't sure if you meant that I had too many waits or not enough defined checks, so I reduced the wait times in some threads and added player defined checks before every keypress. I'm not sure if it's overkill but the code got kinda lenghty...

 

I also had forgot a jf here blush.gif , although not sure if had anything to do with the crashes:

 

:GUARDIAN_70001: wait 250 msif056D:   is 5@ valid_actor_handle01C2: mark_actor_as_no_longer_needed 5@034F: delete_actor 5@ with_fadejump @GUARDIAN_1

 

 

 

Here's how it looks now, any ideas to streamline it a bit?

 

:GUARDIAN03A4: name_thread 'ANGEL':GUARDIAN_1wait 100 msif and0256:   is_player_playing $PLAYER_CHAR 00E1:   is_button_pressed_pad 0 button 8 00E1:   is_button_pressed_pad 0 button 10 jf @GUARDIAN_4:GUARDIAN_20247: request_modelID #WFYBE:GUARDIAN_3wait 250 msif0248:   has_modelID_loaded #WFYBE jf @GUARDIAN_304C4: get_actor $PLAYER_ACTOR position_3D_coord_with_offset 0.0 50.0 1.0 store_to 1@ 2@ 3@ 07AF: get_player $PLAYER_CHAR group_to 4@ 009A: create_actor_pedtype 8 modelID #WFYBE at_3D_coord 1@ 2@ 3@ handle_as 5@ 0249: mark_modelID_as_no_longer_needed #WFYBE 0631: set_group 4@ add_actor 5@ as_member 060F: set_actor 5@ handcombat_accuracy_to 75.0 0223: set_actor 5@ health_to  300 08AF: set_actor 5@ health_indicator_to  300 if8118:   not is_actor 5@ dead jf @GUARDIAN_7:GUARDIAN_4wait 100 msif0256:   is_player_playing $PLAYER_CHAR jf @GUARDIAN_1if and056D:   carcass_of_actor @5 valid00E1:   is_button_pressed_pad 0 button 4 00E1:   is_button_pressed_pad 0 button 5 jf @GUARDIAN_507FE: set_actor 5@ melee_style_to  5  6 :GUARDIAN_5wait 100 msif0256:   is_player_playing $PLAYER_CHAR jf @GUARDIAN_1if and056D:   is 5@ valid_actor_handle 00E1:   is_button_pressed_pad 0 button 4 00E1:   is_button_pressed_pad 0 button 6 jf @GUARDIAN_607FE: set_actor 5@ melee_style_to  6  6 :GUARDIAN_60001: wait 100 msif0256:   is_player_playing $PLAYER_CHAR jf @GUARDIAN_1if and056D:   is 5@ valid_actor_handle 00E1:   is_button_pressed_pad 0 button 4 00E1:   is_button_pressed_pad 0 button 7 jf @GUARDIAN_107FE: set_actor 5@ melee_style_to  7  6 jump @GUARDIAN_1:GUARDIAN_7if056D:   is 5@ valid_actor_handle jf @GUARDIAN_101C2: mark_actor_as_no_longer_needed 5@034F: delete_actor 5@ with_fade jump @GUARDIAN_1

 

Link to comment
https://gtaforums.com/topic/276283-a-few-opcode-questions/#findComment-4236419
Share on other sites

I wasn't sure if you meant that I had too many waits or not enough defined checks, so I reduced the wait times in some threads and added player defined checks before every keypress. I'm not sure if it's overkill but the code got kinda lenghty...

The point is that after every wait, you must have a player defined check before referencing him again. As long as a wait exists, no matter how short, sufficient time has passed for the player to potentially not be defined (and thus referencing him = crash).

 

From a quick glance, you're missing a defined check in :GUARDIAN_1 - see how you've got a wait of 100ms, then suddenly reference the player without first having a check to see if he's defined? There's more examples of this throughout your code, but you get the gist I'm sure.

 

Note that this shouldn't cause a crash unless the player actually isn't defined when he's referenced. Unless you're getting wasted/busted, it won't be the cause of the error.

Link to comment
https://gtaforums.com/topic/276283-a-few-opcode-questions/#findComment-4237184
Share on other sites

Yep, I missed that one, thanks for pointing it out.

 

In the last code that I posted I was running into the same problem as in the first version (spwaning multiple actors), but I already found a way to bypass it without increasing the code too much.

 

Now I'd like to pimp it just a bit by adding cool effects. I could really use some help here 'cause it's my first time messing with particle effects.

 

This was supposed to make the actor do sort of a "ninja style" entry...

 

:GUARDIAN_3Await 250 msif and0256:   is_player_playing $PLAYER_CHAR 0248:   has_modelID_loaded #WFYBE jf @GUARDIAN_3A04C4: get_actor $PLAYER_ACTOR position_3D_coord_with_offset 0.0 50.0 1.0 store_to 1@ 2@ 3@ 07AF: get_player $PLAYER_CHAR group_to 4@ 064B: create_FxSystem "TEARGAS" at_3D_coord 1@ 2@ 3@ FxType 1 handle_as 0@ 064C: play_FxSystem 0@ :GUARDIAN_3Bwait 2000 msif0256:   is_player_playing $PLAYER_CHAR jf @GUARDIAN_3B009A: create_actor_pedtype 8 modelID #WFYBE at_3D_coord 1@ 2@ 3@ handle_as 5@ 0650: delete_FxSystem 0@ //stop emitters and then delete when finished 0631: set_group 4@ add_actor 5@ as_member 060F: set_actor 5@ handcombat_accuracy_to 75.0 0223: set_actor 5@ health_to  300 08AF: set_actor 5@ health_indicator_to  300 0249: mark_modelID_as_no_longer_needed #WFYBE 

 

...the smoke particle was supposed to play for 2 seconds, and dissipate when the actor spwans. Well, it ain't working, as I only get the actor but no smoke at all. What am I missing this time?

 

Another question, is there any opcode that improves the actor's chance of blocking melee attacks? 060F only seems to improve the chance of sucessful hits.

 

Thanks.

Link to comment
https://gtaforums.com/topic/276283-a-few-opcode-questions/#findComment-4237655
Share on other sites

there are two keys in actor block: Attack strength, Defend weakness. i do not recall 060F changes first one or both, try. if not then there is a new opcode needed. look as well at function of 07DD as it has (most probably) effects on handcombat as well.

i suspect there is unknown opcode to declare "use weapon".

 

091C=7,get_actor_within_sphere_with_center_at_3D_coord %1d% %2d% %3d% radius %4d% modelID %5o% external_script_named %6h% handle_as %7d%;In

 

i strongly advise not to use that code. it intercepts dancers or dealers and as they are controlled over external scripts the game might crash when you mess too much with them (killing and most of all deleting).

are you using UDB ini? my sig, download yourself a new version and look at this file, it might dramatically change you approach.

Edited by PLPynton
Link to comment
https://gtaforums.com/topic/276283-a-few-opcode-questions/#findComment-4243252
Share on other sites

I only double posted because editing the previous post doesn't seem to update the topic (last post date wise) and people wouldn't notice that I have updated the info.

 

But yeah, that was my bad, although I can't see how deleting my last post has helped anyone.

 

 

091C=7,get_actor_within_sphere_with_center_at_3D_coord %1d% %2d% %3d% radius %4d% modelID %5o% external_script_named %6h% handle_as %7d%;In

 

i strongly advise not to use that code. it intercepts dancers or dealers and as they are controlled over external scripts the game might crash when you mess too much with them (killing and most of all deleting).

Well, better not to use it then, as the intention is to kill them. But I'm sure this opcode will come in handy, thanks for the hint.

 

And while 08E5 was getting the job done (except for drug dealers interception), it eventually had some undesirable glitches with popcyle peds and traffic.

 

I returned to my previous version of the code and found that 031D works pretty good, I was having issues reseting the actor's weapon to unnarmed because I was missing 0467. blush.gif

 

About the INI, I just downloaded it now, before I was using UDB 14.04.2007.

 

EDIT: I have been using 060F and it really doesn't make any noticeable difference in attack strenght or defend weakness. Higher values for the last parameter will make the actor hit the opponent more effectively, but not necessarily causing more damage per hit. So far the only method I found that (indirectly) improves melee blocking of an actor is to decrease the handcombat accuracy of its opponent (but again, it requires using an interceptor, not to mention a sh*tload of checks).

 

I'm also a bit confused about 07DD effect, so I'll need to test it a bit more. It was first described as setting the aggressiveness/temper of the actor, and now its shooting rate. If the main.scm treats these stats the same way the pedstats.dat does, they can't be the same. Aggressiveness/temper determines how the ped/actor reacts toward a threat (before an eventual fight) and shooting rate determines how actively the ped/actor will fight (higher values make the actor to fight more intensively, but not necessarily more effectively). I'll let you know if I get more conclusive results.

Edited by Krailer
Link to comment
https://gtaforums.com/topic/276283-a-few-opcode-questions/#findComment-4243672
Share on other sites

  • 2 weeks later...

@PLPynton: I tested 07DD and it does affect the shooting/attack rate of the actor, so the last description would to be the most accurate.

 

I'm not sure if I'm trying to include too many features in this mod, but I'm getting a lot of crashes during the game.

 

Here's the updated code:

 

:GUARDIAN03A4: name_thread 'ANGEL':GUARDIAN_10001: wait 100 ms00D6: if 0256:   is_player $PLAYER_CHAR playing 00E1:   is_button_pressed_pad 0 button 800E1:   is_button_pressed_pad 0 button 10 004D: jump_if_false @GUARDIAN_100D6: if and80DF:   not is_actor $PLAYER_ACTOR driving 004D: jump_if_false @GUARDIAN_1:GUARDIAN_20247: load_modelID #OFYRI0247: load_modelID #MICRO_UZI0247: load_modelID #KATANA:GUARDIAN_3A0001: wait 300 ms 00D6: if and0256:   is_player $PLAYER_CHAR playing 0248:   has_modelID #OFYRI loaded 0248:   has_modelID #MICRO_UZI loaded 0248:   has_modelID #KATANA loaded 004D: jump_if_false @GUARDIAN_3A 04C4: get_actor $PLAYER_ACTOR position_3D_coord_with_offset 0.0 4.0 0.0 store_to 0@ 1@ 2@ 04C4: get_actor $PLAYER_ACTOR position_3D_coord_with_offset 0.0 5.0 -1.0 store_to 3@ 4@ 5@ 064B: create_FxSystem "PRT_SMOKE_HUGE" at_3D_coord 0@ 1@ 2@ FxType 1 handle_as 6@ 064C: play_FxSystem 6@ :GUARDIAN_3B0001: wait 1100 ms00D6: if 0256:   is_player $PLAYER_CHAR playing 004D: jump_if_false @GUARDIAN_3B07AF: get_player $PLAYER_CHAR group_to 7@009A: create_actor_pedtype 8 modelID #OFYRI at_3D_coord 3@ 4@ 5@ handle_as 8@ 0650: delete_FxSystem 6@ with_fade 0631: set_group 7@ add_actor 8@ as_member 01B2: set_actor 8@ weapon_to 28 ammo_to 99999 081A: set_actor 8@ weapon_skill_to 2 01B2: set_actor 8@ weapon_to 8 ammo_to 0 01B9: set_actor 8@ armed_weapon_to 0 060F: set_actor 8@ handcombat_accuracy_to 70.0 07DD: set_actor 8@ shooting_rate_to 65 035F: set_actor 8@ armour_add 100 0223: set_actor 8@ health_to 500 08AF: set_actor 8@ health_indicator_to 500 0249: mark_modelID_as_no_longer_needed #OFYRI 0249: mark_modelID_as_no_longer_needed #MICRO_UZI 0249: mark_modelID_as_no_longer_needed #KATANA :HITME_10001: wait 200 ms 00D6: if 0256:   is_player $PLAYER_CHAR playing 004D: jump_if_false @HITME_100D6: if or031D:   has_actor $PLAYER_ACTOR received_damage_type 22 031D:   has_actor $PLAYER_ACTOR received_damage_type 25 031D:   has_actor $PLAYER_ACTOR received_damage_type 28 031D:   has_actor $PLAYER_ACTOR received_damage_type 29 031D:   has_actor $PLAYER_ACTOR received_damage_type 30 031D:   has_actor $PLAYER_ACTOR received_damage_type 31 031D:   has_actor $PLAYER_ACTOR received_damage_type 32 004D: jump_if_false @HITME_20002: jump @QUICKDRAW:HITME_20001: wait 200 ms 00D6: if 0256:   is_player $PLAYER_CHAR playing 004D: jump_if_false @HITME_200D6: if 8118:   not is_actor 8@ dead 004D: jump_if_false @REQUIEM00D6: if or031D:   has_actor 8@ received_damage_type 22 031D:   has_actor 8@ received_damage_type 25 031D:   has_actor 8@ received_damage_type 28 031D:   has_actor 8@ received_damage_type 29 031D:   has_actor 8@ received_damage_type 30 031D:   has_actor 8@ received_damage_type 31 031D:   has_actor 8@ received_damage_type 32 004D: jump_if_false @FIGHT_LS:QUICKDRAW0001: wait 200 ms 00D6: if 0256:   is_player $PLAYER_CHAR playing 004D: jump_if_false @QUICKDRAW00D6: if 8118:   not is_actor 8@ dead 004D: jump_if_false @REQUIEM00D6: if 82D8:   not is_actor 8@ currentweapon 28 004D: jump_if_false @FIGHT_LS01B9: set_actor 8@ armed_weapon_to 28 :FIGHT_LS0001: wait 200 ms 00D6: if and0256:   is_player $PLAYER_CHAR playing 00E1:   is_button_pressed_pad 0 button 4 004D: jump_if_false @FIGHT_SF0467: set_actor $PLAYER_ACTOR clear_last_weapon_damage 00D6: if 8118:   not is_actor 8@ dead 004D: jump_if_false @REQUIEM0467: set_actor 8@ clear_last_weapon_damage 07FE: set_actor 8@ melee_style_to 5 6 00D6: if 82D8:   not is_actor 8@ currentweapon 0 004D: jump_if_false @FIGHT_SF01B9: set_actor 8@ armed_weapon_to 0 :FIGHT_SF0001: wait 200 ms 00D6: if and0256:   is_player $PLAYER_CHAR playing 00E1:   is_button_pressed_pad 0 button 16 004D: jump_if_false @FIGHT_LV0467: set_actor $PLAYER_ACTOR clear_last_weapon_damage 00D6: if 8118:   not is_actor 8@ dead 004D: jump_if_false @REQUIEM0467: set_actor 8@ clear_last_weapon_damage 07FE: set_actor 8@ melee_style_to 6 6 00D6: if 82D8:   not is_actor 8@ currentweapon 0 004D: jump_if_false @FIGHT_LV01B9: set_actor 8@ armed_weapon_to 0 :FIGHT_LV0001: wait 200 ms 00D6: if and0256:   is_player $PLAYER_CHAR playing 00E1:   is_button_pressed_pad 0 button 11 004D: jump_if_false @SLICENDICE0467: set_actor $PLAYER_ACTOR clear_last_weapon_damage 00D6: if 8118:   not is_actor 8@ dead 004D: jump_if_false @REQUIEM0467: set_actor 8@ clear_last_weapon_damage 07FE: set_actor 8@ melee_style_to 7 6 00D6: if 82D8:   not is_actor 8@ currentweapon 0 004D: jump_if_false @SLICENDICE01B9: set_actor 8@ armed_weapon_to 0 :SLICENDICE0001: wait 200 ms 00D6: if and0256:   is_player $PLAYER_CHAR playing 00E1:   is_button_pressed_pad 0 button 5 00E1:   is_button_pressed_pad 0 button 7 004D: jump_if_false @HITME_10467: set_actor $PLAYER_ACTOR clear_last_weapon_damage 00D6: if 8118:   not is_actor 8@ dead 004D: jump_if_false @REQUIEM0467: set_actor 8@ clear_last_weapon_damage 00D6: if 82D8:   not is_actor 8@ currentweapon 8 004D: jump_if_false @HITME_101B9: set_actor 8@ armed_weapon_to 8 0002: jump @HITME_1:REQUIEM0001: wait 0 ms 056D:   is 8@ valid_actor_handle 004D: jump_if_false @GUARDIAN_101C2: mark_actor_as_no_longer_needed 8@ 0002: jump @GUARDIAN_1

 

 

Any ideas about what may be causing the crashes?

 

Edit:The game crashes mostly during gameplay (after a couple of minutes, more or less). It crashed sometimes right after loading, but I think the main.scm got corrupted somehow. since reinstalling SA solved that issue. It still crashes during gameplay, though.

 

Thanks.

Edited by Krailer
Link to comment
https://gtaforums.com/topic/276283-a-few-opcode-questions/#findComment-4261564
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 0 User Currently Viewing
    0 members, 0 Anonymous, 0 Guests

×
×
  • Create New...

Important Information

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