Rapier 0 Posted August 31, 2009 Share Posted August 31, 2009 we can use the adress 0x00969110 as cheat key_press check This memory address is for version 1.0, but, for version 1.01 which will be? That's because my mods did not work anymore after I did the upgrade to version 1.01 and all are activated as a cheat. Link to post Share on other sites
Wesser 363 Posted August 31, 2009 Share Posted August 31, 2009 It's 0x96B790 for 1.1. Link to post Share on other sites
markbaker 0 Posted August 31, 2009 Share Posted August 31, 2009 wow, thanks ZAZ! this is a god-send Link to post Share on other sites
markbaker 0 Posted August 31, 2009 Share Posted August 31, 2009 One more question: Is there a pathing tool out there like carrec, but for the Camera instead of for cars? It would be nice if i could record a path for my camera to move along during cutscenes, for a cinematic feel. Thanks Link to post Share on other sites
Rapier 0 Posted September 1, 2009 Share Posted September 1, 2009 It's 0x96B790 for 1.1. Thanks Wesser! Link to post Share on other sites
ZAZ 663 Posted September 1, 2009 Author Share Posted September 1, 2009 (edited) One more question: Is there a pathing tool out there like carrec, but for the Camera instead of for cars? It would be nice if i could record a path for my camera to move along during cutscenes, for a cinematic feel. Thanks No, there isn't way to make camera paths. For camera exist a lot of opcodes to realize your plan. One way could be to record a carrec with heli and use then any vehicle to attach the carrec path. Then put the camera on vehicle 00A5: [email protected] = create_car #INFERNUS at 2487.5 -1660.5 13.350679: put_camera_on_car [email protected] with_offset 0.0 -5.0 1.5 rotation 0.0 0.0 0.0 0.0 2//view trunk0679: put_camera_on_car [email protected] with_offset 0.0 -5.0 1.5 <--xyz position relativ to carxyz point to view relativ to car-->> 0.0 0.0 0.0 rotation -->> 0.0 2 <--mode the equivalent for the actor is opcode 067C: The exemple above is from a cutsene which I made to move the camera nearer to the viewpoint 0007: [email protected] = 0.5 // floating-point values0007: [email protected] = 0.0 // floating-point values0007: [email protected] = 0.0 // floating-point values:Loopwait 0067C: $PLAYER_ACTOR [email protected] [email protected] 0.7 [email protected] 13.5 0.5 0.0 2000B: [email protected] += 0.03 // floating-point values000B: [email protected] += 0.01 // floating-point values000B: [email protected] += 0.01 // floating-point valuesjump @Loop If you put the cam to player the player-walk-movement will be buggy In connection with opcode 015F: you can set the camera view to follow an actor automaticly 015F: set_camera_position -2248.2187 -79.441 37.7686 rotation 0.0 0.0 0.0 0159: camera_on_ped [email protected] 15 2 Edited September 1, 2009 by ZAZ Link to post Share on other sites
markbaker 0 Posted September 3, 2009 Share Posted September 3, 2009 ZAZ: I've got a heli flying along a carrec path with a camera attached to the heli. What I want to do is: the heli-mounted camera automatically 'point at' a parked or moving car while the heli is flying along the path. Is this possible? Link to post Share on other sites
ZAZ 663 Posted September 3, 2009 Author Share Posted September 3, 2009 (edited) I've got a heli flying along a carrec path with a camera attached to the heli. What I want to do is: the heli-mounted camera automatically 'point at' a parked or moving car while the heli is flying along the path. Is this possible? Camera on carrec path Only the combination of opcode 015F: and 0159: let the camera follow automaticly a moving target point But we have enough codes in SA to do everything. We can read the car positions as variable values and and insert this variables as parameter in the standart camera position opcode The placing of cars by using parked_car_generator dont allows the using of its variable name in vehicle associated opcodes because its not a car but a car_generator But we can simple use the same coords to insert it in the standart camera target opcode The script below spawns a NRG500 and follows the carrec path carrec899.rrr by keypress 8 The camera shows a fix XYZcoordpoint (I placed a Monster at SFAirport and drove around and inserted the coords of the parked_car #monster in the script) //-init_parked_car_generator #MONSTER color -1 -1 1 alarm 0 door_lock 0 0 10000 at -1355.7821 -71.4736 14.1462 angle 86.0 0160: set_camera_point_at -1355.7821 -71.4736 14.1462 mode 2 {$CLEO .cs}:CameraDrive_103A4: name_thread 'DRVCARC':CameraDrive_110001: wait 0 ms00D6: if0256: player $PLAYER_CHAR defined004D: jump_if_false @CameraDrive_11if0AB0: key_pressed 56//----------- key 8004D: jump_if_false @CameraDrive_110247: request_model #NRG500:CameraDrive_130001: wait 0 ms00D6: if 00248: model #NRG500 available004D: jump_if_false @CameraDrive_1300A5: [email protected] = create_car #NRG500 at 0.0 0.0 100.00175: set_car [email protected] z_angle_to 0.002AC: set_car [email protected] immunities BP 1 FP 1 EP 1 CP 1 MP 10249: release_model #NRG5000006: [email protected] = 89907C0: load_path [email protected]:CameraDrive_170001: wait 0 ms00D6: if07C1: path [email protected] available004D: jump_if_false @CameraDrive_1700D6: if8119: not car [email protected] wrecked004D: jump_if_false @CameraDrive_500001: wait 500 ms05EB: assign_car [email protected] to_path [email protected]:CameraDrive_210001: wait 0 ms00D6: if0256: player $PLAYER_CHAR defined004D: jump_if_false @CameraDrive_5000D6: if or00E1: key_pressed 0 15//Enter/Exit0119: car [email protected] wrecked004D: jump_if_false @CameraDrive_250002: jump @CameraDrive_50:CameraDrive_250407: create_coordinate [email protected] [email protected] [email protected] from_car [email protected] with_offset 0.0 0.0 1.0015F: set_camera_position [email protected] [email protected] [email protected] rotation 0.0 0.0 0.0 //init_parked_car_generator #MONSTER at -1355.7821 -71.4736 14.1462 0160: set_camera_point_at -1355.7821 -71.4736 14.1462 mode 20002: jump @CameraDrive_21:CameraDrive_500001: wait 0 ms00D6: if0256: player $PLAYER_CHAR defined004D: jump_if_false @CameraDrive_500373: set_camera_directly_behind_player02EB: restore_camera_with_jumpcut05EC: release_car [email protected] from_path0873: release_path [email protected]: remove_references_to_car [email protected] // Like turning a car into any random car0001: wait 1000 ms0002: jump @CameraDrive_11 To view a moving target from a moving vehicle is a bit more complicate because we need a script for the moving target and a script for the camera on carrec path. I merged the CarDrive script and the CameraDrive script Script below spawns the car Infernus in Grovestreet with two homies inthere, if player goes into red marker(sphere) additional it spawns a NRG500 and follows the carrec path carrec899.rrr The camera shows a moving XYZcoords of the driving Infernus {$CLEO .cs}:CarrecCamCarDrive_103A4: name_thread 'CRCMCDR':CarrecCamCarDrive_20001: wait 0 msif0256: player $PLAYER_CHAR defined004D: jump_if_false @CarrecCamCarDrive_2if00FE: actor $PLAYER_ACTOR 1 (in-sphere)near_point 2491.5 -1667.5 13.35 radius 1.0 1.0 1.0004D: jump_if_false @CarrecCamCarDrive_20247: request_model #INFERNUS0247: request_model #fam10247: request_model #fam20247: request_model #NRG500:CarrecCamCarDrive_30001: wait 0 msif and0248: model #INFERNUS available0248: model #fam1 available0248: model #fam2 available0248: model #NRG500 available004D: jump_if_false @CarrecCamCarDrive_300A5: [email protected] = create_car #INFERNUS at 2487.5 -1660.5 13.350175: set_car [email protected] z_angle_to 90.00129: [email protected] = create_actor 8 #fam1 in_car [email protected] driverseat01C8: [email protected] = create_actor 8 #fam2 in_car [email protected] passenger_seat 00186: [email protected] = create_marker_above_car [email protected]: set_marker [email protected] type_to 100A5: [email protected] = create_car #NRG500 at 0.0 0.0 100.00175: set_car [email protected] z_angle_to 0.002AC: set_car [email protected] immunities BP 1 FP 1 EP 1 CP 1 MP 10006: [email protected] = 89907C0: load_path [email protected]:CarrecCamCarDrive_50001: wait 0 ms00D6: if07C1: path [email protected] available004D: jump_if_false @CarrecCamCarDrive_500D6: if8119: not car [email protected] wrecked004D: jump_if_false @CarrecCamCarDrive_500001: wait 500 ms05EB: assign_car [email protected] to_path [email protected]//////////////////// the drive-to commands --vv----0615: define_action_sequences [email protected]: AS_actor -1 drive_car [email protected] to 2353.1528 -1658.6493 13.384 speed 20.0 0 0 505D1: AS_actor -1 drive_car [email protected] to 2431.7739 -1674.7444 13.6643 speed 20.0 0 0 505D1: AS_actor -1 drive_car [email protected] to 2431.5864 -1628.0818 13.698 speed 20.0 2 0 50616: define_action_sequences_end [email protected]: assign_actor [email protected] to_action_sequences [email protected]: remove_references_to_AS_pack [email protected]//////////////////// the drive-to commands --^^----:CarrecCamCarDrive_130001: wait 0 msif0256: player $PLAYER_CHAR defined004D: jump_if_false @CarrecCamCarDrive_13//////////////////// the the camera codes must run in a Loop --vv----0407: create_coordinate [email protected] [email protected] [email protected] from_car [email protected] with_offset 0.0 0.0 1.5015F: set_camera_position [email protected] [email protected] [email protected] rotation 0.0 0.0 0.00407: create_coordinate [email protected] [email protected] [email protected] from_car [email protected] with_offset 0.0 0.0 1.00160: set_camera_point_at [email protected] [email protected] [email protected] mode 2//////////////////// the the camera codes must run in a Loop --vv----if or00E1: key_pressed 0 15//Enter/Exit0119: car [email protected] wrecked0119: car [email protected] wrecked01F4: car [email protected] flipped8202: not actor $PLAYER_ACTOR near_car [email protected] radius 500.0 500.0 flag 0004D: jump_if_false @CarrecCamCarDrive_13:CarrecCamCarDrive_500001: wait 0 ms00D6: if0256: player $PLAYER_CHAR defined004D: jump_if_false @CarrecCamCarDrive_500373: set_camera_directly_behind_player02EB: restore_camera_with_jumpcut05EC: release_car [email protected] from_path0873: release_path [email protected]: remove_references_to_car [email protected] // Like turning a car into any random car01C3: remove_references_to_car [email protected] // Like turning a car into any random car01C2: remove_references_to_actor [email protected] // Like turning an actor into a random pedestrian01C2: remove_references_to_actor [email protected] // Like turning an actor into a random pedestrian0164: disable_marker [email protected]: release_model #INFERNUS0249: release_model #fam10249: release_model #fam20249: release_model #NRG5000001: wait 1000 ms0002: jump @CarrecCamCarDrive_2 Edited September 3, 2009 by ZAZ Link to post Share on other sites
Chuka 0 Posted September 11, 2009 Share Posted September 11, 2009 ZAZ!! in Spanish! please!! Link to post Share on other sites
ZAZ 663 Posted September 11, 2009 Author Share Posted September 11, 2009 ZAZ!! in Spanish! please!! try google translation, but don't use the translated scripts Link to post Share on other sites
Rapier 0 Posted September 12, 2009 Share Posted September 12, 2009 (edited) Important information (I think...): Memory address to check if exist a target on the map (red mark) for SA 1.01: 0x00BA8DF7. Edited September 12, 2009 by Rapier Link to post Share on other sites
markbaker 0 Posted September 12, 2009 Share Posted September 12, 2009 ZAZ Much thanks! I am making great progress on my project! I'm wondering if it is possible to assign a vehicle directly to a path contained in an rrr file - without having to close GTA:SA & open the R3D tool and add it to carrec.img? It would be a HUGE timesaver if I could record a path, and then immediately playback my recorded paths with a simple keypress to see how it looks Link to post Share on other sites
ZAZ 663 Posted September 12, 2009 Author Share Posted September 12, 2009 (edited) I'm wondering if it is possible to assign a vehicle directly to a path contained in an rrr file - without having to close GTA:SA & open the R3D tool and add it to carrec.img? Not possible i think but what is R3D tool? IMG is loaded by startup Start game with menue button of sannybuilder is faster Edited September 12, 2009 by ZAZ Link to post Share on other sites
kmasdmk 0 Posted September 12, 2009 Share Posted September 12, 2009 Hi all. I need help with my small anim. I have this anim in file dancing.ifp And i want use this anim in air. And idk how. Here is my cleo code. ... Player.Defined($PLAYER_CHAR)else_jump @RASK14_MOD_21 04ED: load_animation "DANCING" :RASK14_MOD_52wait 10 if and0AB0: key_pressed 49 8818: not actor $PLAYER_ACTOR in_air 84AD: not actor $PLAYER_ACTOR in_water 8449: not actor $PLAYER_ACTOR in_a_car 847A: not actor $PLAYER_ACTOR driving_bike 84A7: not actor $PLAYER_ACTOR driving_boat 84C8: not actor $PLAYER_ACTOR driving_flying_vehicle 84A9: not actor $PLAYER_ACTOR driving_heli else_jump @RASK14_MOD_150 0605: actor $PLAYER_ACTOR perform_animation_sequence "BD_CLAP" IFP_file "DANCING" 4.0 loop 1 1 1 0 time 700 // versionA wait 1500 ... What i need edit or add ? With this player use anim on earth. Thanks. (sorry when i write this post to bad topic.i am new on this forum.) Link to post Share on other sites
ZAZ 663 Posted September 14, 2009 Author Share Posted September 14, 2009 (edited) (sorry when i write this post to bad topic.i am new on this forum.) No problem but the forum to post such question is here I need help with my small anim.I have this anim in file dancing.ifp And i want use this anim in air. And idk how. Here is my cleo code. What i need edit or add ? With this player use anim on earth. Thanks. What means in air? While falling or should the actor fly? Have you seen the Airswim script in chapter CLEO Script Tutorial/Additional Themes : Animations ? press Backspace to dance in air {$CLEO .cs}:Airdance03A4: name_thread 'AirDnce' :AirDance_010001: wait 0 ms00D6: if 00256: player $PLAYER_CHAR defined004D: jump_if_false @AirDance_0100D6: if 00AB0: key_pressed 8004D: jump_if_false @AirDance_0104ED: load_animation "DANCING" :AirDance_030001: wait 0 msif04EE: animation "DANCING" loaded004D: jump_if_false @AirDance_03083C: set_actor $PLAYER_ACTOR velocity_in_direction_XYZ 0.0 0.0 20.00001: wait 1000 ms0812: unknown_action_sequence $PLAYER_ACTOR "BD_CLAP" from_file "DANCING" 1.0 1 1 1 1 -2:AirDance_050001: wait 0 ms00D6: if 00256: player $PLAYER_CHAR defined004D: jump_if_false @AirDance_05083C: set_actor $PLAYER_ACTOR velocity_in_direction_XYZ 0.0 2.0 2.0if and8AB0: not key_pressed 80611: actor $PLAYER_ACTOR animation == "BD_CLAP" 004D: jump_if_false @AirDance_070002: jump @AirDance_05:AirDance_070792: disembark_instantly_actor $PLAYER_ACTOR04EF: release_animation "DANCING"0001: wait 1000 ms0002: jump @AirDance_01 Edited September 14, 2009 by ZAZ Link to post Share on other sites
bull.04 0 Posted September 18, 2009 Share Posted September 18, 2009 How do you make a timer? Link to post Share on other sites
ZAZ 663 Posted September 19, 2009 Author Share Posted September 19, 2009 How do you make a timer? Look at CLEO Script Tutorial/Give access with math coding : Time check for milliseconds in real time Link to post Share on other sites
bull.04 0 Posted September 19, 2009 Share Posted September 19, 2009 I mean one that counts down on screen like in the mission where you steal weapons from Colonel Fuhrberger's house. Link to post Share on other sites
Glenstorm 0 Posted September 20, 2009 Share Posted September 20, 2009 sorry if this was covered earlier in the tutorial... but pls help.. how to create a script which uses a parked car generator, which does not save the car if the game is saved? in other words, i want the car to be there, if the .cs script is in the CLEO folder, and not to be there when it is removed, regardless of the user saving his game in between... currently im trying with enable_thread_saving thing.... i removed the line and it still gets saved in the savegame... how to remove this stupid functionality? Link to post Share on other sites
ZAZ 663 Posted September 20, 2009 Author Share Posted September 20, 2009 (edited) sorry if this was covered earlier in the tutorial... but pls help.. how to create a script which uses a parked car generator, which does not save the car if the game is saved? in other words, i want the car to be there, if the .cs script is in the CLEO folder, and not to be there when it is removed, regardless of the user saving his game in between... currently im trying with enable_thread_saving thing.... i removed the line and it still gets saved in the savegame... how to remove this stupid functionality? This function is a parked_car_generator and not a car. The savegame don't stores a placed car. It stores a parked_car_generator funktion You can set that the generator don't places cars with ciro as last parameter in opcode 014C: 014C: set_parked_car_generator $PARKED_BMX_GLEN_PARK cars_to_generate_to 0 but it's not possible to remove the generator funktion Also enable_thread_saving can not prevent that. The opcode 0A95: enable_thread_saving should prevent duplicates of parked_car_generators, pickups or placed objects by making savgames, load that save, save it again and so on. Edited September 20, 2009 by ZAZ Link to post Share on other sites
bull.04 0 Posted September 21, 2009 Share Posted September 21, 2009 can you make an example script that shows how to make a timer to show up on the screen? Link to post Share on other sites
ZAZ 663 Posted September 22, 2009 Author Share Posted September 22, 2009 can you make an example script that shows how to make a timer to show up on the screen? The game supports opcodes to show automatic timers but it needs to insert global variables and because global can cause bugs and crashes in Cleo I will show first how to display timers in scripted variation. This needs to calculate the values of [email protected] or [email protected] to show minutes and seconds, for the text number display can be used text_draw opcodes, text_high_priority opcodes or text_style opcodes I made a little script which invite you to run with your player_actor around the SF-garage in Doherty Go into the red marker (not that to start the mission) then run to the next red marker and so on A yellow blip on radar shows you where to run The first script shows the simple value of [email protected] text_draw opcodes are used to show the value {$CLEO .cs}:Timeout_1// --- [email protected] and [email protected] are allways running as script timer in ms and you can catch its valuethread 'Timeout' 018A: [email protected] = create_checkpoint_at -2026.2032 139.4361 28.8:Timeout_3//------------------------------------------------------- first loopwait 0 if0256: player $PLAYER_CHAR defined jf @Timeout_303F0: enable_text_draw 1045A: text_draw_1number 500.0 200.0 'NUMBER' [email protected]: actor $PLAYER_ACTOR 1 (in-sphere)near_point -2026.2032 139.4361 28.83 radius 2.5 2.5 5.5jf @Timeout_3Marker.Disable([email protected])018A: [email protected] = create_checkpoint_at -2057.0911 139.3797 [email protected] = 0// set the timer to 0:Timeout_5//------------------------------------------------------- second loopwait 0 if0256: player $PLAYER_CHAR defined jf @Timeout_repeat03F0: enable_text_draw 1045A: text_draw_1number 500.0 200.0 'NUMBER' [email protected]@ > 4000// check if timer is bigger than 4000msjf @Timeout_7jump @Timeout_repeat:Timeout_7if00FE: actor $PLAYER_ACTOR 1 (in-sphere)near_point -2057.0911 139.3797 28.83 radius 2.5 2.5 5.5jf @Timeout_5Marker.Disable([email protected])018A: [email protected] = create_checkpoint_at -2063.8882 184.6683 [email protected] = 0// set the timer to 0:Timeout_9//------------------------------------------------------- third loopwait 0 if0256: player $PLAYER_CHAR defined jf @Timeout_repeat03F0: enable_text_draw 1045A: text_draw_1number 500.0 200.0 'NUMBER' [email protected]@ > 5000// check if timer is bigger than 4000msjf @Timeout_11jump @Timeout_repeat:Timeout_11if00FE: actor $PLAYER_ACTOR 1 (in-sphere)near_point -2063.8882 184.6683 28.843 radius 2.5 2.5 5.5jf @Timeout_9Marker.Disable([email protected])018A: [email protected] = create_checkpoint_at -2024.1184 180.6013 [email protected] = 0// set the timer to 0:Timeout_13//------------------------------------------------------- fourth loopwait 0 if0256: player $PLAYER_CHAR defined jf @Timeout_repeat03F0: enable_text_draw 1045A: text_draw_1number 500.0 200.0 'NUMBER' [email protected]@ > 5000// check if timer is bigger than 5000msjf @Timeout_15jump @Timeout_repeat:Timeout_15if00FE: actor $PLAYER_ACTOR 1 (in-sphere)near_point -2024.1184 180.6013 28.8359 radius 2.5 2.5 5.5jf @Timeout_1300BA: show_text_styled GXT 'M_PASSD' time 5000 style 1Marker.Disable([email protected])03F0: enable_text_draw 00A93: end_custom_thread//- end by success:Timeout_repeat//-----------------------refresh00BA: show_text_styled GXT 'M_FAIL' time 5000 style 103F0: enable_text_draw 0Marker.Disable([email protected])018A: [email protected] = create_checkpoint_at -2026.2032 139.4361 28.80002: jump @Timeout_3 The next script shows the calculated values of [email protected] as seconds and 1/100 of a second text_draw opcodes are used to show the time Use the fxt below and insert it into your fxt file Showt01 SHOWTime: ~1~:~1~ Run again around the SF-garage in Doherty {$CLEO .cs}:Showtime_1thread 'Showtime' 018A: [email protected] = create_checkpoint_at -2026.2032 139.4361 28.8:Showtime_3//------------------------------------------------------- first loopwait 0 if0256: player $PLAYER_CHAR defined jf @Showtime_3if00FE: actor $PLAYER_ACTOR 1 (in-sphere)near_point -2026.2032 139.4361 28.83 radius 2.5 2.5 5.5jf @Showtime_3Marker.Disable([email protected])018A: [email protected] = create_checkpoint_at -2057.0911 139.3797 [email protected] = [email protected] = 4000//----countdownt start value in ms:Showtime_5//------------------------------------------------------- second loopwait 0 if0256: player $PLAYER_CHAR defined jf @Showtime_repeatgosub @Showtime_text_draw//---------- gosub to the display [email protected] > 4000//-- must be equal to the previous countdownt start valuejf @Showtime_7jump @Showtime_repeat:Showtime_7if00FE: actor $PLAYER_ACTOR 1 (in-sphere)near_point -2057.0911 139.3797 28.83 radius 2.5 2.5 5.5jf @Showtime_5Marker.Disable([email protected])018A: [email protected] = create_checkpoint_at -2063.8882 184.6683 [email protected] = [email protected] = 5000//----countdownt start value in ms:Showtime_9//------------------------------------------------------- third loopwait 0 if0256: player $PLAYER_CHAR defined jf @Showtime_repeatgosub @Showtime_text_draw//---------- gosub to the display [email protected] > 5000//-- must be equal to the previous countdownt start valuejf @Showtime_11jump @Showtime_repeat:Showtime_11if00FE: actor $PLAYER_ACTOR 1 (in-sphere)near_point -2063.8882 184.6683 28.843 radius 2.5 2.5 5.5jf @Showtime_9Marker.Disable([email protected])018A: [email protected] = create_checkpoint_at -2024.1184 180.6013 [email protected] = [email protected] = 5000//----countdownt start value in ms:Showtime_13//------------------------------------------------------- fourth loopwait 0 if0256: player $PLAYER_CHAR defined jf @Showtime_repeatgosub @Showtime_text_draw//---------- gosub to the display [email protected] > 5000//-- must be equal to the previous countdownt start valuejf @Showtime_15jump @Showtime_repeat:Showtime_15if00FE: actor $PLAYER_ACTOR 1 (in-sphere)near_point -2024.1184 180.6013 28.8359 radius 2.5 2.5 5.5jf @Showtime_1300BA: show_text_styled GXT 'M_PASSD' time 5000 style 1Marker.Disable([email protected])03F0: enable_text_draw 00A93: end_custom_thread//- end by success:Showtime_repeat//-----------------------refresh00BA: show_text_styled GXT 'M_FAIL' time 5000 style 103F0: enable_text_draw 0Marker.Disable([email protected])018A: [email protected] = create_checkpoint_at -2026.2032 139.4361 28.80002: jump @Showtime_3:Showtime_text_draw//------------------------------- subscript0085: [email protected] = [email protected] // make a local equal to the timer [email protected] 0085: [email protected] = [email protected] // make one more local equal to the timer [email protected] 0085: [email protected] = [email protected] // make a local equal to the countdownt start value which show the [email protected] /= [email protected] /= 10000062: [email protected] -= [email protected] 0085: [email protected] = [email protected] // make one more local equal to the countdownt start value which show parts of seconds [email protected] /= [email protected] /= 100062: [email protected] -= [email protected]: enable_text_draw 1 0340: set_text_draw_RGBA 0 64 255 255 033F: set_text_draw_letter_size 0.5 3.0 0343: set_text_draw_linewidth 640.0 045B: draw_text_2numbers 450.0 200.0 GXT 'SHOWT01' numbers [email protected] [email protected] Instead text_draw opcodes can also be used text_high_priority opcodes replace 03F0: enable_text_draw 1 0340: set_text_draw_RGBA 0 64 255 255 033F: set_text_draw_letter_size 0.5 3.0 0343: set_text_draw_linewidth 640.0 045B: draw_text_2numbers 450.0 200.0 GXT 'SHOWT01' numbers [email protected] [email protected] with 02FD: show_text_2numbers_lowpriority GXT 'Showt01' numbers [email protected] [email protected] time 10 flag 1 or use text_style opcodes and replace it with 036D: show_text_2numbers_styled GXT 'Showt01' numbers [email protected] [email protected] time 5 style 6 As I said above can also be used an automatic timer but it needs to use global variables You need first to declare the value then start the timer. Use stop timer at the end to remove the reference of the timer and of the variable type 1 counts in descending order and type 0 counts in ascending order {$CLEO .cs}:Timer_1thread 'TIMER'0004: $time2 = 90000 // integer values014E: set_timer_to $time2 type 1:Timer_2wait 0if$time2 == 0jf @Timer_2014F: stop_timer $time200BA: show_text_styled GXT 'fem_off' time 1000 style 10A93: end_custom_thread For the timer exist also a version which show a text replace 014E: set_timer_to $time2 type 1 with 03C3: set_timer_to $time2 type 1 GXT 'Showt01' // global_variable // Time To make it complete I show also how to use the StatusText or StatusBar opcode But it needs also to use global variables At first the StatusText opcode which displays only a value as numbers It displays not the time but it displays automaticly the value of the global variable {$CLEO .cs}:Status_1thread 'STATUS'0004: $time2 = 1000 // integer values03C4: set_status_text $time2 type 0 GXT 'Showt01' // global_variable // Score ~1~:Status_2wait 0$time2 -= 1if$time2 == 0jf @Status_20151: remove_status_text $time200BA: show_text_styled GXT 'fem_off' time 1000 style 10A93: end_custom_thread type 0 shows the value as numbers type 1 shows the value as an bar also there exist other opcodes to displays more StatusTexts or StatusBars in more rows among each other for the statusBar you must consider that a full bar have allways the value 100 and to show the correct bar needs to calculate the value relativ to 100 in other words: the bar shows percents {$CLEO .cs}:Status2_1thread 'STATUS2'0004: $time1 = 100 // integer values0004: $time2 = 1000 // integer values04F7: status_text $time1 type 1 line 1 GXT 'Showt01' // global_variable // Score04F7: status_text $time2 type 0 line 2 GXT 'Showt01' // global_variable // Score:Status2_2wait 0$time2 -= 10084: $time1 = $time2$time1 /= 10if$time2 == 0jf @Status2_20151: remove_status_text $time10151: remove_status_text $time200BA: show_text_styled GXT 'fem_off' time 1000 style 10A93: end_custom_thread Link to post Share on other sites
larvaz 0 Posted October 28, 2009 Share Posted October 28, 2009 (edited) Wusup! hello 2 Everyone... well im new here, at the forum, i think ive been coding from the last month XD.. i was reading ZAZ car drive tut.. i took the examle code, the one that uses 07E7: AS_assign_scmpath_to_actor im planing a race script around the city, NFS style jojo.. but ive troubles with my code... everythings fine when makin the cars, the "oponent" perfectly follows my desired path... then i decide to make a winnin condition, cheking if any of the cars reached the final race chekpoint, near the train station.. heres the whole code {$CLEO .cs}:scmpath_103A4: name_thread 'SCMP':scmpath_30001: wait 0 msif0256: player $PLAYER_CHAR definedjf @scmpath_3077E: [email protected] = active_interiorif and0038: [email protected] == 0 // integer values0AB0: key_pressed 8//----------------------------------------Backspace jf @scmpath_3016A: fade 0 () 250 ms0001: wait 250 ms01B4: set_player $PLAYER_CHAR frozen_state 0 (frozen)0362: remove_actor $PLAYER_ACTOR from_car_and_place_at -1338.5 -408.1 14.10173: set_actor $PLAYER_ACTOR z_angle_to 90.80001: wait 500 ms0247: request_model #INFERNUS0247: request_model #MAFFA:scmpath_50001: wait 0 msif and0248: model #INFERNUS available 0248: model #MAFFA availablejf @scmpath_500C0: set_current_time_hours_to 1 minutes_to 0 // i prefer raciin at nite jojo00A5: [email protected] = create_car #INFERNUS at 2639.6252 2097.3906 10.6558 //put car racestart0175: set_car [email protected] z_angle_to 191.00224: set_car [email protected] health_to 200000A5: [email protected] = create_car #INFERNUS at 2634.3599 2097.4692 10.6499 //put opponent racestart0175: set_car [email protected] z_angle_to 191.00224: set_car [email protected] health_to 2000020A: set_car [email protected] door_status_to 402AC: set_car [email protected] immunities 1 1 1 1 101EC: make_car [email protected] very_heavy 10129: [email protected] = create_actor 24 #MAFFA in_car [email protected] driverseat0223: set_actor [email protected] health_to 300004E4: unknown_refresh_game_renderer_at 2639.6252 2097.390603CB: set_camera 2639.6252 2097.3906 10.6558029B: [email protected] = init_object 1655 at -1576.02 -202.34 13.760177: set_object [email protected] z_angle_to 270.001C7: remove_object_from_mission_cleanup_list [email protected]: set_object [email protected] collision_detection 1029B: [email protected] = init_object 1655 at -1597.9 -506.5 21.70177: set_object [email protected] z_angle_to 270.001C7: remove_object_from_mission_cleanup_list [email protected]: set_object [email protected] collision_detection 1029B: [email protected] = init_object 1655 at -1375.9 -581.5 13.690177: set_object [email protected] z_angle_to 270.001C7: remove_object_from_mission_cleanup_list [email protected]: set_object [email protected] collision_detection 1029B: [email protected] = init_object 1655 at -1374.9 -585.5 13.690177: set_object [email protected] z_angle_to 270.001C7: remove_object_from_mission_cleanup_list [email protected]: set_object [email protected] collision_detection 10177: set_object [email protected] z_angle_to 135.00177: set_object [email protected] z_angle_to 225.00177: set_object [email protected] z_angle_to 280.00177: set_object [email protected] z_angle_to 280.00186: [email protected] = create_marker_above_car [email protected]: set_marker [email protected] type_to 10249: release_model #INFERNUS0249: release_model #MAFFACar.LockInCurrentPosition([email protected]) = TrueCar.LockInCurrentPosition([email protected]) = True04e0: car [email protected] abandon_path_radius 20000AD: set_car [email protected] max_speed_to 100.004BA: set_car [email protected] speed_instantly 30.000AF: set_car [email protected] driver_behaviour_to 100AE: unknown_set_car [email protected] to_ignore_traffic_lights 20001: wait 250 ms036A: put_actor $PLAYER_ACTOR in_car [email protected]: wait 250 ms016A: fade 1 () 1000 ms0001: wait 1000 ms0373: set_camera_directly_behind_player02EB: restore_camera_with_jumpcut01B4: set_player $PLAYER_CHAR frozen_state 1 (unfrozen)0006: [email protected] = 0 // integer values0006: [email protected] = 0 // integer values0006: [email protected] = 20000 // floating-point values0006: [email protected] = 0 // integer values 0007: [email protected] = 2647.3511 // floating-point values0007: [email protected] = 2069.1543 // floating-point values 2647.8835 2068.5312 9.70850007: [email protected] = 10.1373 // floating-point values0006: $win = 00006: $lose = 0wait 3000 msCar.LockInCurrentPosition([email protected]) = FalseCar.LockInCurrentPosition([email protected]) = False00A7: car [email protected] drive_to [email protected] [email protected] [email protected]: set_car [email protected] max_speed_to 100.004e0: car [email protected] abandon_path_radius 25008C6: set_actor [email protected] stay_on_bike 106D5: $check = create_racing_checkpoint_at 2866.5557 1279.0804 15.0 point_to 2866.5557 1279.0804 10.763 type 1 radius 15.0 //heres the checkpoint coords:scmpath_70001: wait 0 msif0256: player $PLAYER_CHAR definedjf @scmpath_70050: gosub @scmpath_sub_3if and8119: NOT car [email protected] wrecked8119: NOT car [email protected] wrecked8118: NOT actor [email protected] deadjf @scmpath_7if00FE: actor $PLAYER_ACTOR 0 ()near_point 2639.6252 2097.3906 10.6558 radius 1000.5 1000.5 50.5jf @scmpath_12//// heres where i put the $PLAYER_ACTOR´s car winnin condition...////:checkwinwait 0if80EC: actor $PLAYER_ACTOR 0 near_point 2866.5557 1279.0804 10.763 radius 8.0 8.0 //check if youve reach tha finish linejf @scmpath_7:putwin //true? winnin gets 1 value0006: $win = 1jump @chekloop //and jumps to make the check, otherwise it continues with normal script// end of winnin conditionjump @scmpath_7:scmpath_120164: disable_marker [email protected]: remove_references_to_car [email protected] // Like turning a car into any random car01C3: remove_references_to_car [email protected] // Like turning a car into any random car01C2: remove_references_to_actor [email protected] // Like turning an actor into a random pedestrian0108: destroy_object [email protected]: destroy_object [email protected]: destroy_object [email protected]: destroy_object [email protected] @scmpath_3:scmpath_sub_3if8119: NOT car [email protected] wreckedjf @scmpath_sub_109if00DB: actor [email protected] in_car [email protected] @scmpath_sub_99if0039: [email protected] == 1 // integer valuesjf @scmpath_sub_100006: [email protected] = 0 // integer valuesjump @scmpath_sub_100:scmpath_sub_10if0039: [email protected] == 0 // integer valuesjf @scmpath_sub_11if01AF: car [email protected] 0 ()near_point [email protected] [email protected] [email protected] radius 5.2 5.2 5.0jf @scmpath_sub_110006: [email protected] = 1 // integer values05D6: clear_scmpath0007: [email protected] = 2690.3149 // floating-point values0007: [email protected] = 2003.0887 // floating-point values0007: [email protected] = 6.6397 // floating-point values000A: [email protected] += 0 // integer values 0007: [email protected] = 100.0 // floating-point values0007: [email protected] = 20.0 // floating-point values05D7: add_point_to_scmpath [email protected] [email protected] [email protected] @scmpath_sub_100:scmpath_sub_11if0039: [email protected] == 1 // integer valuesjf @scmpath_sub_12if01AF: car [email protected] 0 ()near_point [email protected] [email protected] [email protected] radius 15.2 15.2 5.0jf @scmpath_sub_1200AD: set_car [email protected] max_speed_to 10.00006: [email protected] = 2 // integer values05D6: clear_scmpath0007: [email protected] = 2705.8157 // floating-point values0007: [email protected] = 1937.0188 // floating-point values 0007: [email protected] = 6.6761 // floating-point values000A: [email protected] += 0 // integer values0007: [email protected] = 100.0 // floating-point values0007: [email protected] = 20.0 // floating-point values05D7: add_point_to_scmpath [email protected] [email protected] [email protected] @scmpath_sub_100:scmpath_sub_12if0039: [email protected] == 2 // integer valuesjf @scmpath_sub_13if01AF: car [email protected] 0 ()near_point [email protected] [email protected] [email protected] radius 15.2 15.2 5.0jf @scmpath_sub_1300AD: set_car [email protected] max_speed_to 25.00006: [email protected] = 3 // integer values05D6: clear_scmpath0007: [email protected] = 2726.5459 // floating-point values0007: [email protected] = 1887.1978 // floating-point values 0007: [email protected] = 6.6737 // floating-point values000A: [email protected] += 0 // integer values0007: [email protected] = 100.0 // floating-point values0007: [email protected] = 20.0 // floating-point values05D7: add_point_to_scmpath [email protected] [email protected] [email protected] @scmpath_sub_100:scmpath_sub_13if0039: [email protected] == 3 // integer valuesjf @scmpath_sub_14if01AF: car [email protected] 0 ()near_point [email protected] [email protected] [email protected] radius 8.2 8.2 5.0jf @scmpath_sub_1400AD: set_car [email protected] max_speed_to 25.00006: [email protected] = 4 // integer values05D6: clear_scmpath0007: [email protected] = 2737.7283 // floating-point values0007: [email protected] = 1763.1494 // floating-point values0007: [email protected] = 6.8209 // floating-point values 000A: [email protected] += 0 // integer values0007: [email protected] = 100.0 // floating-point values0007: [email protected] = 20.0 // floating-point values05D7: add_point_to_scmpath [email protected] [email protected] [email protected] @scmpath_sub_100:scmpath_sub_14if0039: [email protected] == 4 // integer valuesjf @scmpath_sub_15if01AF: car [email protected] 0 ()near_point [email protected] [email protected] [email protected] radius 5.2 5.2 5.0jf @scmpath_sub_150006: [email protected] = 5 // integer values05D6: clear_scmpath0007: [email protected] = 2747.7874 // floating-point values0007: [email protected] = 1691.6516 // floating-point values0007: [email protected] = 8.8271 // floating-point values 000A: [email protected] += 0 // integer values0007: [email protected] = 100.0 // floating-point values0007: [email protected] = 20.0 // floating-point values05D7: add_point_to_scmpath [email protected] [email protected] [email protected] @scmpath_sub_100:scmpath_sub_15if0039: [email protected] == 5 // integer valuesjf @scmpath_sub_16if01AF: car [email protected] 0 ()near_point [email protected] [email protected] [email protected] radius 15.2 15.2 5.0jf @scmpath_sub_1600AD: set_car [email protected] max_speed_to 10.00006: [email protected] = 6 // integer values05D6: clear_scmpath0007: [email protected] = 2844.8591 // floating-point values0007: [email protected] = 1537.704 // floating-point values0007: [email protected] = 10.7916 // floating-point values000A: [email protected] += 0 // integer values0007: [email protected] = 40.0 // floating-point values 0007: [email protected] = 10.0 // floating-point values05D7: add_point_to_scmpath [email protected] [email protected] [email protected]: unknown_set_car [email protected] to_ignore_traffic_lights 2jump @scmpath_sub_100:scmpath_sub_16if0039: [email protected] == 6 // integer valuesjf @scmpath_sub_17if01AF: car [email protected] 0 ()near_point [email protected] [email protected] [email protected] radius 8.2 8.2 5.0jf @scmpath_sub_1700AD: set_car [email protected] max_speed_to 0.00006: [email protected] = 7 // integer values05D6: clear_scmpath0007: [email protected] = 2867.3679 // floating-point values0007: [email protected] = 1490.7612 // floating-point values0007: [email protected] = 10.7581 // floating-point values000A: [email protected] += 0 // integer values 0007: [email protected] = 100.0 // floating-point values 0007: [email protected] = 0.0 // floating-point values05D7: add_point_to_scmpath [email protected] [email protected] [email protected]: unknown_set_car [email protected] to_ignore_traffic_lights 2jump @scmpath_sub_100:scmpath_sub_17if0039: [email protected] == 7 // integer valuesjf @scmpath_sub_18if01AF: car [email protected] 0 ()near_point [email protected] [email protected] [email protected] radius 15.2 15.2 5.0jf @scmpath_sub_1800AD: set_car [email protected] max_speed_to 5.001EB: set_car_density_to 0.00006: [email protected] = 8 // integer values05D6: clear_scmpath0007: [email protected] = 2862.9255 // floating-point values0007: [email protected] = 1298.3546 // floating-point values0007: [email protected] = 10.5398 // floating-point values last checkpoint!!!!!000A: [email protected] += 0 // integer values 0007: [email protected] = 100.0 // floating-point values0007: [email protected] = 20.0 // floating-point values05D7: add_point_to_scmpath [email protected] [email protected] [email protected] @scmpath_sub_100:scmpath_sub_18if0039: [email protected] == 8 // integer valuesjf @scmpath_sub_109if01AF: car [email protected] 0 ()near_point [email protected] [email protected] [email protected] radius 25.2 25.2 5.0jf @scmpath_sub_109 // aand heres the oponnent´s car winnin conditionif01AF: car [email protected] 0 ()near_point 2866.5557 1279.0804 10.763 radius 8.2 8.2 5.0 jf @scmpath_sub_109 // if [email protected] reached tha finish line, $lose becomes 10006: $lose = 1:chekloopwait 0if0039: $win == 1 //checkin if $PLAYER_ACTOR´s car already reached finish linejump @winner //so make me the winner //if false checks if oponents reached finishif0039: $lose == 1jump @loserace //if true, youre a loser ha-hA:winner00AD: set_car [email protected] max_speed_to 0.00006: [email protected] = 1 // integer values //winnin text00BC: text_highpriority 'BJ_WIN' 5000 ms 1jump @scmpath_12:loserace00AD: set_car [email protected] max_speed_to 0.00006: [email protected] = 1 // integer values //loser text00BC: text_highpriority 'BJ_LOSE' 5000 ms 1// end of conditionjump @scmpath_12000A: [email protected] += 1 // integer values05D6: clear_scmpath0007: [email protected] = -1181.78 // floating-point values0007: [email protected] = -331.30 // floating-point values0007: [email protected] = 13.76 // floating-point values0007: [email protected] = 100.0 // floating-point values0007: [email protected] = 20.0 // floating-point values05D7: add_point_to_scmpath [email protected] [email protected] [email protected]: [email protected] == 2 // integer valuesjf @scmpath_sub_10000BC: text_highpriority 'BJ_LOSE' 5000 ms 1jump @scmpath_sub_100:scmpath_sub_99if0039: [email protected] == 0 // integer valuesjf @scmpath_sub_10900AD: set_car [email protected] max_speed_to 0.005CB: actor_goto_and_enter_car [email protected] [email protected] 50000006: [email protected] = 1 // integer valuesjump @scmpath_sub_109:scmpath_sub_10007E7: AS_assign_scmpath_to_actor [email protected] in_car [email protected] speed [email protected] flags 2 0 303F0: text_draw_toggle 00006: [email protected] = 0 // integer valuesjump @scmpath_sub_109:scmpath_sub_102if01F3: car [email protected] airbornejf @scmpath_sub_1030007: [email protected] = 0.0 // floating-point values04BA: set_car [email protected] speed_instantly [email protected]: AS_assign_scmpath_to_actor [email protected] in_car [email protected] speed [email protected] flags 2 0 3jump @scmpath_sub_103:scmpath_sub_103if01AF: car [email protected] 0 ()near_point [email protected] [email protected] [email protected] radius 30.2 30.2 5.0jf @scmpath_sub_104jump @scmpath_sub_105:scmpath_sub_10402E3: [email protected] = car [email protected] speedif81F3: NOT car [email protected] airbornejf @scmpath_sub_106if and0021: [email protected] > 30.0 // floating-point values0019: [email protected] > 700 // integer valuesjf @scmpath_sub_10504BA: set_car [email protected] speed_instantly 50.0:scmpath_sub_105if0019: [email protected] > 2000 // integer valuesjf @scmpath_sub_109:scmpath_sub_1060006: [email protected] = 0 // integer values:scmpath_sub_1090051: return let me remember u, i used ZAZ example script the [email protected] prob is that when i press backspace to start tha race, the cars are placed as normal but it seems the winnin condition is broken, and the text You win is showed since the beginning of the race... it nevers check if the car´s at finish line... i dunno whers my code error haha... heres my code without the winnin checks, runs perfectly... {$CLEO .cs}:scmpath_103A4: name_thread 'SCMP':scmpath_30001: wait 0 msif0256: player $PLAYER_CHAR definedjf @scmpath_3077E: [email protected] = active_interiorif and0038: [email protected] == 0 // integer values0AB0: key_pressed 8//----------------------------------------Backspace jf @scmpath_3016A: fade 0 () 250 ms0001: wait 250 ms01B4: set_player $PLAYER_CHAR frozen_state 0 (frozen)0362: remove_actor $PLAYER_ACTOR from_car_and_place_at -1338.5 -408.1 14.10173: set_actor $PLAYER_ACTOR z_angle_to 90.80001: wait 500 ms0247: request_model #INFERNUS0247: request_model #MAFFA:scmpath_50001: wait 0 msif and0248: model #INFERNUS available 0248: model #MAFFA availablejf @scmpath_500C0: set_current_time_hours_to 1 minutes_to 0 // i prefer raciin at nite jojo00A5: [email protected] = create_car #INFERNUS at 2639.6252 2097.3906 10.6558 //put car racestart0175: set_car [email protected] z_angle_to 191.00224: set_car [email protected] health_to 200000A5: [email protected] = create_car #INFERNUS at 2634.3599 2097.4692 10.6499 //put opponent racestart0175: set_car [email protected] z_angle_to 191.00224: set_car [email protected] health_to 2000020A: set_car [email protected] door_status_to 402AC: set_car [email protected] immunities 1 1 1 1 101EC: make_car [email protected] very_heavy 10129: [email protected] = create_actor 24 #MAFFA in_car [email protected] driverseat0223: set_actor [email protected] health_to 300004E4: unknown_refresh_game_renderer_at 2639.6252 2097.390603CB: set_camera 2639.6252 2097.3906 10.6558029B: [email protected] = init_object 1655 at -1576.02 -202.34 13.760177: set_object [email protected] z_angle_to 270.001C7: remove_object_from_mission_cleanup_list [email protected]: set_object [email protected] collision_detection 1029B: [email protected] = init_object 1655 at -1597.9 -506.5 21.70177: set_object [email protected] z_angle_to 270.001C7: remove_object_from_mission_cleanup_list [email protected]: set_object [email protected] collision_detection 1029B: [email protected] = init_object 1655 at -1375.9 -581.5 13.690177: set_object [email protected] z_angle_to 270.001C7: remove_object_from_mission_cleanup_list [email protected]: set_object [email protected] collision_detection 1029B: [email protected] = init_object 1655 at -1374.9 -585.5 13.690177: set_object [email protected] z_angle_to 270.001C7: remove_object_from_mission_cleanup_list [email protected]: set_object [email protected] collision_detection 10177: set_object [email protected] z_angle_to 135.00177: set_object [email protected] z_angle_to 225.00177: set_object [email protected] z_angle_to 280.00177: set_object [email protected] z_angle_to 280.00186: [email protected] = create_marker_above_car [email protected]: set_marker [email protected] type_to 10249: release_model #INFERNUS0249: release_model #MAFFACar.LockInCurrentPosition([email protected]) = TrueCar.LockInCurrentPosition([email protected]) = True04e0: car [email protected] abandon_path_radius 20000AD: set_car [email protected] max_speed_to 100.004BA: set_car [email protected] speed_instantly 30.000AF: set_car [email protected] driver_behaviour_to 100AE: unknown_set_car [email protected] to_ignore_traffic_lights 20001: wait 250 ms036A: put_actor $PLAYER_ACTOR in_car [email protected]: wait 250 ms016A: fade 1 () 1000 ms0001: wait 1000 ms0373: set_camera_directly_behind_player02EB: restore_camera_with_jumpcut01B4: set_player $PLAYER_CHAR frozen_state 1 (unfrozen)0006: [email protected] = 0 // integer values0006: [email protected] = 0 // integer values0006: [email protected] = 20000 // floating-point values0006: [email protected] = 0 // integer values 0007: [email protected] = 2647.3511 // floating-point values0007: [email protected] = 2069.1543 // floating-point values 2647.8835 2068.5312 9.70850007: [email protected] = 10.1373 // floating-point values0006: $win = 00006: $lose = 0wait 3000 msCar.LockInCurrentPosition([email protected]) = FalseCar.LockInCurrentPosition([email protected]) = False00A7: car [email protected] drive_to [email protected] [email protected] [email protected]: set_car [email protected] max_speed_to 100.004e0: car [email protected] abandon_path_radius 25008C6: set_actor [email protected] stay_on_bike 106D5: $check = create_racing_checkpoint_at 2866.5557 1279.0804 15.0 point_to 2866.5557 1279.0804 10.763 type 1 radius 15.0 //heres the checkpoint coords:scmpath_70001: wait 0 msif0256: player $PLAYER_CHAR definedjf @scmpath_70050: gosub @scmpath_sub_3if and8119: NOT car [email protected] wrecked8119: NOT car [email protected] wrecked8118: NOT actor [email protected] deadjf @scmpath_7if00FE: actor $PLAYER_ACTOR 0 ()near_point 2639.6252 2097.3906 10.6558 radius 1000.5 1000.5 50.5jf @scmpath_12jump @scmpath_7:scmpath_120164: disable_marker [email protected]: remove_references_to_car [email protected] // Like turning a car into any random car01C3: remove_references_to_car [email protected] // Like turning a car into any random car01C2: remove_references_to_actor [email protected] // Like turning an actor into a random pedestrian0108: destroy_object [email protected]: destroy_object [email protected]: destroy_object [email protected]: destroy_object [email protected] @scmpath_3:scmpath_sub_3if8119: NOT car [email protected] wreckedjf @scmpath_sub_109if00DB: actor [email protected] in_car [email protected] @scmpath_sub_99if0039: [email protected] == 1 // integer valuesjf @scmpath_sub_100006: [email protected] = 0 // integer valuesjump @scmpath_sub_100:scmpath_sub_10if0039: [email protected] == 0 // integer valuesjf @scmpath_sub_11if01AF: car [email protected] 0 ()near_point [email protected] [email protected] [email protected] radius 5.2 5.2 5.0jf @scmpath_sub_110006: [email protected] = 1 // integer values05D6: clear_scmpath0007: [email protected] = 2690.3149 // floating-point values0007: [email protected] = 2003.0887 // floating-point values0007: [email protected] = 6.6397 // floating-point values000A: [email protected] += 0 // integer values 0007: [email protected] = 100.0 // floating-point values0007: [email protected] = 20.0 // floating-point values05D7: add_point_to_scmpath [email protected] [email protected] [email protected] @scmpath_sub_100:scmpath_sub_11if0039: [email protected] == 1 // integer valuesjf @scmpath_sub_12if01AF: car [email protected] 0 ()near_point [email protected] [email protected] [email protected] radius 15.2 15.2 5.0jf @scmpath_sub_1200AD: set_car [email protected] max_speed_to 10.00006: [email protected] = 2 // integer values05D6: clear_scmpath0007: [email protected] = 2705.8157 // floating-point values0007: [email protected] = 1937.0188 // floating-point values 0007: [email protected] = 6.6761 // floating-point values000A: [email protected] += 0 // integer values0007: [email protected] = 100.0 // floating-point values0007: [email protected] = 20.0 // floating-point values05D7: add_point_to_scmpath [email protected] [email protected] [email protected] @scmpath_sub_100:scmpath_sub_12if0039: [email protected] == 2 // integer valuesjf @scmpath_sub_13if01AF: car [email protected] 0 ()near_point [email protected] [email protected] [email protected] radius 15.2 15.2 5.0jf @scmpath_sub_1300AD: set_car [email protected] max_speed_to 25.00006: [email protected] = 3 // integer values05D6: clear_scmpath0007: [email protected] = 2726.5459 // floating-point values0007: [email protected] = 1887.1978 // floating-point values 0007: [email protected] = 6.6737 // floating-point values000A: [email protected] += 0 // integer values0007: [email protected] = 100.0 // floating-point values0007: [email protected] = 20.0 // floating-point values05D7: add_point_to_scmpath [email protected] [email protected] [email protected] @scmpath_sub_100:scmpath_sub_13if0039: [email protected] == 3 // integer valuesjf @scmpath_sub_14if01AF: car [email protected] 0 ()near_point [email protected] [email protected] [email protected] radius 8.2 8.2 5.0jf @scmpath_sub_1400AD: set_car [email protected] max_speed_to 25.00006: [email protected] = 4 // integer values05D6: clear_scmpath0007: [email protected] = 2737.7283 // floating-point values0007: [email protected] = 1763.1494 // floating-point values0007: [email protected] = 6.8209 // floating-point values 000A: [email protected] += 0 // integer values0007: [email protected] = 100.0 // floating-point values0007: [email protected] = 20.0 // floating-point values05D7: add_point_to_scmpath [email protected] [email protected] [email protected] @scmpath_sub_100:scmpath_sub_14if0039: [email protected] == 4 // integer valuesjf @scmpath_sub_15if01AF: car [email protected] 0 ()near_point [email protected] [email protected] [email protected] radius 5.2 5.2 5.0jf @scmpath_sub_150006: [email protected] = 5 // integer values05D6: clear_scmpath0007: [email protected] = 2747.7874 // floating-point values0007: [email protected] = 1691.6516 // floating-point values0007: [email protected] = 8.8271 // floating-point values 000A: [email protected] += 0 // integer values0007: [email protected] = 100.0 // floating-point values0007: [email protected] = 20.0 // floating-point values05D7: add_point_to_scmpath [email protected] [email protected] [email protected] @scmpath_sub_100:scmpath_sub_15if0039: [email protected] == 5 // integer valuesjf @scmpath_sub_16if01AF: car [email protected] 0 ()near_point [email protected] [email protected] [email protected] radius 15.2 15.2 5.0jf @scmpath_sub_1600AD: set_car [email protected] max_speed_to 10.00006: [email protected] = 6 // integer values05D6: clear_scmpath0007: [email protected] = 2844.8591 // floating-point values0007: [email protected] = 1537.704 // floating-point values0007: [email protected] = 10.7916 // floating-point values000A: [email protected] += 0 // integer values0007: [email protected] = 40.0 // floating-point values 0007: [email protected] = 10.0 // floating-point values05D7: add_point_to_scmpath [email protected] [email protected] [email protected]: unknown_set_car [email protected] to_ignore_traffic_lights 2jump @scmpath_sub_100:scmpath_sub_16if0039: [email protected] == 6 // integer valuesjf @scmpath_sub_17if01AF: car [email protected] 0 ()near_point [email protected] [email protected] [email protected] radius 8.2 8.2 5.0jf @scmpath_sub_1700AD: set_car [email protected] max_speed_to 0.00006: [email protected] = 7 // integer values05D6: clear_scmpath0007: [email protected] = 2867.3679 // floating-point values0007: [email protected] = 1490.7612 // floating-point values0007: [email protected] = 10.7581 // floating-point values000A: [email protected] += 0 // integer values 0007: [email protected] = 100.0 // floating-point values 0007: [email protected] = 0.0 // floating-point values05D7: add_point_to_scmpath [email protected] [email protected] [email protected]: unknown_set_car [email protected] to_ignore_traffic_lights 2jump @scmpath_sub_100:scmpath_sub_17if0039: [email protected] == 7 // integer valuesjf @scmpath_sub_18if01AF: car [email protected] 0 ()near_point [email protected] [email protected] [email protected] radius 15.2 15.2 5.0jf @scmpath_sub_1800AD: set_car [email protected] max_speed_to 5.001EB: set_car_density_to 0.00006: [email protected] = 8 // integer values05D6: clear_scmpath0007: [email protected] = 2862.9255 // floating-point values0007: [email protected] = 1298.3546 // floating-point values0007: [email protected] = 10.5398 // floating-point values last checkpoint!!!!!000A: [email protected] += 0 // integer values 0007: [email protected] = 100.0 // floating-point values0007: [email protected] = 20.0 // floating-point values05D7: add_point_to_scmpath [email protected] [email protected] [email protected] @scmpath_sub_100:scmpath_sub_18if0039: [email protected] == 8 // integer valuesjf @scmpath_sub_109if01AF: car [email protected] 0 ()near_point [email protected] [email protected] [email protected] radius 25.2 25.2 5.0jf @scmpath_sub_10900AD: set_car [email protected] max_speed_to 0.00006: [email protected] = 1 // integer values //loser text00BC: text_highpriority 'BJ_LOSE' 5000 ms 1// end of conditionjump @scmpath_12000A: [email protected] += 1 // integer values05D6: clear_scmpath0007: [email protected] = -1181.78 // floating-point values0007: [email protected] = -331.30 // floating-point values0007: [email protected] = 13.76 // floating-point values0007: [email protected] = 100.0 // floating-point values0007: [email protected] = 20.0 // floating-point values05D7: add_point_to_scmpath [email protected] [email protected] [email protected]: [email protected] == 2 // integer valuesjf @scmpath_sub_10000BC: text_highpriority 'BJ_LOSE' 5000 ms 1jump @scmpath_sub_100:scmpath_sub_99if0039: [email protected] == 0 // integer valuesjf @scmpath_sub_10900AD: set_car [email protected] max_speed_to 0.005CB: actor_goto_and_enter_car [email protected] [email protected] 50000006: [email protected] = 1 // integer valuesjump @scmpath_sub_109:scmpath_sub_10007E7: AS_assign_scmpath_to_actor [email protected] in_car [email protected] speed [email protected] flags 2 0 303F0: text_draw_toggle 00006: [email protected] = 0 // integer valuesjump @scmpath_sub_109:scmpath_sub_102if01F3: car [email protected] airbornejf @scmpath_sub_1030007: [email protected] = 0.0 // floating-point values04BA: set_car [email protected] speed_instantly [email protected]: AS_assign_scmpath_to_actor [email protected] in_car [email protected] speed [email protected] flags 2 0 3jump @scmpath_sub_103:scmpath_sub_103if01AF: car [email protected] 0 ()near_point [email protected] [email protected] [email protected] radius 30.2 30.2 5.0jf @scmpath_sub_104jump @scmpath_sub_105:scmpath_sub_10402E3: [email protected] = car [email protected] speedif81F3: NOT car [email protected] airbornejf @scmpath_sub_106if and0021: [email protected] > 30.0 // floating-point values0019: [email protected] > 700 // integer valuesjf @scmpath_sub_10504BA: set_car [email protected] speed_instantly 50.0:scmpath_sub_105if0019: [email protected] > 2000 // integer valuesjf @scmpath_sub_109:scmpath_sub_1060006: [email protected] = 0 // integer values:scmpath_sub_1090051: return please help !! last question, i dont understand last script part, that airborne checks, i dunno whats an airborn jajaja.... i hope mi post is readeable... kus im from mexiko, i speak spanish.. asi que si igual hay algun hispano que me ayude, estaria genial jeje... chidoo pzz.. PD: heey ZAZ your tutorials are greaat.. helped me a lot.... peace out Edited October 28, 2009 by larvaz Link to post Share on other sites
ZAZ 663 Posted October 29, 2009 Author Share Posted October 29, 2009 (edited) but ive troubles with my code... everythings fine when makin the cars, the "oponent" perfectly follows my desired path... then i decide to make a winnin condition, cheking if any of the cars reached the final race chekpoint, near the train station.. heres the whole code the [email protected] prob is that when i press backspace to start tha race, the cars are placed as normal but it seems the winnin condition is broken, and the text You win is showed since the beginning of the race... it nevers check if the car´s at finish line... welcome larvaz the reason of your problem is that the location check is a not-version this means: if player_actor is not near_point 2639.6252 2097.3906 10.6558because of the opcodesif80EC: actor $PLAYER_ACTOR 0 near_point 2866.5557 1279.0804 10.763 radius 8.0 8.0 //check if youve reach tha finish linejf @scmpath_7 The most question codes can be changed into the opposite question by changing the ciro of the opcode into 8 and insert "not" into the code line exemble: 00E1: key_pressed 0 10 and 80E1: NOT key_pressed 0 11 the correct check: if00EC: actor $PLAYER_ACTOR 0 near_point 2866.5557 1279.0804 10.763 radius 8.0 8.0 //jf @scmpath_7 last question, i dont understand last script part, that airborne checks, i dunno whats an airborn jajaja.... airborn means, the vehicle is in air for example the vehicle jumps over a ramp and is for same seconds in air in this case it loose the information of the destination and needs to get it again Edited October 29, 2009 by ZAZ Link to post Share on other sites
Jur1zz 16 Posted October 31, 2009 Share Posted October 31, 2009 Hi How can I attach vehicle sound for added "not replaced" cars, with CLEO not "VehicleAudioEditorUltimate" Example Link to post Share on other sites
ZAZ 663 Posted October 31, 2009 Author Share Posted October 31, 2009 (edited) Hi How can I attach vehicle sound for added "not replaced" cars, with CLEO not "VehicleAudioEditorUltimate" Example there're no scriptcodes to play egine sounds and the cleo script function to play mp3 is unstable maybe a trick can help: place a car in background test the script below by driving a bicycle {$CLEO .cs}:CarsoundDummy03A4: name_thread 'CSDUMMY':CarsoundDummy_10001: wait 0 ms00D6: if 00256: player $PLAYER_CHAR defined004D: jump_if_false @CarsoundDummy_1if00DF: actor $PLAYER_ACTOR driving004D: jump_if_false @CarsoundDummy_103C0: [email protected] = actor $PLAYER_ACTOR car0247: request_model #INFERNUS:CarsoundDummy_30001: wait 0 msif0248: model #INFERNUS available004D: jump_if_false @CarsoundDummy_300A5: [email protected] = create_car #INFERNUS at 0.5 0.5 713.350249: release_model #INFERNUS099A: set_car [email protected] collision_detection 00338: set_car [email protected] visibility 00683: attach_car [email protected] to_car [email protected] with_offset 0.0 0.0 4.5 rotation 0.0 0.0 0.0:CarsoundDummy_50001: wait 500 ms00D6: if 00256: player $PLAYER_CHAR defined004D: jump_if_false @CarsoundDummy_15if and8119: NOT car [email protected] wrecked8119: NOT car [email protected] wrecked00DF: actor $PLAYER_ACTOR driving004D: jump_if_false @CarsoundDummy_15if0686: car [email protected] attached004D: jump_if_false @CarsoundDummy_1504C4: create_coordinate [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR offset 0.0 100.0 0.002E3: [email protected] = car [email protected] speed00A7: car [email protected] drive_to [email protected] [email protected] [email protected]//---simple drive-to command00AD: set_car [email protected] max_speed_to [email protected]//---speed declaration, important!!0002: jump @CarsoundDummy_5:CarsoundDummy_1501C3: remove_references_to_car [email protected] // Like turning a car into any random car00A6: destroy_car [email protected]: jump @CarsoundDummy_1 Edited October 31, 2009 by ZAZ Link to post Share on other sites
Jur1zz 16 Posted October 31, 2009 Share Posted October 31, 2009 Hi How can I attach vehicle sound for added "not replaced" cars, with CLEO not "VehicleAudioEditorUltimate" Example there're no scriptcodes to play egine sounds and the cleo script function to play mp3 is unstable maybe a trick can help: place a car with actor in background Look at this MOTO IGiNe v0.2 Link to post Share on other sites
ZAZ 663 Posted November 1, 2009 Author Share Posted November 1, 2009 Hi How can I attach vehicle sound for added "not replaced" cars, with CLEO not "VehicleAudioEditorUltimate" Example there're no scriptcodes to play egine sounds and the cleo script function to play mp3 is unstable maybe a trick can help: place a car with actor in background Look at this MOTO IGiNe v0.2 Yes, I did, but I don't know what you want. Note: This is a script tutorial and not a request topic so please don't post again here If you want that I do the script then visit my Homepage, vistit every site and click on every avertising, then post in my cleo mod showroom topic to request the script. Link to post Share on other sites
markjaysongalang 1 Posted November 1, 2009 Share Posted November 1, 2009 Yey! Thanks for this tutorial. I'm making my Fast and Slowmotion Mod! I'll post updates soon. Link to post Share on other sites
Jur1zz 16 Posted November 1, 2009 Share Posted November 1, 2009 Hi How can I attach vehicle sound for added "not replaced" cars, with CLEO not "VehicleAudioEditorUltimate" Example there're no scriptcodes to play egine sounds and the cleo script function to play mp3 is unstable maybe a trick can help: place a car with actor in background Look at this MOTO IGiNe v0.2 Yes, I did, but I don't know what you want. Note: This is a script tutorial and not a request topic so please don't post again here If you want that I do the script then visit my Homepage, vistit every site and click on every avertising, then post in my cleo mod showroom topic to request the script. I just want know how they get sounds for bikes Link to post Share on other sites