Zintro Posted April 10, 2021 Share Posted April 10, 2021 (edited) Hello, first thx to ZAZ for his useful tutorials...i already learnt about loading animations using Cleo script so i tried to make CJ making simple kiss with another girl....the problem Here that i wasn't eable to set specefic coords while loading animation in CJ and rich woman so when they do kiss they enter on each other...i'll left My simple cood hoping for anybody to tell me what did i miss NOTE:all opcodese are using for GTA Sa -Android Script-problem PNG: https://ibb.co/HY0SsQ6 Script: {$CLEO .csi} thread 'spawn ped' :PED0 wait 10 0247: load_model #HFYRI wait 300 038B: load_requested_models :PED1 wait 10 if 0256: player $PLAYER_CHAR defined jf @PED1 009A: [email protected] = create_actor_pedtype 5 model #HFYRI at 2498.4841 -1709.7855 1014.7421 05D4: AS_actor [email protected] rotate_angle 224.0 :Dance wait 300 04ED: load_animation "KISSING" if and 00F2: actor [email protected] near_actor $PLAYER_ACTOR radius 40.8 40.8 0 00F3: actor $PLAYER_ACTOR near_actor [email protected] radius 1.5 2.1 0 on_foot 00E1: key_pressed 3 touch_point 1 jf @Dance 0A1D: AS_actor [email protected] rotate_to_and_look_at_actor $PLAYER_ACTOR 0639: AS_actor $PLAYER_ACTOR rotate_to_actor [email protected] :Final wait 0 if 00E1: key_pressed 3 touch_point 1 jf @Final 0812: AS_actor [email protected] perform_animation "GRLFRD_KISS_03" IFP_file "KISSING" 4.0 loopA 1 lockX 0 lockY 0 lockF 0 time 6000 // versionB 0812: AS_actor $PLAYER_ACTOR perform_animation "PLAYA_KISS_03" IFP_file "KISSING" 4.0 loopA 1 lockX 0 lockY 0 lockF 0 time 6000 // versionB jf @Final 04EF: release_animation "KISSING" 0002: jump @Dance Edited April 10, 2021 by Zintro Link to comment Share on other sites More sharing options...
ZAZ Posted April 11, 2021 Share Posted April 11, 2021 (edited) It needs to place CJ and the girl at exact position and angle The code 00A1: put_actor let the actors falling and looks bad I found a smart alternative: opcode 05D3: makes actors go to coords and if the time parameter is set to 0, then it's like a smart teleport Your script construct needs corrections: Let your script beginn with the main condition that needs to be passed to activate the script feature. In this case it needs to check that CJ is in Carls House, just check for the location. Also don't forget to check if player_char is defined and that the actor isn't dead. Furthermore does it make sense to check in all states that CJ is still in the house or near the place of action. And don't forget to make a cleanup In addition, it needs to link the actor to interior: 0860: link_actor [email protected] to_interior 3 I rewrote the script, you can repeat now the kissing. If the girl dies, she will be respawned, same if you leave the location and come back You can still improve the script, e.g. give exact angle, hide CJ's weapon, don't respawn the girl or what should happen if she dies, ect... Note: the script was tested on PC version. You need to change cleo directive and keypress code {$CLEO} //{$CLEO .csi} thread 'spawnpd' :Start_Loop wait 0 if 0256: player $PLAYER_CHAR defined jf @Start_Loop if 00FF: actor $PLAYER_ACTOR 0 (in-sphere)near_point_on_foot 2498.4841 -1709.7855 1014.7421 radius 10.0 10.0 10.0 jf @Start_Loop 0247: load_model #HFYRI 04ED: load_animation "KISSING" 038B: load_requested_models 009A: 2@ = create_actor_pedtype 5 model #HFYRI at 2498.4841 -1709.7855 1014.7421 0860: link_actor 2@ to_interior 3 05D4: AS_actor 2@ rotate_angle 224.0 :Meeting_Loop wait 0 if 0256: player $PLAYER_CHAR defined jf @Cleanup if and 8118: not actor 2@ dead 00FF: actor $PLAYER_ACTOR 0 (in-sphere)near_point_on_foot 2498.4841 -1709.7855 1014.7421 radius 20.0 20.0 20.0 jf @Cleanup if and 00F3: actor $PLAYER_ACTOR near_actor 2@ radius 1.5 2.1 sphere 0 on_foot //00E1: key_pressed 3 touch_point 1 00E1: player 0 pressed_key 10 jf @Meeting_Loop 05D3: AS_actor 2@ goto_point 2498.4841 -1709.7855 1014.7421 mode 4 0 05D3: AS_actor $PLAYER_ACTOR goto_point 2497.8022 -1709.0564 1014.7422 mode 4 0 wait 50 0A1D: AS_actor 2@ rotate_to_and_look_at_actor $PLAYER_ACTOR 0639: AS_actor $PLAYER_ACTOR rotate_to_actor 2@ wait 1500// wait a second till theyre roteted together :Kissing_Loop wait 0 if 0256: player $PLAYER_CHAR defined jf @Cleanup if and 8118: not actor 2@ dead 00FF: actor $PLAYER_ACTOR 0 (in-sphere)near_point_on_foot 2498.4841 -1709.7855 1014.7421 radius 20.0 20.0 20.0 jf @Cleanup if //00E1: key_pressed 3 touch_point 1 00E1: player 0 pressed_key 10 jf @Kissing_Loop 0812: AS_actor 2@ perform_animation "GRLFRD_KISS_03" IFP_file "KISSING" 4.0 loopA 1 lockX 0 lockY 0 lockF 0 time 6000 // versionB 0812: AS_actor $PLAYER_ACTOR perform_animation "PLAYA_KISS_03" IFP_file "KISSING" 4.0 loopA 1 lockX 0 lockY 0 lockF 0 time 6000 // versionB :Final_Loop wait 0 if 0256: player $PLAYER_CHAR defined jf @Cleanup if and 8118: not actor 2@ dead 00FF: actor $PLAYER_ACTOR 0 (in-sphere)near_point_on_foot 2498.4841 -1709.7855 1014.7421 radius 20.0 20.0 20.0 jf @Cleanup if 0611: actor $PLAYER_ACTOR performing_animation "PLAYA_KISS_03" jf @Meeting_Loop jump @Final_Loop :Cleanup 04EF: release_animation "KISSING" 01C2: remove_references_to_actor 2@ // Like turning an actor into a random pedestrian jump @Start_Loop Btw. it is recommanded that you learn High Level coding Edited April 11, 2021 by ZAZ Zintro 1 CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
Zintro Posted April 11, 2021 Author Share Posted April 11, 2021 That was amazing thx again i'll try hard to learn coding from your tutorials :v 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