ShadowCoderKing Posted March 20, 2013 Share Posted March 20, 2013 (edited) hey im having another problem when the player dies the mission will crash and iv tryed heaps to fix it and i cant i hope someone could solve this problem, sorry bout the massive script Edited March 21, 2013 by spidermight Link to comment Share on other sites More sharing options...
Silent Posted March 20, 2013 Share Posted March 20, 2013 player_dead_check label is completely obsolete. That check is done by the EXE by itself. The code looks messy as HELL though. If I looked into it deeper, I'd probably find more issues, but that one is the most apparent one. Link to comment Share on other sites More sharing options...
ShadowCoderKing Posted March 21, 2013 Author Share Posted March 21, 2013 hey silent i got rid of all the player dead check and it does not crash when you die now but instead it stays on the mission because its not being told to go to TestMiss_fail_1 when player is dead, this is confusing Link to comment Share on other sites More sharing options...
Silent Posted March 21, 2013 Share Posted March 21, 2013 Do you set the $ONMISSION flag to 1 before launching a mission? If not, do it in the mission script & revert it back to 0 inside mission cleanup routine. Link to comment Share on other sites More sharing options...
ShadowCoderKing Posted March 21, 2013 Author Share Posted March 21, 2013 yea the onmission flags are set right but i thought without that playerdeadcheck it will not go to the mission_cleanup in the first place, it will stay at that point after you die but with the deadcheck it will crash Link to comment Share on other sites More sharing options...
Silent Posted March 21, 2013 Share Posted March 21, 2013 I'll be honest, I have no idea what's wrong with this one (haven't tested it). Although, it'd be good to replace all global vars with local vars. Pretty unlikely, but your globals might have overwritten an important var from main.scm. And yeah, forgot, how do you start this mission? Show me the code. Link to comment Share on other sites More sharing options...
ShadowCoderKing Posted March 21, 2013 Author Share Posted March 21, 2013 ok i will replace globals with local and see how it goes, here is what starts the mission : {$VERSION 3.1.0023}{$CLEO .cs}//-------------MAIN---------------thread 'MISSION5STARTER' :MISSION5STARTER_19wait 0 if Player.Defined($PLAYER_CHAR)jf @MISSION5STARTER_19 if 00EC: actor $PLAYER_ACTOR 0 near_point 1468.412 -67.3816 radius 200.0 200.0 jf @MISSION5STARTER_19 Model.Load(#ARMY)Model.Load(#M4):MISSION5STARTER_87wait 0 if Model.Available(#ARMY)jf @MISSION5STARTER_87 [email protected] = Actor.Create(Mission1, #ARMY, 1464.529, -60.5595, 20.7754)Actor.Angle([email protected]) = 152.1441Actor.WeaponAccuracy([email protected]) = 1000446: toggle_actor [email protected] immune_to_headshots 1 07DD: set_actor [email protected] temper_to 100 // see pedstats.dat 03FE: set_actor [email protected] money 0 01B2: give_actor [email protected] weapon 31 ammo 30000 // Load the weapon model before using this Actor.Health([email protected]) = 600Model.Destroy(#ARMY):MISSION5STARTER_193wait 0 if 80EC: not actor $PLAYER_ACTOR 0 near_point 1468.412 -67.3816 radius 200.0 200.0 jf @MISSION5STARTER_256 wait 0 Actor.DestroyInstantly([email protected])03BD: destroy_sphere [email protected] jump @MISSION5STARTER_19 :MISSION5STARTER_256wait 0 if Actor.Dead([email protected])jf @MISSION5STARTER_295 jump @MISSION5STARTER_283 :MISSION5STARTER_283Actor.DestroyInstantly([email protected])jump @MISSION5STARTER_19 :MISSION5STARTER_29503BD: destroy_sphere [email protected] wait 0 if Player.Defined($PLAYER_CHAR)jf @MISSION5STARTER_295 if $MISSION5_PASSED == 0 jf @MISSION5STARTER_295 03BC: [email protected] = create_sphere_at 1463.914 -62.2285 20.6483 radius 2.0 if 00FF: actor $PLAYER_ACTOR sphere 1 in_sphere 1463.914 -62.2285 20.6483 radius 1.0 1.0 1.0 on_foot jf @MISSION5STARTER_193 00BA: show_text_styled GXT 'QQWER' time 1000 style 2 Actor.DestroyInstantly([email protected])$MISSION5_PASSED = 1 03BD: destroy_sphere [email protected] 0A94: start_custom_mission "MISSION5" :MISSION5STARTER_457wait 0 if $MISSION5_PASSED == 0 jf @MISSION5STARTER_457 jump @MISSION5STARTER_19 and thanks for trying to help Link to comment Share on other sites More sharing options...
Silent Posted March 21, 2013 Share Posted March 21, 2013 yea the onmission flags are set right Yet I don't see it set in the starter, neither in the mission Link to comment Share on other sites More sharing options...
ShadowCoderKing Posted March 21, 2013 Author Share Posted March 21, 2013 i thought this was it : $MISSION5_PASSED = 1 / i just replaced the onmission name Link to comment Share on other sites More sharing options...
Silent Posted March 21, 2013 Share Posted March 21, 2013 No, you need to set EXACTLY $ONMISSION, unless it's named differently in your CustomVariables.ini. That var is a key to inbuilt wasted/busted check. Link to comment Share on other sites More sharing options...
ShadowCoderKing Posted March 21, 2013 Author Share Posted March 21, 2013 (edited) oh silly me i will change this right away and test it edit: after testing it, it works perfect now,i cant believe i missed something so important like that lol thank you very much silent Edited March 21, 2013 by spidermight 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