LazytownSpo666 Posted January 12, 2022 Share Posted January 12, 2022 Here is my question: How am i going to code for the helicopter (like Raindance) to spawn at 4 and higher stars? Reason: i need that code for my very first CLEO mod "*Helicopter Name* Spawns at 4 and Higher Stars". What app he is using: Sanny Builder Link to comment Share on other sites More sharing options...
Jack Posted January 12, 2022 Share Posted January 12, 2022 3 hours ago, LazytownSpo666 said: Here is my question: How am i going to code for the helicopter (like Raindance) to spawn at 4 and higher stars? Reason: i need that code for my very first CLEO mod "*Helicopter Name* Spawns at 4 and Higher Stars". What app he is using: Sanny Builder You're gonna need opcodes: 096A: enable_flying_helis 0 // to disable non script helicopters 0727: set_heli [email protected] behavior_to_police_heli_and_follow_actor $PLAYER_ACTOR follow_car -1 radius 20.0 The rest is pretty much in scm tutorials. Wanted Level Editor Gore Level Effect [III] My YouTube Channel Link to comment Share on other sites More sharing options...
LazytownSpo666 Posted January 13, 2022 Author Share Posted January 13, 2022 9 hours ago, Jack said: You're gonna need opcodes: 096A: enable_flying_helis 0 // to disable non script helicopters 0727: set_heli [email protected] behavior_to_police_heli_and_follow_actor $PLAYER_ACTOR follow_car -1 radius 20.0 The rest is pretty much in scm tutorials. of course, but how am i going to get the full script code? Link to comment Share on other sites More sharing options...
Jack Posted January 13, 2022 Share Posted January 13, 2022 (edited) 5 hours ago, LazytownSpo666 said: of course, but how am i going to get the full script code? I build the code but it would be better if I post it later so you can understand how it works. Lets start with the code concept: - check if a helicopter and a pilot model IDs are loaded, - choose which variables will contain their handle (for example [email protected] and [email protected]), - check if a wanted stars are above 3, - to avoid constant spawn of the helicopter check if a variable already contains its handle, - if a variable is empty create the helicopter (pilot and copilots are optional), - after the helicopter is spawned start checking the game events: - is helicopter severely damaged (if it is let the code to forget about it and repeat the operation)? - is helicopter pilot wounded (in that case heli would start crashing down and then step from the above)? - are wanted stars still above 3 (if not heli will fly away and disappear)? Opcodes I used: 096A: enable_flying_helis 0 0247: load_model HELI_MODEL 0247: load_model PILOT_MODEL 038B: load_requested_models 0248: model PILOT_MODEL available 0248: model HELI_MODEL available 04C4: store_coords_to posX posY posZ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 100.0 00A5: HELI = create_car HELI_MODEL at posX posY posZ 0129: PILOT = create_actor_pedtype PEDTYPE_CIVMALE model PILOT_MODEL in_car HELI driverseat 0825: set_helicopter HELI instant_rotor_start 0727: set_heli HELI behavior_to_police_heli_and_follow_actor $PLAYER_ACTOR follow_car -1 radius 20.0 0564: heli HELI simulate_crash_landing 04C4: store_coords_to posX posY posZ from_actor $PLAYER_ACTOR with_offset 100.0 100.0 100.0 04A2: set_heli HELI fly_to posX posY posZ altitude_between 0.0 and 200.0 01C2: remove_references_to_actor PILOT 01C3: remove_references_to_car HELI 009B: destroy_actor PILOT 00A6: destroy_car HELI That's my concept. Of course you can always create your own. And here's the tutorial. Edited January 13, 2022 by Jack Wanted Level Editor Gore Level Effect [III] My YouTube Channel Link to comment Share on other sites More sharing options...
LazytownSpo666 Posted January 13, 2022 Author Share Posted January 13, 2022 (edited) On 1/13/2022 at 2:59 PM, Jack said: I build the code but it would be better if I post it later so you can understand how it works. Lets start with the code concept: - check if a helicopter and a pilot model IDs are loaded, - choose which variables will contain their handle (for example [email protected] and [email protected]), - check if a wanted stars are above 3, - to avoid constant spawn of the helicopter check if a variable already contains its handle, - if a variable is empty create the helicopter (pilot and copilots are optional), - after the helicopter is spawned start checking the game events: - is helicopter severely damaged (if it is let the code to forget about it and repeat the operation)? - is helicopter pilot wounded (in that case heli would start crashing down and then step from the above)? - are wanted stars still above 3 (if not heli will fly away and disappear)? Opcodes I used: 096A: enable_flying_helis 0 0247: load_model HELI_MODEL 0247: load_model PILOT_MODEL 038B: load_requested_models 0248: model PILOT_MODEL available 0248: model HELI_MODEL available 04C4: store_coords_to posX posY posZ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 100.0 00A5: HELI = create_car HELI_MODEL at posX posY posZ 0129: PILOT = create_actor_pedtype PEDTYPE_CIVMALE model PILOT_MODEL in_car HELI driverseat 0825: set_helicopter HELI instant_rotor_start 0727: set_heli HELI behavior_to_police_heli_and_follow_actor $PLAYER_ACTOR follow_car -1 radius 20.0 0564: heli HELI simulate_crash_landing 04C4: store_coords_to posX posY posZ from_actor $PLAYER_ACTOR with_offset 100.0 100.0 100.0 04A2: set_heli HELI fly_to posX posY posZ altitude_between 0.0 and 200.0 01C2: remove_references_to_actor PILOT 01C3: remove_references_to_car HELI 009B: destroy_actor PILOT 00A6: destroy_car HELI That's my concept. Of course you can always create your own. And here's the tutorial. of course. i'll try to code that. and this issue will be closed after i'm releasing this mod. EDIT: nvm Edited January 14, 2022 by LazytownSpo666 Link to comment Share on other sites More sharing options...
LazytownSpo666 Posted January 13, 2022 Author Share Posted January 13, 2022 also. can you give an opcode of army rappeling? Link to comment Share on other sites More sharing options...
Jack Posted January 13, 2022 Share Posted January 13, 2022 4 hours ago, LazytownSpo666 said: also. can you give an opcode of army rappeling? 0503: create_actor_on_rope_with_pedtype 6 model #ARMY at posX posY posZ handle_as [email protected] Check pedtype values in tutorials. Wanted Level Editor Gore Level Effect [III] My YouTube Channel Link to comment Share on other sites More sharing options...
LazytownSpo666 Posted January 14, 2022 Author Share Posted January 14, 2022 you know what, screw it, let him create that script instead. vehicle model: RAINDANC pilot, copilot, and guard model: ARMY extra features: shooting a player every 0.25 seconds and guard rappeling from heli. guard weapons: M4, Colt 45, and MP5. Link to comment Share on other sites More sharing options...