coin-god Posted August 17, 2008 Share Posted August 17, 2008 Here is the deal, i made a mission. That mission works perfect. But then i made a Player Selection script (based on ZAZ Ped Spawner) that select peds in the range 258-264. I made the Player Selector a mission, the first one. An then made the original mission the second one. Now i managed to make Player selector work and start automaticly when game starts. But now i need the Player selector not to work anymore when i've alrready selected a player and i want to inmediatly go to MISSION2. This is my Missions Starter thread: :R3thread 'R3' :R3_11wait 70 if $ONMISSION == 0 else_jump @R3_11 if Player.Defined($PLAYER_CHAR)else_jump @R3_11 if 89BE: not unknown_check_09BD else_jump @R3_11 if 08B4: test $390 bit 1 else_jump @R3_87 jump @R3_173 :R3_87if $HELP_TOGGLE_ODDJOB_SHOWN == 0 else_jump @R3_125 if 88FE: not text_box_displayed else_jump @R3_125 $HELP_TOGGLE_ODDJOB_SHOWN = 1 :R3_125if and Actor.Stopped($PLAYER_ACTOR) not Actor.Dead($PLAYER_ACTOR) not Actor.Driving($PLAYER_ACTOR)$PLAYER_SELECTED == 0else_jump @R3_11 wait 0 start_mission 0 // Player Selector$HELP_TOGGLE_ODDJOB_SHOWN = 0 jump @R3_11 :R3_173wait 70 if 88B4: not test $390 bit 1 else_jump @R3_207 wait 5000 jump @R3_11 :R3_207jump @R3_173 Whit this code the game starts and i select player model. When done the mission (Player Selector) its over and im in no mission. Everything works ok, but i cant load the mission 2. So i changed it like this: :R3thread 'R3' :R3_11wait 70 if $ONMISSION == 0 else_jump @R3_11 if Player.Defined($PLAYER_CHAR)else_jump @R3_11 if 89BE: not unknown_check_09BD else_jump @R3_11 if 08B4: test $390 bit 1 else_jump @R3_87 jump @R3_173 :R3_87if $HELP_TOGGLE_ODDJOB_SHOWN == 0 else_jump @R3_125 if 88FE: not text_box_displayed else_jump @R3_125 $HELP_TOGGLE_ODDJOB_SHOWN = 1 :R3_125if and Actor.Stopped($PLAYER_ACTOR) not Actor.Dead($PLAYER_ACTOR) not Actor.Driving($PLAYER_ACTOR)else_jump @R3_11if $PLAYER_SELECTED >= 1else_jump @R3_11_B wait 0 start_mission 1 // Mission 2$HELP_TOGGLE_ODDJOB_SHOWN = 0 jump @R3_11 :R3_173wait 70 if 88B4: not test $390 bit 1 else_jump @R3_207 wait 5000 jump @R3_11 :R3_207jump @R3_173 :R3_11_Bwait 0start_mission 0 // Player Selector$HELP_TOGGLE_ODDJOB_SHOWN = 0 jump @R3_11 With this after i select the player model the player appears and in less than a second the game crash. $Player_Selected is defined as 0 in the main part of the SCM. Then I've defined $PLAYER_SELECTED as 0 when the PlayerSelection mission start, and when the player is selected and the mission is over i defined it as 1. So the condition should work. And when the thread checks if it is greater or equal to 1 the mission 2 should start, but it dosn't. So it means that $Player_Selected is the variable i use to check if i selected a player in the player selection mission. I dont know, maybe im missing something? Link to comment Share on other sites More sharing options...
coin-god Posted August 18, 2008 Author Share Posted August 18, 2008 fixed. i forgot the mission_cleanup 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