DavidReyes2250 Posted December 12, 2020 Share Posted December 12, 2020 (edited) Hello again, I would like to know how I can make a CLEO custom mission, for example, if the player goes to a specific area, the mission fails just like an original mission from the game, how could I code it? I have seen that at the beginning of the script it says, for example: script_name 'MYCLEO' MICLEO_03() if wasted_or_busted jf @ MICLEO_02 MICLEO_05() : MICLEO_02 MICLEO_06() terminate_this_script : MICLEO_03 (rest of the script) : MICLEO_05 00BA: show_text_styled GXT 'M_FAIL' time 5000 style 1 return : MICLEO_06 0924: enable_screen_darkness 0 with_value -1 Player.SprintMode ($ PLAYER_CHAR, False) 01F0: set_max_wanted_level_to 6 Player.ClearWantedLevel ($ PLAYER_CHAR) I put this in my CLEO script but it doesn't work, am I missing something? I hope you have understood me, thank you Note: this cleo mod is created by me from the most recent version of Sanny Builder Edited December 13, 2020 by DavidReyes2250 Link to comment Share on other sites More sharing options...
ZAZ Posted December 13, 2020 Share Posted December 13, 2020 (edited) First of all, read cleo tutorial Second: Cleo scripts must beginn with the cleo directive: {$CLEO .cs} or {$CLEO .cm} {$CLEO .cs} for normal scripts {$CLEO .cm} for mission scripts 3.) a mission script requires always another script to initialize the mission doesn't matter if main.scm or cleo I f you wanna start a R* mission of main.scm with a cleo script, then it needs just this code: Quote 0417: start_mission 1 make a little cleo script therefore Quote {$CLEO .cs} thread 'INTRO' wait 3000 0417: start_mission 2 0A93: end_custom_thread 4.) to initialize a cleo mission needs: - a cleo script that beginns with {$CLEO .cs} and have the code to initialize a mission script Quote 0A94: start_custom_mission "TestMission" Required entry between " " The script name of the *.cm cleo file TestMission.cm -> "TestMission" - the cleo mission script that beginns with {$CLEO .cm} Below templates, first the script for initialize a mission script, then the mission script Quote {$CLEO .cs} :Test_M_Start_1 03A4: name_thread 'TSTM' :Test_M_Start_2 wait 0 if 0256: player $PLAYER_CHAR defined jf @Test_M_Start_2 if 0038: $ONMISSION == 0 // integer values jf @Test_M_Start_2 :Test_M_Start_6 if 00FF: actor $PLAYER_ACTOR 1 (in-sphere)near_point_on_foot 2491.5 -1667.5 13.35 radius 1.0 1.0 1.0 jf @Test_M_Start_2 00BA: text_styled 'fem_on' 1000 ms 2 wait 500 0004: $ONMISSION = 1 // integer values 0A94: start_custom_mission "TestMission" 0002: jump @Test_M_Start_2 Enter the red spot at groovestreet (1 (in-sphere)near_point_on_foot 2491.5 -1667.5 13.35 ) to start the mission Quote {$CLEO .cm} :TestMiss_1 03A4: name_thread "TESTM" 0050: gosub @TestMiss_main_1 00D6: if 0 0112: wasted_or_busted 004D: jump_if_false @TestMiss_end_1 0050: gosub @TestMiss_fail_1 :TestMiss_end_1 0050: gosub @TestMiss_clep_1 004E: end_thread :TestMiss_main_1 0317: increment_mission_attempts//here starts the missionscript 0004: $ONMISSION = 1 00BC: text_highpriority 'fem_ok' 3000 ms 1 :TestMiss_11 0001: wait 0 ms if or 02D8: actor $PLAYER_ACTOR currentweapon == 0 02D8: actor $PLAYER_ACTOR currentweapon == 1 004D: jump_if_false @TestMiss_11 if 00E1: key_pressed 0 17 004D: jump_if_false @TestMiss_11 :TestMiss_pass_1 00BA: text_styled 'M_PASS' 5000 ms 1 0051: return :TestMiss_fail_1 00BA: text_styled 'M_FAIL' 5000 ms 1 0051: return :TestMiss_clep_1 0004: $ONMISSION = 0 00D8: mission_cleanup 0051: return Press firekey with fist or brass knuckle to pass the mission Edited December 13, 2020 by ZAZ CLEO MODS CLEO Script Tutorial 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