Bad.boy! Posted January 15, 2012 Share Posted January 15, 2012 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 More sharing options...
ZAZ Posted January 15, 2012 Share Posted January 15, 2012 (edited) 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 January 15, 2012 by ZAZ CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
Bad.boy! Posted January 15, 2012 Author Share Posted January 15, 2012 (edited) 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 January 15, 2012 by Bad.boy! Link to comment Share on other sites More sharing options...
Bad.boy! Posted January 17, 2012 Author Share Posted January 17, 2012 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 More sharing options...
ZAZ Posted January 17, 2012 Share Posted January 17, 2012 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 ? CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
Bad.boy! Posted January 17, 2012 Author Share Posted January 17, 2012 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 More sharing options...
ZAZ Posted January 17, 2012 Share Posted January 17, 2012 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 CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
Deji Posted January 17, 2012 Share Posted January 17, 2012 Show the entire code. Link to comment Share on other sites More sharing options...
Bad.boy! Posted January 17, 2012 Author Share Posted January 17, 2012 (edited) 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 January 18, 2012 by Bad.boy! Link to comment Share on other sites More sharing options...
ZAZ Posted January 18, 2012 Share Posted January 18, 2012 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 CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
Bad.boy! Posted January 18, 2012 Author Share Posted January 18, 2012 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 More sharing options...
Node Posted January 18, 2012 Share Posted January 18, 2012 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 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