Natso Posted November 19, 2015 Share Posted November 19, 2015 (edited) Hello everyone 9 @ = 0 // transmitter 7 @ = -1 // plane 8 @ = -1 // Actor 10 @ = -1 // plane marker 11 @ = -1 // pathID 12 @ = -1 // pathDetector 27 @ = -1 // dragon angle 26 @ = -1 // Long coord 25 @ = -1 // Long coord 24 @ = -1 // Long coord 0 @ = -1 // coord 1 @ = -1 // coord 2 @ = -1 // coord 3 @ = -1 // temp value 4 @ = -1 // angle 5 @ = -1 // health 6 @ = -1 // speed What does it mean, and I can earn 11 @ = -1 // pathID where and exactly 24 25 26 @ which is xyz, and how I can replace the coordinates of USS NIMITZ hydra to Landing? {$CLEO .cs}thread 'AI_HYDRA'[email protected] = 0 //transmitter[email protected] = -1 //plane[email protected] = -1 //actor[email protected] = -1 //plane marker[email protected] = -1 //pathID[email protected] = -1 //pathDetector[email protected] = -1 //long angle[email protected] = -1 //long coord[email protected] = -1 //long coord[email protected] = -1 //long coord[email protected] = -1 //coord[email protected] = -1 //coord[email protected] = -1 //coord[email protected] = -1 //temp value[email protected] = -1 //angle[email protected] = -1 //health[email protected] = -1 //speed:startwait 0ifPlayer.Defined($PLAYER_CHAR)jf @startif80FE: not actor $PLAYER_ACTOR sphere 0 in_sphere 1475.7020 1642.6296 10.7448 radius 250.0 250.0 250.0jf @start:avawait 10ifModel.Available(#HYDRA)jf @loadwait 10ifModel.Available(#ARMY)jf @load1jump @available:loadModel.Load(#HYDRA)wait 10jump @ava:load1Model.Load(#ARMY)wait 10jump @ava:availableCar.Create([email protected], #HYDRA, 1475.7020, 1642.6296, 10.7448)Car.Angle([email protected]) = 180.008E6: set_plane [email protected] landing_gear 0 020A: set_car [email protected] door_status_to 40129: [email protected] = create_actor_pedtype 4 model #ARMY in_car [email protected] driverseatModel.Destroy(#ARMY)Model.Destroy(#HYDRA)[email protected] = 43[email protected] = 0[email protected] = 180.0[email protected] = 1475.7020[email protected] = 1642.6296[email protected] = 10.7448if[email protected] == 1jf @loadpath0ACE: show_formatted_text_box "HYDRA respawned at Las Venturas."Marker.CreateAboveaCTOR([email protected], [email protected])Marker.SetColor([email protected], 2):loadpathwait 10if 07C1: path [email protected] availablejf @loadpath1jump @movingon:loadpath107C0: load_path [email protected]wait 10jump @loadpath:movingon05EB: assign_car [email protected] to_path [email protected]0873: release_path [email protected]if[email protected] == 1jf @checks0ACE: show_formatted_text_box "HYDRA is now taking off.":checksgosub @deadgosub @transmitgosub @landinggearif860E: not car [email protected] assigned_to_pathjf @checks:release06C5: release_car [email protected] from_path[email protected] += 1if0029: [email protected] >= 3jf @detectpathjump @repeat:detectpath[email protected] = 0if[email protected] == 1jf @detectpath1[email protected] = 135.0[email protected] = -1542.3070[email protected] = -47.1985[email protected] = 14.0603if[email protected] == 1jf @putat0ACE: show_formatted_text_box "NEVADA is now in San Fierro.":putatgosub @deadgosub @transmit[email protected] += 1 [email protected] += -0.5[email protected] += -0.5Car.Angle([email protected]) = [email protected]Car.PutAt([email protected], [email protected], [email protected], [email protected])if [email protected] == 170jf @putat gosub @angle[email protected] = 315.0 [email protected] = -1627.5796[email protected] = -138.8973[email protected] = 14.0598[email protected] = 49jump @loadpath:detectpath1if[email protected] == 2jf @repeat[email protected] = 1993.1895[email protected] = -2488.1265[email protected] = 13.4627[email protected] = 270.0gosub @angle[email protected] = 90.0if[email protected] == 1jf @putat10ACE: show_formatted_text_box "HYDRA is now in Los Santos.":putat1gosub @deadgosub @transmit [email protected] += 1 [email protected] += -0.5Car.Angle([email protected]) = [email protected]Car.PutAt([email protected], [email protected], [email protected], [email protected])if [email protected] == 831else_jump @putat1[email protected] = 1577.5233[email protected] = -2493.5564[email protected] = 13.4705gosub @angle[email protected] = 270.0[email protected] = 46jump @loadpath:repeat[email protected] = 1476.4661[email protected] = 1718.7635[email protected] = 10.7288[email protected] = 0.0gosub @angle[email protected] = 180.0if[email protected] == 1jf @repeat10ACE: show_formatted_text_box "HYDRA is now in Las Venturas.":repeat1gosub @dead gosub @transmit[email protected] += 1[email protected] -= 0.5Car.Angle([email protected]) = [email protected]Car.PutAt([email protected], [email protected],[email protected],[email protected])if[email protected] == 152jf @repeat1[email protected] = 43[email protected] = 0[email protected] = 1475.7020[email protected] = 1642.6296[email protected] = 10.7448jump @loadpath:landinggearCar.StorePos([email protected], [email protected], [email protected], [email protected])if[email protected] >= 50.0jf @landinggear108E6: set_plane [email protected] landing_gear 1return:landinggear108E6: set_plane [email protected] landing_gear 0return:angle[email protected] = 0:angle2gosub @deadgosub @transmit 000B: [email protected] += 1.0000A: [email protected] += 1Car.Angle([email protected]) = [email protected]Car.PutAt([email protected], [email protected], [email protected], [email protected])if [email protected] >= 180 else_jump @angle2[email protected] = 0return:deadwait 0if andnot [email protected] == -1not [email protected] == -1jf @endeif andnot Car.Wrecked([email protected])0185: car [email protected] health >= 250not Actor.Dead([email protected])Actor.InCar([email protected], [email protected])jf @endreturn:end0ABF: set_vehicle [email protected] engine_state_to 0Actor.RemoveReferences([email protected])Car.RemoveReferences([email protected])06C5: release_car [email protected] from_pathif[email protected] == 1jf @start0ACE: show_formatted_text_box "Something very bad happened to the HYDRA." Marker.Disable([email protected])jump @start:endeMarker.Disable([email protected])Actor.RemoveReferences([email protected])Car.RemoveReferences([email protected])jump @start:transmitif0ADC: test_cheat "HYDRA"jf @infoif[email protected] == 0jf @off[email protected] = 1Marker.CreateAboveActor([email protected], [email protected])Marker.SetColor([email protected], 2)0ACE: show_formatted_text_box "HYDRA transmitter online. Type HYDRA again to turn off or hold H and 3 to view info."return:off[email protected] = 0Marker.Disable([email protected])0ACE: show_formatted_text_box "HYDRA transmitter offline. Type HYDRA to turn on."return:infoif0AB0: key_pressed 720aa1:if0AB0: key_pressed 510aa1:if[email protected] == 10AA1: return_if_false0227: [email protected] = car [email protected] health02E3: [email protected] = car [email protected] speedCar.StorePos([email protected], [email protected], [email protected], [email protected])[email protected] = Car.Angle([email protected])0ACE: show_formatted_text_box "HYDRA Health %d Speed %f at %f %f %f Angle %f" [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]return Edited November 19, 2015 by Natso Link to comment Share on other sites More sharing options...
Natso Posted November 20, 2015 Author Share Posted November 20, 2015 help Link to comment Share on other sites More sharing options...
ZAZ Posted November 20, 2015 Share Posted November 20, 2015 The plane will be assigned to carrec paths, 3 different paths will be used [email protected] = [email protected] = [email protected] = 46 07C0: load_path [email protected]: assign_car [email protected] to_path [email protected] Open data\Paths\carrec.img with img tool The coords are just for spawning and maybe it will be put to the carrier after path ride is finished. So it doesn't make sense to change coords without changing (or recording new) paths CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
Natso Posted November 21, 2015 Author Share Posted November 21, 2015 (edited) The plane will be assigned to carrec paths, 3 different paths will be used [email protected] = [email protected] = [email protected] = 46 07C0: load_path [email protected]: assign_car [email protected] to_path [email protected] Open data\Paths\carrec.img with img tool The coords are just for spawning and maybe it will be put to the carrier after path ride is finished. So it doesn't make sense to change coords without changing (or recording new) paths So if I had my own way, code makes them take off and landing, and they will automatically run back where they started and fly again? My after they landed and flew away on its own {$CLEO .cs}thread 'AI_HYDRA'[email protected] = 0 //[email protected] = -1 //[email protected] = -1 //[email protected] = -1 //plane [email protected] = -1 //[email protected] = -1 //[email protected] = -1 //long [email protected] = -1 //long [email protected] = -1 //long [email protected] = -1 //long coord [email protected] = -1 //[email protected] = -1 //[email protected] = -1 //[email protected] = -1 //temp [email protected] = -1 //[email protected] = -1 //[email protected] = -1 //speed :startwait 0ifPlayer.Defined($PLAYER_CHAR)jf @start :avawait 10ifModel.Available(#HYDRA)jf @loadwait 10ifModel.Available(#ARMY)jf @load1jump @available :loadModel.Load(#HYDRA)wait 10jump @ava :load1Model.Load(#ARMY)wait 10jump @ava :availableCar.Create([email protected], #HYDRA, 2534.7363, -2952.9294, 25.7871)Car.Angle([email protected]) = 91.60430129: [email protected] = create_actor_pedtype 4 model #ARMY in_car [email protected] driverseatwait 5000008E6: set_plane [email protected] landing_gear 0 020A: set_car [email protected] door_status_to 4Model.Destroy(#ARMY)Model.Destroy(#HYDRA)[email protected] = [email protected] = [email protected] = [email protected] = [email protected] = [email protected] = [email protected] == 1jf @loadpath0ACE: show_formatted_text_box "HYDRA respawned at Las Venturas."Marker.CreateAboveaCTOR([email protected], [email protected])Marker.SetColor([email protected], 2) :loadpathwait 10if 07C1: path [email protected] availablejf @loadpath1jump @movingon :loadpath107C0: load_path [email protected] 10jump @loadpath :movingon05EB: assign_car [email protected] to_path [email protected]: release_path [email protected]@ == 1jf @checks0ACE: show_formatted_text_box "HYDRA is now taking off." :checksgosub @deadgosub @transmitgosub @landinggearif and860E: not car [email protected] assigned_to_path08E6: set_plane [email protected] landing_gear 1jf @checks :release06C5: release_car [email protected] [email protected] += 1if0029: [email protected] >= 3jf @detectpatchjump @detectpatch :[email protected] = [email protected] == [email protected] = [email protected] = [email protected] = [email protected] = [email protected] == 10ACE: show_formatted_text_box "NEVADA is now in San Fierro." :putatgosub @deadgosub @[email protected] += 1 [email protected] += [email protected] += -0.5Car.Angle([email protected]) = [email protected]([email protected], [email protected], [email protected], [email protected])if [email protected] == 170jf @putat gosub @angle jump @loadpath :landinggearCar.StorePos([email protected], [email protected], [email protected], [email protected])[email protected] >= 50.0jf @landinggear108E6: set_plane [email protected] landing_gear 0return :landinggear108E6: set_plane [email protected] landing_gear 0return :[email protected] = 0 :angle2gosub @deadgosub @transmit 000B: [email protected] += 1.0000A: [email protected] += 1Car.Angle([email protected]) = [email protected]([email protected], [email protected], [email protected], [email protected])if [email protected] >= 180 else_jump @[email protected] = 0return :deadwait 0if andnot [email protected] == -1not [email protected] == -1jf @endeif andnot Car.Wrecked([email protected])0185: car [email protected] health >= 250not Actor.Dead([email protected])Actor.InCar([email protected], [email protected])jf @endreturn :end0ABF: set_vehicle [email protected] engine_state_to 0Actor.RemoveReferences([email protected])Car.RemoveReferences([email protected])06C5: release_car [email protected] [email protected] == 1jf @start0ACE: show_formatted_text_box "Something very bad happened to the HYDRA." Marker.Disable([email protected])jump @start :endeMarker.Disable([email protected])Actor.RemoveReferences([email protected])Car.RemoveReferences([email protected])jf @endCar.PutAt([email protected],[email protected],[email protected],[email protected],[email protected])jump @loadpath :transmitif0ADC: test_cheat "HYDRA"[email protected] == [email protected] = 1Marker.CreateAboveActor([email protected], [email protected])Marker.SetColor([email protected], 2)0ACE: show_formatted_text_box "HYDRA transmitter online. Type HYDRA again to turn off or hold H and 3 to view info."return Edited November 21, 2015 by Natso Link to comment Share on other sites More sharing options...
ZAZ Posted November 21, 2015 Share Posted November 21, 2015 this is bullsh*t if and860E: not car [email protected] assigned_to_path08E6: set_plane [email protected] landing_gear 1jf @checks because you didn't learn scripting CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
Natso Posted November 21, 2015 Author Share Posted November 21, 2015 Ok thank you very much , i fix it Link to comment Share on other sites More sharing options...
Natso Posted November 21, 2015 Author Share Posted November 21, 2015 (edited) this is bullsh*t if and860E: not car [email protected] assigned_to_path08E6: set_plane [email protected] landing_gear 1jf @checks because you didn't learn scripting ok i fix success Edited November 21, 2015 by Natso Link to comment Share on other sites More sharing options...
Daniel_Absolu Posted November 25, 2015 Share Posted November 25, 2015 Exception I could spend the first code to select SAM Missile? ZAZ Link to comment Share on other sites More sharing options...
goodidea82 Posted November 25, 2015 Share Posted November 25, 2015 Exception I could spend the first code to select SAM Missile? ZAZ You should use higher level constructs like if-then-else, loops (do, while, repeat) eventually with control flow alternation (e.g., break, continue), and gosubs. Furthermore, define the variables using const..end and var..end. Otherwise the code is hard to understand and it is easy to make mistakes. Link to comment Share on other sites More sharing options...
ZAZ Posted November 26, 2015 Share Posted November 26, 2015 So if I had my own way, code makes them take off and landing, and they will automatically run back where they started and fly again? My after they landed and flew away on its own The original script from first post works very well: It let Hydra fly around on paths of SA Airline feature, from LV to SF to LA to LV Hydra starts at LV Airport and flies to SF Airport on path, lands there and make a turn by script, then starts and flies to LA Airport on path, lands there and and make a turn by script then starts and flies to LV Airport on path, lands there and and make a turn by script Then script restarts and let Hydra fly again the route. I didn't understand your changes of your modified script and i didn't understand your plan. Exception I could spend the first code to select SAM Missile? ZAZ You should use higher level constructs like if-then-else, loops (do, while, repeat) eventually with control flow alternation (e.g., break, continue), and gosubs. Furthermore, define the variables using const..end and var..end. Otherwise the code is hard to understand and it is easy to make mistakes. You quoted Daniel_Absolu ... but by the hell, it's a sh*t question without context 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