Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. Los Santos Drug Wars
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

      1. Guides & Strategies
      2. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

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

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

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

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

    2. Support

    3. Suggestions

script skips part


Bad.boy!
 Share

Recommended Posts

I have a problem with my mission, I set an actor to go to a point, and then check if the actor is there, but the script skips that part for some reason (problem is @NOP_11)

 

Code:

 

:SOLDIER thread "SOLDIER" gosub @MissionStart if  wasted_or_busted then  gosub @MissionFailed end gosub @MissionCleanup end_thread :MissionStart............................... ............................... <-- unrelated to problem...............................Actor.Create([email protected], GANG2, #SHADOWC2, 279.6523, 1859.5697, 8.7578)05D3: AS_actor [email protected] goto_point 277.0436 1857.4543 8.7578 mode 4 2500 ms // versionA Marker.CreateAboveActor([email protected], [email protected])Marker.SetColor([email protected], 1) [email protected] = 0:NOP_9wait [email protected] > 2250jf @NOP_9Camera.SetPosition(271.0302, 1858.5891, 8.7578, 0, 0, 0)Camera.PointAt([email protected], [email protected], [email protected], 2)00BC: show_text_highpriority GXT 'MEXP_10' time 2500 flag [email protected] = 0:NOP_10wait [email protected] > 2500jf @NOP_1004EF: release_animation "GANGS" 02A3: enable_widescreen 0Camera.Restore_WithJumpCut()05D3: AS_actor [email protected] goto_point 277.0436 1857.4543 8.7578 mode 4 -1 ms // versionA :NOP_11wait 0ifnot Actor.Dead([email protected])jf @WOLFDEADwait 0ifnot Actor.Dead([email protected])jf @FRIENDLY_DEAD_1wait 0if00F0:   actor [email protected] 0 near_point 277.0436 1857.4543 radius 3.0 3.0 stopped_on_foot jf @NOP_11 gosub @MissionPassed return :WOLFDEAD00BC: show_text_highpriority GXT 'MEXPF_01' time 500 flag 1wait 500gosub @MissionFailed:FRIENDLY_DEAD_100BC: show_text_highpriority GXT 'MEXPF_03' time 500 flag 1wait 500gosub @MissionFailed:MissionPassedwait 500 01E3: text_1number_styled 'M_PASSD' 0 5000 ms 1 // MISSION PASSED! return :MissionFailed 00BA: text_styled 'M_FAIL' 5000 ms 1 // ~r~MISSION FAILED! return :MissionCleanup09C7: change_player $PLAYER_CHAR model_to #NULL01F0: set_max_wanted_level_to 6 $ONMISSION = 0 // integer values mission_cleanup return 

 

Link to comment
Share on other sites

try

00FE: actor [email protected] sphere 0 in_sphere 277.0436 1857.4543 8.75 radius 3.0 3.0 3.0

instead 00F0:

 

 

BTW. the sub commands are a bit confused

example, if [email protected] is dead, it jumps to label :WOLFDEAD, reads gosub @MissionFailed, then it goes to:FRIENDLY_DEAD_1

and read again gosub @MissionFailed, then it goes to :MissionPassed

 

Better would be:

 

:NOP_11wait 0ifnot Actor.Dead([email protected])jf @WOLFDEADwait 0ifnot Actor.Dead([email protected])jf @FRIENDLY_DEAD_1wait 0if00FE: actor [email protected] sphere 0 in_sphere 277.0436 1857.4543 8.75 radius 3.0 3.0 3.0jf @NOP_11jump @MissionPassed:WOLFDEAD00BC: show_text_highpriority GXT 'MEXPF_01' time 500 flag 1wait 500return:FRIENDLY_DEAD_100BC: show_text_highpriority GXT 'MEXPF_03' time 500 flag 1wait 500return:MissionPassedwait 50001E3: text_1number_styled 'M_PASSD' 0 5000 ms 1 // MISSION PASSED!return:MissionFailed00BA: text_styled 'M_FAIL' 5000 ms 1 // ~r~MISSION FAILED!return:MissionCleanup09C7: change_player $PLAYER_CHAR model_to #NULL01F0: set_max_wanted_level_to 6$ONMISSION = 0 // integer valuesmission_cleanupreturn

 

Edited by ZAZ
Link to comment
Share on other sites

That does make more sense then my gosub, but I thought that I get mission passed if I put just return.

Even with 00FE, the game skips that part. Does anyone know if there's an other way of doing the same thing?

 

EDIT:

I just found out that I'm the biggest retard ever, I forgot to enter the right coords, the current position was the destination.

And I just found out that 04EF: release_animation "GANGS" doesn't actually stop the player from performing an anim, does anyone know how to stop an anim?

 

 

EDIT 2:

found it

 

0792: disembark_instantly_actor $PLAYER_ACTOR

 

Edited by Bad.boy!
Link to comment
Share on other sites

I added some stuff to my script, but it crashes when performing an anim from ped.ifp (loaded all models before this part):

 

Actor.Create([email protected], GANG2, #WMOMIB, 266.7496, 1863.3257, 8.7649)Actor.Angle([email protected]) = 185.261701B2: give_actor [email protected] weapon 62 ammo 120 // Load the weapon model before using this 0605: actor [email protected] perform_animation_sequence "IDLE_armed" IFP_file "PED" 4.0 loop 1 0 0 0 time -1 

 

Link to comment
Share on other sites

I added some stuff to my script, but it crashes when performing an anim from ped.ifp (loaded all models before this part):

 

Actor.Create([email protected], GANG2, #WMOMIB, 266.7496, 1863.3257, 8.7649)Actor.Angle([email protected]) = 185.261701B2: give_actor [email protected] weapon 62 ammo 120 // Load the weapon model before using this 0605: actor [email protected] perform_animation_sequence "IDLE_armed" IFP_file "PED" 4.0 loop 1 0 0 0 time -1 

 

weapon 62 ?

Link to comment
Share on other sites

yeah, I added some weapons and actors, but I've tested the script without the give weapon opcode and the game still crashes.

The game crashes at 0605

Link to comment
Share on other sites

yeah, I added some weapons and actors, but I've tested the script without the give weapon opcode and the game still crashes.

The game crashes at 0605

did you try it with a local less then 32?

is your script a cleo mission or a mission of main.scm?

if main.scm, did you defined the mission in the mission table and start it with 0417:?

and does your main contain this line:

 

0180: set_on_mission_flag_to $ONMISSION

 

Link to comment
Share on other sites

It's a custom mission (cm), the mission still needs lot's of work, but here is the part that I've done:

I made the actors [email protected]+, because I don't want to get confused with which locals I already used when I add stuff.

I also didn't see the marker show up above actor [email protected], but that's a minor issue.

 

EDIT:

Solved I used anim "prtial_gngtlkdD", I mis typed it's "prtial_gngtlkD"

Edited by Bad.boy!
Link to comment
Share on other sites

 

EDIT:

Solved I used anim "prtial_gngtlkdD", I mis typed it's "prtial_gngtlkD"

anyway

 

 

4 reasons in the subscript SPAWNS_1 which let the game crash

 

these animations don't exist:

"prtial_gngtlkdF" IFP_file "GANGS"

"prtial_gngtlkdD" IFP_file "GANGS"

it must be

"prtial_gngtlkf"

and

"prtial_gngtlkd"

 

 

wrong class:

Model.Load([email protected], GANG2, #RANGER3, 316.6678, 1839.6519, 7.734)

it must be

Actor.Create([email protected], GANG2, #RANGER3, 316.6678, 1839.6519, 7.734)

 

weapon 35 is #rocketla which you forget to load

01B2: give_actor [email protected] weapon 35 ammo 4 // Load the weapon model before using this

 

 

i recommand to do the model loadcheck in this way:

 

Model.Load(#SHADOWC1)Model.Load(#SHADOWC2)Model.Load(#SHADOWC3)Model.Load(#SHADOWC4)Model.Load(#SHADOWC5)Model.Load(#FOLEY)Model.Load(#ARMY)Model.Load(#WMOMIB)Model.Load(#WMOSCI)Model.Load(#RANGER1)Model.Load(#RANGER2)Model.Load(#RANGER3)Model.Load(#M416)Model.Load(#M16A4)Model.Load(#rocketla)04ED: load_animation "GANGS":NOP_1wait 0if andModel.Available(#SHADOWC1)Model.Available(#SHADOWC2)Model.Available(#SHADOWC3)Model.Available(#SHADOWC4)Model.Available(#SHADOWC5)Model.Available(#FOLEY)Model.Available(#ARMY)jf @NOP_1:NOP_1await 0if andModel.Available(#WMOMIB)Model.Available(#WMOSCI)Model.Available(#RANGER1)Model.Available(#RANGER2)Model.Available(#RANGER3)Model.Available(#M416)Model.Available(#M16A4)jf @NOP_1a:NOP_1bwait 0if and04EE:   animation "GANGS" loadedModel.Available(#rocketla)jf @NOP_1b

 

Link to comment
Share on other sites

thanks ZAZ, I changed the the model avaible check your way and replaced the model.load with Actor.create

 

About the loading of the models, what way is the best, check if model.avaible or load_requested_models?

Link to comment
Share on other sites

I quote DEJI

 

 

A better version:

 

0247: load_model #FBI0247: load_model #ARMYwhile true  if or      8248:   not model #FBI available      8248:   not model #ARMY available  jf break  wait 0end

 

 

 

This will sit in the while true loop until the models are loaded (if any of the models aren't loaded, wait 0 is run). And if the models happened to already be loaded, no waits are made. Which is much more efficient.

 

OR...

 

0247: load_model #FBI0247: load_model #ARMY038B: load_requested_models

 

 

The game will basically stop everything until all models are loaded (which only takes a little bit of time), then continue. Use this if you're okay with the game lagging for a brief moment. It makes models load faster, above all. And if the screen is faded out then the player won't notice a thing.

 

 

Link to comment
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
 Share

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