serabella Posted July 4, 2011 Share Posted July 4, 2011 First, I wanted to say. I will post all my coding questions in this topic so I don't have to fill the forums with my stupid questions However, I've made the first 2 missions in my new story mode, the first one works fine but the second one doesn't start. I post a code of the mission sniffer and of the actual mission. Hope anyone can help me MISSION SNIFFER: :TUT_SNIFFthread "TUT_SNIFF" $MARKER_SWEET_HOUSE = Marker.CreateIconAndSphere(15, -1474.698, -2157.375, 2.1007):TUT_SNIFF_35wait $DEFAULT_WAIT_TIME if and Player.Defined($PLAYER_CHAR) $ONMISSION == 0 else_jump @TUT_SNIFF_237 if and00FF: actor $PLAYER_ACTOR sphere 0 in_sphere -1474.698 -2157.375 2.1007 radius 1.0 1.0 2.0 on_foot Player.Controllable($PLAYER_CHAR) $TUT_MISSIONS_PASSED == 0 else_jump @TUT_SNIFF_237 $ONMISSION = 1 00BA: show_text_styled GXT 'INTRO_1' time 1000 style 2 // Big Smokestart_mission 1 // Initial 2if and00FF: actor $PLAYER_ACTOR sphere 0 in_sphere -1639.878 -2225.046 30.6111 radius 1.0 1.0 2.0 on_foot Player.Controllable($PLAYER_CHAR) $TUT_MISSIONS_PASSED == 1 else_jump @TUT_SNIFF_278 $ONMISSION = 1 00BA: show_text_styled GXT 'INTRO_2' time 1000 style 2 // Ryderstart_mission 2 // Intro:TUT_SNIFF_237 $TUT_MISSIONS_PASSED == 1 else_jump @TUT_SNIFF_35 Marker.Disable($MARKER_SWEET_HOUSE)$MARKER_CJ_HOUSE = Marker.CreateIconAndSphere(15, -1639.878, -2225.046, 30.6111):TUT_SNIFF_278 $TUT_MISSIONS_PASSED == 2 else_jump @TUT_SNIFF_35 Marker.Disable($MARKER_CJ_HOUSE)end_thread MISSION 2: :MISSION_1thread 'MISSION 1' gosub @MISSION_1_55 if wasted_or_busted else_jump @MISSION_1_46 gosub @MISSION_1_342 :MISSION_1_46gosub @MISSION_1_374 end_thread :MISSION_1_55Model.Load(#GLENsh*t)Model.Load(#BMYST)Model.Load(#MICRO_UZI)Model.Load(#COLT45)038B: load_requested_models :MISSION_1_76wait 0 if and Model.Available(#GLENsh*t) Model.Available(#BMYST) Model.Available(#MICRO_UZI) Model.Available(#COLT45)else_jump @MISSION_1_76 set_weather 16 01B2: give_actor $PLAYER_ACTOR weapon 28 ammo 120 // Load the weapon model before using this 01B2: give_actor $PLAYER_ACTOR weapon 22 ammo 50 // Load the weapon model before using this 01B9: set_actor $PLAYER_ACTOR armed_weapon_to 28 $GHOST_CAR_1 = Car.Create(#GLENsh*t, -1679.122, -2208.025, 35.7497)Car.Angle($GHOST_CAR_1) = 247.0214$GHOST_CAR_1_MARKER = Marker.CreateAboveCar($GHOST_CAR_1)0338: set_car $GHOST_CAR_1 visibility 0 Car.SetToPsychoDriver($GHOST_CAR_1)Car.Health($GHOST_CAR_1) = 1000000AE: set_car $GHOST_CAR_1 traffic_behaviour_to 2 0129: $PSYCOPATH_1 = create_actor_pedtype 4 model #BMYST in_car $GHOST_CAR_1 driverseat 0337: set_actor $PSYCOPATH_1 visibility 0 039E: set_actor $PSYCOPATH_1 locked 1 while_in_car Car.SetDriverBehaviour($GHOST_CAR_1, KillThePlayer)0A09: set_actor $PSYCOPATH_1 muted 1 // versionB 0526: set_actor $PSYCOPATH_1 stay_in_car 1 09F6: set_actor $PSYCOPATH_1 unjackable_through_driver_seat 1 :MISSION_1_261wait 0 if Actor.Dead($PLAYER_ACTOR)else_jump @MISSION_1_288 jump @MISSION_1_342 :MISSION_1_288 Car.Wrecked($GHOST_CAR_1)else_jump @MISSION_1_261 0394: play_music 1 $TUT_MISSIONS_PASSED += 1 030C: progress_made += 1 Player.Money($PLAYER_CHAR) += 5001E3: show_text_1number_styled GXT 'M_PASS' number 50 time 5000 style 1 // MISSION PASSED!~n~~w~$~1~return :MISSION_1_34200BA: show_text_styled GXT 'M_FAIL' time 5000 style 1 // ~r~MISSION FAILED!0555: remove_weapon 22 from_actor $PLAYER_ACTOR 0555: remove_weapon 28 from_actor $PLAYER_ACTOR return :MISSION_1_374$ONMISSION = 0 Marker.Disable($GHOST_CAR_1_MARKER)Player.WantedLevel($PLAYER_CHAR) = 0Model.Destroy(#BMYST)Model.Destroy(#GLENsh*t)Model.Destroy(#MICRO_UZI)Model.Destroy(#COLT45)mission_cleanup return If you need the full code to see what's wrong, I can post it Link to comment Share on other sites More sharing options...
spaceeinstein Posted July 5, 2011 Share Posted July 5, 2011 (edited) Your code will never start mission 2, only mission 1 is started and the rest was ignored. else_jump @next_mission$ONMISSION = 100BA: show_text_styled GXT 'INTRO_1' time 1000 style 2 // Big Smokestart_mission 1 // Initial 2:next_mission // this has to be read, the game couldn't reach the code beforeif and$ONMISSION == 0 00FF: actor $PLAYER_ACTOR sphere 0 in_sphere -1639.878 -2225.046 30.6111 radius 1.0 1.0 2.0 on_foot Player.Controllable($PLAYER_CHAR)$TUT_MISSIONS_PASSED == 1else_jump @TUT_SNIFF_237 else_jump @TUT_SNIFF_278Marker.Disable($MARKER_SWEET_HOUSE)$MARKER_CJ_HOUSE = Marker.CreateIconAndSphere(15, -1639.878, -2225.046, 30.6111) // this is unecessary, you can simply create the marker once within mission 1 so that the game doesn't destroy and create the same marker in a loop:TUT_SNIFF_278 Edited July 5, 2011 by spaceeinstein Link to comment Share on other sites More sharing options...
serabella Posted July 6, 2011 Author Share Posted July 6, 2011 thank you very much Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now