NarUllaqua Posted April 9, 2018 Share Posted April 9, 2018 How can i create a cleo mission in VC? there is no opcode start custom mission Link to comment Share on other sites More sharing options...
Sloth- Posted April 12, 2018 Share Posted April 12, 2018 (edited) I'm afraid you can't, CLEO on VC is more limited than SA. But maybe you can "simulate" a mission with CLEO. Try something like this: {$CLEO .cs}thread 'MYMIS' // unlike SA, VC doesn't accept thread names larger than 7 characters!:MissionTriggerrepeatwait 0 if $ONMISSION == 0 // VC has same "$ONMISSION" var as SA right? then if {player actor is on certain sphere, X Y Z coordinates, radius 25.0 flag 0} then if {player actor is on same sphere XYZ, radius 2.0 flag 1} then $ONMISSION = 1 Show Styled Text 2 "Mission Name" gosub @MyMission $ONMISSION = 0 end end enduntil false:MiMissionfade 0 2000Put Player Actor on some site// Initialize Mission as neededwait 2000fade 1 2000:MissionLooprepeatwait 0 if {wasted or busted} then gosub @MissionFailed gosub @MissionCleanup return // Return to MissionTrigger end /* Do your mission stuff here, never abandon loop, or your code won't be able to recognize if you got wasted or busted. Work with state machine logic. */ // Checking win conditions if {win conditions} then gosub @MissionSuccess gosub @MissionCleanup return // Return to MissionTrigger enduntil false:MissionSuccessShow Styled Text 1 "Mission Completed!"Play musicPlayer money += DESIRED_MONEYreturn:MissionFailedShow Styled Text 1 "Mission Failed!"return:MissionCleanup// Do your cleanup, remove actors, objects, vehicles references// destroy created markers or spheresreturn Try simple stuff first and if everything goes fine, then increase complexity. Edited April 12, 2018 by Sloth- NarUllaqua 1 Link to comment Share on other sites More sharing options...
NarUllaqua Posted April 15, 2018 Author Share Posted April 15, 2018 thanks brooo 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