Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. Los Santos Drug Wars
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

      1. Guides & Strategies
      2. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    4. Featured Mods

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Movies & TV
      5. Music
      6. Sports
      7. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Announcements

    2. Support

    3. Suggestions

Gta sa-Loading animation with specefic coords


Zintro
 Share

Recommended Posts

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 by Zintro
Link to comment
Share on other sites

 

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 by ZAZ
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.