Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. The Contract
      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. GTA San Andreas

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

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

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    4. Bugs*

    1. Grand Theft Auto Series

      1. 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. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    6. 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

      1. GTANet 20th Anniversary
    2. Support

    3. Suggestions

Mission won't start when entering Sphere


bbxhnr
 Share

Recommended Posts

Hello Everybody,

i am bbxhnr and i am new to this Forum, so I am sorry if i post in the wrong section or if this question has been answered before.

 

The Game im trying to modify is GTA SA

 

 

 

 

EDIT 2:

IMPORTANT!!! Read my next post, i kinda "debugged" the code below that i started with but it still doesn't work as i want it to. I recommend reading this first post in order to understand my Situation.. Further Explanation in Next Post.

 

Now to the problem, i scripted a simple Main.scm with Two Missions being loaded from the "Mission Sniffer"

 

This the beginning of my Main.Scm

 

DEFINE MISSIONS 3DEFINE MISSION 0 AT @INITIALDEFINE MISSION 1 AT @TUT_MISSION_1DEFINE MISSION 2 AT @MISSION_2

 

Then comes this Main Part and after it comes the "Sniffer"

This is what it looks like:

 

:TUT_MISSIONS_SNIFFERthread "TUT_SNIFF"// Mission 1$MARKER_SWEET_HOUSE = Marker.CreateIconAndSphere(42, $X_SWEET_HOUSE, $Y_SWEET_HOUSE, $Z_SWEET_HOUSE)repeatwait $DEFAULT_WAIT_TIMEif andplayer.Defined($PLAYER_CHAR)$ONMISSION == 0thenif and00FF: actor $PLAYER_ACTOR sphere 0 in_sphere $X_SWEET_HOUSE $Y_SWEET_HOUSE $Z_SWEET_HOUSE radius 1.0 1.0 2.0 on_footPlayer.Controllable($PLAYER_CHAR)$TUT_MISSIONS_PASSED == 0 // If The Player stands in the Sphere in front of Sweets House and there are 0 Missions passed so far then do the followingthen$ONMISSION = 100BA: show_text_styled GXT 'INTRO_1' time 1000 style 2 // Big Smokestart_mission 1endenduntil $TUT_MISSIONS_PASSED == 1marker.Disable($MARKER_SWEET_HOUSE)// If TUT_MISSIONS_PASSED == 1 Create another Icon & Sphere at Ryders House$MARKER_RYDER_HOUSE = Marker.CreateIconAndSphere(42, $X_RYDER_HOUSE, $Y_RYDER_HOUSE, $Z_RYDER_HOUSE)repeatwait $DEFAULT_WAIT_TIMEif andplayer.Defined($PLAYER_CHAR)$ONMISSION == 0thenif and00FF: actor $PLAYER_ACTOR sphere 0 in_sphere $X_RYDER_HOUSE $Y_RYDER_HOUSE $Z_RYDER_HOUSE radius 1.0 1.0 2.0 on_footPlayer.Controllable($PLAYER_CHAR)$TUT_MISSIONS_PASSED == 1 // If The Player stands in the Sphere in front of SWEET House and there are 1 Missions passed so far then do the followingthen$ONMISSION = 100BA: show_text_styled GXT 'INTRO_2' time 1000 style 2 // Ryderstart_mission 2endenduntil $TUT_MISSIONS_PASSED == 2 // Repeat the Code Above until the Second Mission is passedmarker.Disable($MARKER_RYDER_HOUSE)// Now Both Missions are finishedend_thread

When CJ walks into the first Sphere at Sweets House everything works fine, the mission is loaded and when you finish the Mission a Sphere is created at Ryders House.

 

But when i walk into the sphere at Ryders House nothing happens,

how do i have to write the code so that the second Mission starts when you walk into the sphere in front of Ryders house?

 

Here the Mission Parts just for Debugging reasons:


//-------------Mission 0---------------:INITIAL$TUT_MISSIONS_PASSED = 0$ONMISSION = 0$X_SWEET_HOUSE = 2516.019$Y_SWEET_HOUSE = -1673.9849$Z_SWEET_HOUSE = 13.8766$X_RYDER_HOUSE = 2472.1741$Y_RYDER_HOUSE = -1687.0452$Z_RYDER_HOUSE = 13.5078end_thread//-------------Mission 1---------------// Mission wrapper:TUT_MISSION_1thread 'TUT 1'gosub @TUT_MISSION_1_MAINif wasted_or_bustedthengosub @TUT_MISSION_1_FAILendgosub @TUT_MISSION_1_CLEANUPend_thread//-------------------------------------:TUT_MISSION_1_MAIN//Load modelsmodel.Load(#m4)model.Load(#BFYST)model.Load(#BMYST)model.Load(#TAMPA)038B: load_requested_models:TUT_MISSION_1_LOADwait 0 msif andmodel.Available(#m4)model.Available(#BMYST)model.Available(#BFYST)model.Available(#TAMPA)004D: jump_if_false @TUT_MISSION_1_LOAD01B2: give_actor $PLAYER_ACTOR weapon 31 ammo 10000 // Load the weapon model before using this01B9: set_actor $PLAYER_ACTOR armed_weapon_to 310674: set_car_model #TAMPA numberplate "PATRICK_"$car_num = car.Create(#TAMPA,2488.56, -1666.84, 13.38)$victim = Actor.Create(CIVFEMALE, #BFYST, 2488.56, -1656.84, 13.38)$innocent = Actor.Create(CIVMALE, #BMYST, 2490.56, -1656.84, 13.38)0187: $victim_marker = create_marker_above_actor $victimrepeatwait 0 msif actor.Dead($innocent)thenjump @TUT_MISSION_1_FAILenduntil actor.Dead($victim):TUT_MISSION_1_PASSED0394: play_music 1$TUT_MISSIONS_PASSED += 1Player.Money($PLAYER_CHAR) += 1000001E3: show_text_1number_styled GXT 'M_PASS' number 10000 time 5000 style 1 // MISSION PASSED!~n~~w~$~1~return//-------------------------------------:TUT_MISSION_1_FAIL00BA: show_text_styled GXT 'M_FAIL' time 5000 style 1 // ~r~MISSION FAILED!// Hier kun je alles kwijt wat moet gebeuren als de missie gefaald is. Bv. bepaalde dingen weer terugdraaien0555: remove_weapon 31 from_actor $PLAYER_ACTORreturn//-------------------------------------:TUT_MISSION_1_CLEANUP$ONMISSION = 0// Hier komt alle code om dingen op te ruimen die voor de missie zijn geladen// En om speciale settings voor deze missie terug te zetten naar normaalMarker.Disable($victim_marker)010D: set_player $PLAYER_CHAR wanted_level_to 0model.Destroy(#BFYST)model.Destroy(#BMYST)model.Destroy(#M4)mission_cleanupreturn//-------------Mission 2---------------// Mission wrapper // Label for Mission 2 Wrapper:MISSION_2 // Create Thread Tut 2thread 'TUT 2' // First Gosub to :Mission_2_Main then after return continues below this linegosub @MISSION_2_MAIN // If Wasted Or Bustedif wasted_or_busted // Then do the Followingthen // Second Gosub to :Mission_2_Fail then after return continues below this linegosub @MISSION_2_FAIL // endend // Third Gosub to :Mission_2_Cleanup after return continues below this linegosub @MISSION_2_CLEANUP // end_threadend_thread//------------------------------------- // First Gosub sends us here:MISSION_2_MAIN // Label Mission_2_Mainmodel.Load(#m4) // Load Model of M4 Gunmodel.Load(#BMYST)model.Load(#BFYST):MISSION_2_LOAD // Label TUT_MISSION_2_LOAD for checking if Models are availablewait 0 msif and // If the following is true continue with the code:model.Available(#m4)model.Available(#BMYST)model.Available(#BFYST)004D: jump_if_false @MISSION_2_LOAD // If the above is false jump to TUT_MISSION_1_Load01B2: give_actor $PLAYER_ACTOR weapon 31 ammo 10000 // Load the weapon model before using this // Give the Actor defined by the Variable Player Actor the Weapon labeled Nr. 31 (M4 GUN) with 1000 Ammo01B9: set_actor $PLAYER_ACTOR armed_weapon_to 31$victim = Actor.Create(CIVFEMALE, #BFYST, 2488.56, -1656.84, 13.38) // Define a Variable that Creates an Actor with the Model Black Young Female at XYZ$innocent = Actor.Create(CIVMALE, #BMYST, 2490.56, -1656.84, 13.38) // Define a Variable that creates an innocent Actor with the Model Young Black Male at XYZ0187: $victim_marker = create_marker_above_actor $victim // Define a Variable that creates a Marker above the Actor "Victim"repeatwait 0 ms // (2) Repeat the following:if actor.Dead($innocent) // If the Innocent Actor is Deadthen // then do the following:jump @MISSION_2_FAIL // jump @MISSION_2_Failend // enduntil actor.Dead($victim) // (2) Until the Actor "Victim" is dead//-------------------------------------:MISSION_2_PASSED // Label Mission_2_PassedPlayer.Money($PLAYER_CHAR) += 10000$TUT_MISSIONS_PASSED += 1 // Give The Player + 1000 Money01E3: show_text_1number_styled GXT 'M_PASS' number 10000 time 5000 style 1 // MISSION PASSED!~n~~w~$~1~ // Show Text Mission Passed// This subroutine is executed when the mission is passed.// Give the rewards, and make new missions available if needed.return // Return to First Gosub//------------------------------------- // Second Gosub sends us here:MISSION_2_FAIL // Label Mission_2_Fail00BA: show_text_styled GXT 'M_FAIL' time 5000 style 1 // ~r~MISSION FAILED! // Show Text Mission Failed0555: remove_weapon 31 from_actor $PLAYER_ACTOR // Remove Weapon Nr. 31 (M4) from Player (it was given to us above)// This subroutine is executed when the mission fails. // return to second gosubreturn//------------------------------------- // Third Gosub sends us here:MISSION_2_CLEANUP // Label Mission_2_Cleanup$ONMISSION = 0 // Set Onmission Status to Not on a mission// Hier komt alle code om dingen op te ruimen die voor de missie zijn geladen // Nederlands for Here comes all Code that you want to be cleaned up before the Mission starts// En om speciale settings voor deze missie terug te zetten naar normaal // Nederlands for All Special Settings that where declared before this mission will be reset to normalMarker.Disable($victim_marker) // Disable the Marker over Victims head010D: set_player $PLAYER_CHAR wanted_level_to 0 // Set the Players wanted Level to 0model.Destroy(#BMYST) // Destroy the Model Black Young Femalemodel.Destroy(#BFYST) // Destroy the Model Black Young Malemodel.Destroy(#M4) // Destroy the Model M4 Gunmission_cleanup // Command to cleanup and End the Missionreturn

 

I would really appreciate it if someone could help me with this

 

 

 

 

 

 

 

EDIT:

 

I altered the "Sniffer" a little bit, effect is still the same, CJ can enter the first sphere and start the first mission, but when he enters the second sphere still nothing happens.

Here the altered "Sniffer"

:MissionTrigger repeat 0001: wait 0 ms 00D6: if 0038:   $ONMISSION == 0 004D: jump_if_false @MissionTriggerEnd 00D6: if 00FF:   actor $PLAYER_ACTOR sphere 0 in_sphere $X_SWEET_HOUSE $Y_SWEET_HOUSE $Z_SWEET_HOUSE radius 1.0 1.0 2.0 on_foot 004D: jump_if_false @MissionTriggerEnd 00BA: show_text_styled GXT 'INTRO_1' time 1000 style 2  // Big Smoke 0417: start_mission 1 0004: $ONMISSION = 1  until $TUT_MISSIONS_PASSED = 1marker.Disable($MARKER_SWEET_HOUSE)if$TUT_MISSIONS_PASSED = 1$MARKER_RYDER_HOUSE = Marker.CreateIconAndSphere(42, $X_RYDER_HOUSE, $Y_RYDER_HOUSE, $Z_RYDER_HOUSE)  repeat 0001: wait 0 ms 00D6: if 0038:   $ONMISSION == 0 004D: jump_if_false @MissionTriggerEnd 00D6: if 00FF:   actor $PLAYER_ACTOR sphere 0 in_sphere $X_RYDER_HOUSE $Y_RYDER_HOUSE $Z_RYDER radius 1.0 1.0 2.0 on_foot 004D: jump_if_false @MissionTriggerEnd 00BA: show_text_styled GXT 'INTRO_1' time 1000 style 2  // Again Big Smoke 0417: start_mission 2 0004: $ONMISSION = 1  until $TUT_MISSIONS_PASSED = 2marker.Disable($MARKER_RYDER_HOUSE)    :MissionTriggerEnd jump @MissionTrigger 

EDIT 2:

IMPORTANT!!! Read my next post, i kinda "debugged" the code above that i started with but it still doesn't work as i want it to. Further Explanation in Next Post (I recommend reading this first post in order to understand my Situation.)

 

 

Edited by bbxhnr
Link to comment
Share on other sites

Please post also the main part, we need to see if there's this code: 0180: set_on_mission_flag_to $ONMISSION and the startcode for mission 0 as well as the declaration of $DEFAULT_WAIT_TIME

 

Link to comment
Share on other sites

 

 

Please post also the main part, we need to see if there's this code: 0180: set_on_mission_flag_to $ONMISSION and the startcode for mission 0 as well as the declaration of $DEFAULT_WAIT_TIME

Here is the Main Part you asked for:

 

DEFINE MISSIONS 3                                                                                                                      // Set Total Mission Count to 3DEFINE MISSION 0 AT @INITIAL                                                                                                           // Set First Mission 0 to :InitialDEFINE MISSION 1 AT @TUT_MISSION_1                                                                                                     // Set Second Mission 1 to :Tut_Mission 1DEFINE MISSION 2 AT @MISSION_2                                                                                                         // Set Third Mission 2 to :Mission_2DEFINE EXTERNAL_SCRIPTS 0 // Use -1 in order not to compile AAA script//DEFINE SCRIPT {NAME}  AT {LABEL} @DEFINE UNKNOWN_EMPTY_SEGMENT 0DEFINE UNKNOWN_THREADS_MEMORY 0 var $PLAYER_CHAR: Playerend // var03A4: name_thread 'MAIN'01F0: set_max_wanted_level_to 60111: toggle_wasted_busted_check 000C0: set_current_time_hours_to 8 minutes_to 004E4: unknown_refresh_game_renderer_at 2488.56 -1666.8403CB: set_rendering_origin_at 2488.56 -1666.84 13.380053: $PLAYER_CHAR = create_player #NULL at 2488.56 -1666.84 13.3801F5: $PLAYER_ACTOR = create_player_actor $PLAYER_CHAR07AF: $PLAYER_GROUP = player $PLAYER_CHAR group0373: set_camera_directly_behind_player01B6: set_weather 00001: wait 0 ms087B: set_player $PLAYER_CHAR clothes_texture "PLAYER_FACE" model "HEAD" body_part 1087B: set_player $PLAYER_CHAR clothes_texture "JEANSDENIM" model "JEANS" body_part 2087B: set_player $PLAYER_CHAR clothes_texture "SNEAKERBINCBLK" model "SNEAKER" body_part 3087B: set_player $PLAYER_CHAR clothes_texture "VEST" model "VEST" body_part 0070D: rebuild_player $PLAYER_CHAR01B4: toggle_player $PLAYER_CHAR can_move 1016A: fade 1 time 004BB: select_interior 00629: change_integer_stat 181 to 4                                                                                                      // Make all Islands Accesible016C: restart_if_wasted_at 2027.77 -1420.52 15.99 angle 137.0 town_number 0016D: restart_if_busted_at 1550.68 -1675.49 14.51 angle 90.0 town_number 00180: set_on_mission_flag_to $ONMISSION // Note: your missions have to use the variable defined here0004: $DEFAULT_WAIT_TIME = 250                                                                                                          // Define Default Wait Time to 25003E6: remove_text_box0417: start_mission 0  // Initial                                                                                                       // Start Mission 0 Now   wait 0

 

I have now modified the Script so that it "works" the way i want it to, but then there happens a very weird thing...

Here is the full Script:

http://pastebin.com/yKGvVDBA

Notice that

 

:MissionTriggerthread "Mis_Trig"$MARKER_SWEET_HOUSE = Marker.CreateIconAndSphere(42, $X_SWEET_HOUSE, $Y_SWEET_HOUSE, $Z_SWEET_HOUSE)repeat 0001: wait 0 ms    if and player.Defined($PLAYER_CHAR) $ONMISSION == 0 then   if and 00FF:   actor $PLAYER_ACTOR sphere 0 in_sphere $X_SWEET_HOUSE $Y_SWEET_HOUSE $Z_SWEET_HOUSE radius 1.0 1.0 2.0 on_foot Player.Controllable($PLAYER_CHAR) $TUT_MISSIONS_PASSED == 0then      $ONMISSION = 1      00BA: show_text_styled GXT 'INTRO_1' time 1000 style 2  // Big Smoke     start_mission 1endend until $TUT_MISSIONS_PASSED == 1marker.Disable($MARKER_SWEET_HOUSE)  $MARKER_RYDER_HOUSE = Marker.CreateIconAndSphere(42, $X_RYDER_HOUSE, $Y_RYDER_HOUSE, $Z_RYDER_HOUSE)repeat 0001: wait 0 ms    if and player.Defined($PLAYER_CHAR) $ONMISSION == 0 then   if and 00FF:   actor $PLAYER_ACTOR sphere 0 in_sphere $X_RYDER_HOUSE $Y_RYDER_HOUSE $Z_RYDER_HOUSE radius 1.0 1.0 2.0 on_foot Player.Controllable($PLAYER_CHAR) $TUT_MISSIONS_PASSED == 1then      $ONMISSION = 1      00BA: show_text_styled GXT 'INTRO_1' time 1000 style 2  // Big Smoke     start_mission 2endend until $TUT_MISSIONS_PASSED == 1  // This Script only Works if I set this Value to 1, i thought this was supposed to be set to 2 but then this won't work, why is that so?marker.Disable($MARKER_RYDER_HOUSE)end_thread

 

As commented out above if the Player passes the second mission the repeat command will stop and the Marker created at "RYDER_HOUSE" will be disabled

but why do i have to set the Value to 1 in order for the script to work, when i set it to 2 the command line never passes below this repeat until command... very weird

 

I then tried to insert the Code from the first Pastebin Link into another Script. it still doesn't work as i suppose, when i start the second mission more than only 1 victim and 1 innocent ped spawn instead of just 1 innocent and 1 victim.

Here is the full second script

http://pastebin.com/vUaJw6xU

Notice that here:

 

:MissionTriggerthread "Mis_Trig"  $MARKER_SWEET_HOUSE = Marker.CreateIconAndSphere(42, $X_SWEET_HOUSE, $Y_SWEET_HOUSE, $Z_SWEET_HOUSE)repeat 0001: wait 0 ms    if and player.Defined($PLAYER_CHAR) $ONMISSION == 0 then   if and 00FF:   actor $PLAYER_ACTOR sphere 0 in_sphere $X_SWEET_HOUSE $Y_SWEET_HOUSE $Z_SWEET_HOUSE radius 1.0 1.0 2.0 on_foot Player.Controllable($PLAYER_CHAR) $TUT_MISSIONS_PASSED == 0then      $ONMISSION = 1      00BA: show_text_styled GXT 'INTRO_1' time 1000 style 2  // Big Smoke     start_mission 2endend until $TUT_MISSIONS_PASSED == 1marker.Disable($MARKER_SWEET_HOUSE)  $MARKER_RYDER_HOUSE = Marker.CreateIconAndSphere(42, $X_RYDER_HOUSE, $Y_RYDER_HOUSE, $Z_RYDER_HOUSE)repeat 0001: wait 0 ms    if and player.Defined($PLAYER_CHAR) $ONMISSION == 0 then   if and 00FF:   actor $PLAYER_ACTOR sphere 0 in_sphere $X_RYDER_HOUSE $Y_RYDER_HOUSE $Z_RYDER_HOUSE radius 1.0 1.0 2.0 on_foot Player.Controllable($PLAYER_CHAR) $TUT_MISSIONS_PASSED == 1then      $ONMISSION = 1      00BA: show_text_styled GXT 'INTRO_2' time 1000 style 2  // RYDER     start_mission 3endend until $TUT_MISSIONS_PASSED == 2 // Here I suddenly have to change the Value to 2 or it won't work.marker.Disable($MARKER_RYDER_HOUSE)end_thread

 

When i set $TUT_MISSIONS_PASSED == 1 then the Code never goes beyond that Line but keeps repeating.

so i changed it to 2 and now it works like this:

More than 1 Victim Peds and more than 1 Innocent Peds will be spawned and when i shoot all victims or innocents the mission will be either succesful or fail.

when the mission succeeds the Second Mission Marker wont get disabled and when I enter the "extra" sphere nothing happens also.

 

This leaves me very confused...

when i comment certain lines out like the Greenwoogenerator or the Cutscene then sometimes everything would just work fine, but then when i uncommented these lines again nothing would work, i then tried to recompile the script in many different variations but none of those gave me a hint to what could causing these problems because everytime something weird like this happened.

Oh and i also noticed that when i run the last script then the GREENWOO Car won't be spawned, eventhough the command is clearly sent in the Initial Thread.

Also i want to say that my coding skills arn't that advanced but still i try to progress.

Edited by bbxhnr
Link to comment
Share on other sites

When i set $TUT_MISSIONS_PASSED == 1 then the Code never goes beyond that Line but keeps repeating.

This isn't "SET" but it's a "check"

distinguish following:

 

2 equals signs for a conditional check

if    $TUT_MISSIONS_PASSED == 0then    <code>end

1 equals sign to set or declare the content of a var

$TUT_MISSIONS_PASSED = 0

you already made this mistake in the edit of your first post, click spoiler

 

 

EDIT:

 

I altered the "Sniffer" a little bit, effect is still the same, CJ can enter the first sphere and start the first mission, but when he enters the second sphere still nothing happens.

Here the altered "Sniffer"

:MissionTrigger repeat 0001: wait 0 ms 00D6: if 0038:   $ONMISSION == 0 004D: jump_if_false @MissionTriggerEnd 00D6: if 00FF:   actor $PLAYER_ACTOR sphere 0 in_sphere $X_SWEET_HOUSE $Y_SWEET_HOUSE $Z_SWEET_HOUSE radius 1.0 1.0 2.0 on_foot 004D: jump_if_false @MissionTriggerEnd 00BA: show_text_styled GXT 'INTRO_1' time 1000 style 2  // Big Smoke 0417: start_mission 1 0004: $ONMISSION = 1 until $TUT_MISSIONS_PASSED = 1marker.Disable($MARKER_SWEET_HOUSE)if$TUT_MISSIONS_PASSED = 1$MARKER_RYDER_HOUSE = Marker.CreateIconAndSphere(42, $X_RYDER_HOUSE, $Y_RYDER_HOUSE, $Z_RYDER_HOUSE) repeat 0001: wait 0 ms 00D6: if 0038:   $ONMISSION == 0 004D: jump_if_false @MissionTriggerEnd 00D6: if 00FF:   actor $PLAYER_ACTOR sphere 0 in_sphere $X_RYDER_HOUSE $Y_RYDER_HOUSE $Z_RYDER radius 1.0 1.0 2.0 on_foot 004D: jump_if_false @MissionTriggerEnd 00BA: show_text_styled GXT 'INTRO_1' time 1000 style 2  // Again Big Smoke 0417: start_mission 2 0004: $ONMISSION = 1 until $TUT_MISSIONS_PASSED = 2marker.Disable($MARKER_RYDER_HOUSE)   :MissionTriggerEnd jump @MissionTrigger
EDIT 2:

IMPORTANT!!! Read my next post, i kinda "debugged" the code above that i started with but it still doesn't work as i want it to. Further Explanation in Next Post (I recommend reading this first post in order to understand my Situation.)[/size]

 

the until argument requires a conditional check!!!

therefor it needs 2 equals signs

until $TUT_MISSIONS_PASSED == 1

instead of

until $TUT_MISSIONS_PASSED = 1

and

until $TUT_MISSIONS_PASSED == 2

instead of

until $TUT_MISSIONS_PASSED = 2

 

 

 

Now the explanation

The content of every varables by default is equal to zero

[email protected] = 0

[email protected] = 0

$TUT_MISSIONS_PASSED = 0

Also you declared $TUT_MISSIONS_PASSED in mission 0

 

So the content of $TUT_MISSIONS_PASSED at beginning is equal to 0

 

The conditional check of the first mission sniffer asks if $TUT_MISSIONS_PASSED == 0

to make it possible that you can start mission 1

if and 00FF:   actor $PLAYER_ACTOR sphere 0 in_sphere $X_SWEET_HOUSE $Y_SWEET_HOUSE $Z_SWEET_HOUSE radius 1.0 1.0 2.0 on_foot Player.Controllable($PLAYER_CHAR) $TUT_MISSIONS_PASSED == 0          <-------------------------------------then      $ONMISSION = 1      00BA: show_text_styled GXT 'INTRO_1' time 1000 style 2  // Big Smoke     start_mission 1end 

if mission was completed successful, then 1 will be added to the var $TUT_MISSIONS_PASSED

:TUT_MISSION_1_PASSED0394: play_music 1$TUT_MISSIONS_PASSED += 1

then the content of $TUT_MISSIONS_PASSED is equal to 1

 

this let the code pass the repeat-until loop of the first mission sniffer

repeat<code>until $TUT_MISSIONS_PASSED == 1

so the $MARKER_SWEET_HOUSE will be deleted and the $MARKER_RYDER_HOUSE will be created

and the code will run into the loop of the second mission sniffer

 

The conditional check of the second mission sniffer asks if $TUT_MISSIONS_PASSED == 1

to make it possible that you can start mission 2

if and 00FF:   actor $PLAYER_ACTOR sphere 0 in_sphere $X_RYDER_HOUSE $Y_RYDER_HOUSE $Z_RYDER_HOUSE radius 1.0 1.0 2.0 on_foot Player.Controllable($PLAYER_CHAR) $TUT_MISSIONS_PASSED == 1          <-------------------------------------then      $ONMISSION = 1      00BA: show_text_styled GXT 'INTRO_1' time 1000 style 2  // Big Smoke     start_mission 2end 

if mission was completed successful, then 1 will be added to the var $TUT_MISSIONS_PASSED

:MISSION_2_PASSED                                                                                                                       // Label Mission_2_PassedPlayer.Money($PLAYER_CHAR) += 10000$TUT_MISSIONS_PASSED += 1

then the content of $TUT_MISSIONS_PASSED is equal to 2

 

this let the code pass the repeat-until loop of the second mission sniffer

repeat<code>until $TUT_MISSIONS_PASSED == 2

so the $MARKER_RYDER_HOUSE will be deleted and everything will be terminated by this code: end_thread

 

...but here you made a mistake, you checked if $TUT_MISSIONS_PASSED == 1 insted,(in this script, at line number 99), this have the effect that the repeat-until loop of the second sniffer will be passed immediately before you can start the second mission

 

In your script with the "cutscene" you made nearly everything correct

I have tested the script, played mission 2, then mission 3, then the marker disappeared

 

But it needs to remove the actors or remove their reference

Place such codes in the cleanup block

 

This

model.Destroy(#BFYST)

means that the game can unload the model file

 

but it needs to delete the actors instance, the actor handle

01C2: remove_references_to_actor $victim // Like turning an actor into a random pedestrian

or

009B: destroy_actor $victim

or

034F: destroy_actor_with_fade $victim
Link to comment
Share on other sites

Wow!! Thank you alot Sir! Really helped me out a lot here! i really appreciate it.

So now i think i've fixed all these "==" and "=" mistakes
But, look there is this weird thing that happens..

You told me that you can run this script with the cutscene with nearly no problems, so i added the line remove_references_to_actor to both missions : http://pastebin.com/V9evYRNX

but when I run the script this happens when i start the second mission from the sphere at "RYDER_HOUSE":



d2i6M2.png



Why is that? Look at how many Actors/Peds have spawned instead of just one for $victim and one for $innocent... its so weird looks like the Mission Trigger for the Second Mission keeps looping and spawning actors, or the Mission_2_Main keeps looping in an awkward kind of way. I don't know exactly

when i shoot all the $victim peds/actors then the Sphere at RYDER HOUSE will disappear and everything works from that point on well. but why are there so many peds/actors spawning???
i mean seriously look


MWnXl0.png



so i tried it again

 

i did the approach differently this time
i created this code : http://pastebin.com/FSWHx2Dr
1 Marker for Two Missions
and now it works just fine ( only one victim and innocent spawn in both missions, not way too many) , but that is maybe because: after the first mission is passed i dont disable the marker at "SWEET_HOUSE" , instead i just use the same marker for a different mission, thats also fine but doesn't make a lot of sense, but what i really need is to get the version with two seperate markers running.

in this version of the code with the One Marker for the Two Missions, the code for the Mission Trigger looks like this

 

:MissionTriggerthread "Mis_Trig"$MARKER_SWEET_HOUSE = Marker.CreateIconAndSphere(42, $X_SWEET_HOUSE, $Y_SWEET_HOUSE, $Z_SWEET_HOUSE)    repeat    0001: wait 0 ms        if and        player.Defined($PLAYER_CHAR)        $ONMISSION == 0        then            if and            00FF:   actor $PLAYER_ACTOR sphere 0 in_sphere $X_SWEET_HOUSE $Y_SWEET_HOUSE $Z_SWEET_HOUSE radius 1.0 1.0 2.0 on_foot            Player.Controllable($PLAYER_CHAR)            $TUT_MISSIONS_PASSED == 0            then            $ONMISSION = 1            00BA: show_text_styled GXT 'INTRO_1' time 1000 style 2  // Big Smoke            start_mission 2            end             if and            00FF:   actor $PLAYER_ACTOR sphere 0 in_sphere $X_SWEET_HOUSE $Y_SWEET_HOUSE $Z_SWEET_HOUSE radius 1.0 1.0 2.0 on_foot             Player.Controllable($PLAYER_CHAR)            $TUT_MISSIONS_PASSED == 1            then            $ONMISSION = 1            00BA: show_text_styled GXT 'INTRO_2' time 1000 style 2              start_mission 3              end                  end        until $TUT_MISSIONS_PASSED == 2    marker.Disable($MARKER_SWEET_HOUSE)//$MARKER_RYDER_HOUSE = Marker.CreateIconAndSphere(42, $X_RYDER_HOUSE, $Y_RYDER_HOUSE, $Z_RYDER_HOUSE)//    repeat//    0001: wait 0 ms//        if and//        player.Defined($PLAYER_CHAR)//        $ONMISSION == 0//        then//            if and//             00FF:   actor $PLAYER_ACTOR sphere 0 in_sphere $X_RYDER_HOUSE $Y_RYDER_HOUSE $Z_RYDER_HOUSE radius 1.0 1.0 2.0 on_foot//            Player.Controllable($PLAYER_CHAR)//            $TUT_MISSIONS_PASSED == 2//            then//            $ONMISSION = 1//            00BA: show_text_styled GXT 'INTRO_1' time 1000 style 2  // Big Smoke//            start_mission 2//            end//        end//    until $TUT_MISSIONS_PASSED == 3//    //marker.Disable($MARKER_RYDER_HOUSE)end_thread

 

The Problem is, as soon as I uncomment the Lines that are commented out ,the Sphere that should trigger Mission 3 with the sphere at "SWEET HOUSE" doen't do nothing, i cant start mission 3
I would really aprecciate some more help on this.

 

 


BUT THANK YOU SO MUCH SO FAR!!! I think have a better understanding of how Variables work and how to use the two equal marks.



Edit:
Here the problem from another Perspective

 

this should work i guess but it doesn't

 

:MissionTriggerthread "Mis_Trig" $MARKER_SWEET_HOUSE = Marker.CreateIconAndSphere(42, $X_SWEET_HOUSE, $Y_SWEET_HOUSE, $Z_SWEET_HOUSE)     repeat    0001: wait 0 ms        if and        player.Defined($PLAYER_CHAR)        $ONMISSION == 0        then            if and            00FF:   actor $PLAYER_ACTOR sphere 0 in_sphere $X_SWEET_HOUSE $Y_SWEET_HOUSE $Z_SWEET_HOUSE radius 1.0 1.0 2.0 on_foot            Player.Controllable($PLAYER_CHAR)            $TUT_MISSIONS_PASSED == 0            then            $ONMISSION = 1            00BA: show_text_styled GXT 'INTRO_1' time 1000 style 2  // Big Smoke            start_mission 2            end             if and            00FF:   actor $PLAYER_ACTOR sphere 0 in_sphere $X_SWEET_HOUSE $Y_SWEET_HOUSE $Z_SWEET_HOUSE radius 1.0 1.0 2.0 on_foot            Player.Controllable($PLAYER_CHAR)            $TUT_MISSIONS_PASSED == 1            then            $ONMISSION = 1            00BA: show_text_styled GXT 'INTRO_2' time 1000 style 2              start_mission 3              end                  end        until $TUT_MISSIONS_PASSED == 2   marker.Disable($MARKER_SWEET_HOUSE)$MARKER_RYDER_HOUSE = Marker.CreateIconAndSphere(42, $X_RYDER_HOUSE, $Y_RYDER_HOUSE, $Z_RYDER_HOUSE)    repeat    0001: wait 0 ms        if and        player.Defined($PLAYER_CHAR)        $ONMISSION == 0        then            if and            00FF:   actor $PLAYER_ACTOR sphere 0 in_sphere $X_RYDER_HOUSE $Y_RYDER_HOUSE $Z_RYDER_HOUSE radius 1.0 1.0 2.0 on_foot            Player.Controllable($PLAYER_CHAR)            $TUT_MISSIONS_PASSED == 2            then            $ONMISSION = 1            00BA: show_text_styled GXT 'INTRO_2' time 1000 style 2  // RYDER            start_mission 3            end        end    until $TUT_MISSIONS_PASSED == 3marker.Disable($MARKER_RYDER_HOUSE)end_thread 

 

 

 

Edited by bbxhnr
Link to comment
Share on other sites

You told me that you can run this script with the cutscene with nearly no problems, so i added the line remove_references_to_actor to both missions : http://pastebin.com/V9evYRNX

Yes, i have tested this new script and it works fine, no problems, also it looks fine, can't see any mistake

 

 

but when I run the script this happens when i start the second mission from the sphere at "RYDER_HOUSE":

 

 

 

d2i6M2.png

 

 

when i shoot all the $victim peds/actors then the Sphere at RYDER HOUSE will disappear and everything works from that point on well. but why are there so many peds/actors spawning???

i mean seriously look

 

 

MWnXl0.png

 

 

not for me

 

Why is that? Look at how many Actors/Peds have spawned instead of just one for $victim and one for $innocent... its so weird looks like the Mission Trigger for the Second Mission keeps looping and spawning actors, or the Mission_2_Main keeps looping in an awkward kind of way. I don't know exactly

maybe you removed something after paste at pastebin?

this for example:

 

0002: jump @MAIN_LOOP
What's your setting at sannybuilder option > General > Add extra info to SCM ?

What's your setting at sannybuilder option > Formats > Case converting ?

Do you have script mods installed ? asi mods?

What's your game version? what's your OS?

 

i created this code : http://pastebin.com/FSWHx2Dr

1 Marker for Two Missions

yes, an improved mission sniffer, looks good

(but remove_reference_to_actor is missing in that script)

 

but what i really need is to get the version with two seperate markers running

in this way, maybe

 

:MissionTriggerthread 'MisTrig'$MARKER_SWEET_HOUSE = Marker.CreateIconAndSphere(42, $X_SWEET_HOUSE, $Y_SWEET_HOUSE, $Z_SWEET_HOUSE)$MARKER_RYDER_HOUSE = Marker.CreateIconAndSphere(42, $X_RYDER_HOUSE, $Y_RYDER_HOUSE, $Z_RYDER_HOUSE)while true    wait 0    if  and        player.Defined($PLAYER_CHAR)        $ONMISSION == 0    then        if  and            00FF:   actor $PLAYER_ACTOR sphere 0 in_sphere $X_SWEET_HOUSE $Y_SWEET_HOUSE $Z_SWEET_HOUSE radius 1.0 1.0 2.0 on_foot            $TUT_MISSIONS_PASSED == 0        then            $ONMISSION = 1            00BA: show_text_styled GXT 'INTRO_1' time 1000 style 2  // Big Smoke            start_mission 2        end        if  and            00FF:   actor $PLAYER_ACTOR sphere 0 in_sphere $X_RYDER_HOUSE $Y_RYDER_HOUSE $Z_RYDER_HOUSE radius 1.0 1.0 2.0 on_foot            $TUT_MISSIONS_PASSED == 1        then            $ONMISSION = 1            00BA: show_text_styled GXT 'INTRO_2' time 1000 style 2  // RYDER            start_mission 3        end            end    if        $TUT_MISSIONS_PASSED > 1    then        end_thread    end    end
and remove the markers in the mission script

 

:TUT_MISSION_1_PASSED0394: play_music 1$TUT_MISSIONS_PASSED += 1Player.Money($PLAYER_CHAR) += 1000001E3: show_text_1number_styled GXT 'M_PASS' number 10000 time 5000 style 1 // MISSION PASSED!~n~~w~$~1~marker.Disable($MARKER_SWEET_HOUSE) return
:MISSION_2_PASSED                                                                                                                       // Label Mission_2_PassedPlayer.Money($PLAYER_CHAR) += 10000$TUT_MISSIONS_PASSED += 1                                                                                                      // Give The Player + 1000 Money01E3: show_text_1number_styled GXT 'M_PASS' number 10000 time 5000 style 1 // MISSION PASSED!~n~~w~$~1~                                 // Show Text Mission Passedmarker.Disable($MARKER_RYDER_HOUSE) return

 

 

 

 

 

in this version of the code with the One Marker for the Two Missions, the code for the Mission Trigger looks like this

 

:MissionTriggerthread "Mis_Trig"$MARKER_SWEET_HOUSE = Marker.CreateIconAndSphere(42, $X_SWEET_HOUSE, $Y_SWEET_HOUSE, $Z_SWEET_HOUSE)    repeat    0001: wait 0 ms        if and        player.Defined($PLAYER_CHAR)        $ONMISSION == 0        then            if and            00FF:   actor $PLAYER_ACTOR sphere 0 in_sphere $X_SWEET_HOUSE $Y_SWEET_HOUSE $Z_SWEET_HOUSE radius 1.0 1.0 2.0 on_foot            Player.Controllable($PLAYER_CHAR)            $TUT_MISSIONS_PASSED == 0            then            $ONMISSION = 1            00BA: show_text_styled GXT 'INTRO_1' time 1000 style 2  // Big Smoke            start_mission 2            end             if and            00FF:   actor $PLAYER_ACTOR sphere 0 in_sphere $X_SWEET_HOUSE $Y_SWEET_HOUSE $Z_SWEET_HOUSE radius 1.0 1.0 2.0 on_foot             Player.Controllable($PLAYER_CHAR)            $TUT_MISSIONS_PASSED == 1            then            $ONMISSION = 1            00BA: show_text_styled GXT 'INTRO_2' time 1000 style 2              start_mission 3              end                  end        until $TUT_MISSIONS_PASSED == 2    marker.Disable($MARKER_SWEET_HOUSE)//$MARKER_RYDER_HOUSE = Marker.CreateIconAndSphere(42, $X_RYDER_HOUSE, $Y_RYDER_HOUSE, $Z_RYDER_HOUSE)//    repeat//    0001: wait 0 ms//        if and//        player.Defined($PLAYER_CHAR)//        $ONMISSION == 0//        then//            if and//             00FF:   actor $PLAYER_ACTOR sphere 0 in_sphere $X_RYDER_HOUSE $Y_RYDER_HOUSE $Z_RYDER_HOUSE radius 1.0 1.0 2.0 on_foot//            Player.Controllable($PLAYER_CHAR)//            $TUT_MISSIONS_PASSED == 2//            then//            $ONMISSION = 1//            00BA: show_text_styled GXT 'INTRO_1' time 1000 style 2  // Big Smoke//            start_mission 2//            end//        end//    until $TUT_MISSIONS_PASSED == 3//    //marker.Disable($MARKER_RYDER_HOUSE)end_thread

The Problem is, as soon as I uncomment the Lines that are commented out ,the Sphere that should trigger Mission 3 with the sphere at "SWEET HOUSE" doen't do nothing, i cant start mission 3

I would really aprecciate some more help on this.

 

 

 

 

Edit:

Here the problem from another Perspective

 

this should work i guess but it doesn't

 

 

:MissionTriggerthread "Mis_Trig" $MARKER_SWEET_HOUSE = Marker.CreateIconAndSphere(42, $X_SWEET_HOUSE, $Y_SWEET_HOUSE, $Z_SWEET_HOUSE)     repeat    0001: wait 0 ms        if and        player.Defined($PLAYER_CHAR)        $ONMISSION == 0        then            if and            00FF:   actor $PLAYER_ACTOR sphere 0 in_sphere $X_SWEET_HOUSE $Y_SWEET_HOUSE $Z_SWEET_HOUSE radius 1.0 1.0 2.0 on_foot            Player.Controllable($PLAYER_CHAR)            $TUT_MISSIONS_PASSED == 0            then            $ONMISSION = 1            00BA: show_text_styled GXT 'INTRO_1' time 1000 style 2  // Big Smoke            start_mission 2            end             if and            00FF:   actor $PLAYER_ACTOR sphere 0 in_sphere $X_SWEET_HOUSE $Y_SWEET_HOUSE $Z_SWEET_HOUSE radius 1.0 1.0 2.0 on_foot            Player.Controllable($PLAYER_CHAR)            $TUT_MISSIONS_PASSED == 1            then            $ONMISSION = 1            00BA: show_text_styled GXT 'INTRO_2' time 1000 style 2              start_mission 3              end                  end        until $TUT_MISSIONS_PASSED == 2   marker.Disable($MARKER_SWEET_HOUSE)$MARKER_RYDER_HOUSE = Marker.CreateIconAndSphere(42, $X_RYDER_HOUSE, $Y_RYDER_HOUSE, $Z_RYDER_HOUSE)    repeat    0001: wait 0 ms        if and        player.Defined($PLAYER_CHAR)        $ONMISSION == 0        then            if and            00FF:   actor $PLAYER_ACTOR sphere 0 in_sphere $X_RYDER_HOUSE $Y_RYDER_HOUSE $Z_RYDER_HOUSE radius 1.0 1.0 2.0 on_foot            Player.Controllable($PLAYER_CHAR)            $TUT_MISSIONS_PASSED == 2            then            $ONMISSION = 1            00BA: show_text_styled GXT 'INTRO_2' time 1000 style 2  // RYDER            start_mission 3            end        end    until $TUT_MISSIONS_PASSED == 3marker.Disable($MARKER_RYDER_HOUSE)end_thread 

 

 

 

Because you have in the first two mission sniffer the SWEET_HOUSE XYZ coords check and only in the third mission sniffer the check for RYDER_HOUSE coords

 

 

 

 

 

 

 

 

Btw. the code for coords check itself can show a red sphere

replace your mission trigger with this one and test it, just to see what this code can do

 

:MissionTriggerthread 'MisTrig'while true    wait 0    if  and        player.Defined($PLAYER_CHAR)        $ONMISSION == 0    then        if             00FF:   actor $PLAYER_ACTOR sphere 1 in_sphere $X_SWEET_HOUSE $Y_SWEET_HOUSE $Z_SWEET_HOUSE radius 1.0 1.0 2.0 on_foot        then            $ONMISSION = 1            00BA: show_text_styled GXT 'INTRO_1' time 1000 style 2  // Big Smoke            start_mission 2        end    end    end
The red marker (sphere) will be shown by opcode 00FF:, 2. parameter: sphere 1 (sphere 0 don't show a red sphere)

There are several opcodes which show a sphere

 

00FE:   actor $PLAYER_ACTOR sphere 1 in_sphere 2493.5  -1682.5  13.35 radius 15.0 15.0 15.000FF:   actor $PLAYER_ACTOR sphere 1 in_sphere 2493.5  -1682.5  13.35 radius 1.0 1.0 2.0 on_foot0100:   actor $PLAYER_ACTOR in_sphere 2493.5  -1682.5  13.35 radius 4.0 4.0 4.0 sphere 1 in_car0101:   actor $PLAYER_ACTOR in_sphere 2493.5  -1682.5  13.35 radius 5.0 5.0 3.0 sphere 1 stopped0102:   actor $PLAYER_ACTOR in_sphere 2493.5  -1682.5  13.35 radius 1.2 1.2 3.0 sphere 1 stopped_on_foot0103:   actor $PLAYER_ACTOR in_sphere 2493.5  -1682.5  13.35 radius 4.0 4.0 6.0 sphere 1 stopped_in_car0104:   actor $PLAYER_ACTOR near_actor [email protected] radius 15.0 15.0 15.0 sphere 10105:   actor $PLAYER_ACTOR near_actor [email protected] radius 5.0 5.0 2.0 sphere 1 on_foot01AD:   car [email protected] sphere 1 near_point 2493.5  -1682.5 radius 6.0 6.001AE:   car [email protected] sphere 1 near_point 2493.5  -1682.5 radius 3.0 3.0 stopped01AF:   car [email protected] sphere 1 in_sphere 2493.5  -1682.5 radius 0.2 0.2 1.001B0:   car [email protected] sphere 1 in_sphere 2493.5  -1682.5  13.35 radius 4.0 4.0 4.0 stopped 
and there're several marker codes, with and without sphere
Link to comment
Share on other sites

wie nice is das denn bitte ?!!!

THank you so much dude!!

i really appreciate it

it works just fine

 

OS: Windows 10

Game Version: 1.0 Original

SannyBuilder Settings:

 

 

 

x0FNvj.jpg

U0xUKK.jpg

 

 

 

 

And i have one cleo mod added so that the main Menu screen can be a 1920*1080 image

like this:

 

OM4jec.jpg

 

 

 

eventhough it says 4 plugins there is only 1 script that have added myself in the folder

 

yt7OT4.jpg

 

 

 

edit: lol im sorry i was tired when i posted this im running windows 10

Edited by bbxhnr
Link to comment
Share on other sites

Remove the hook at "Add extra infos to SCM", this option isn't usefull and for cleo scripts absolut not recommanded.

If you still have these problems, then take an unmodded game installation with only your favorite gta_sa.exe and test your main.scm

If you then still have these problems, then give the main.scm for download

 

win8... hmmm... i read anywhere it's not good for gaming.. i don't know, but you should install your game not im Programme-Ordner, sondern irgendeinem anderen selbsterstelltem Verzeichnis, wegen UAC

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.