Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. Red Dead Redemption 2

      1. Gameplay
      2. Missions
      3. Help & Support
    2. Red Dead Online

      1. Gameplay
      2. Find Lobbies & Outlaws
      3. Help & Support
    1. Crews & Posses

      1. Recruitment
    2. Events

    1. GTA Online

      1. DLC
      2. Find Lobbies & Players
      3. Guides & Strategies
      4. Vehicles
      5. Content Creator
      6. Help & Support
    2. Grand Theft Auto Series

    3. GTA 6

    4. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    5. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    6. GTA Chinatown Wars

    7. GTA Vice City Stories

    8. GTA Liberty City Stories

    9. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    12. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    13. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

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

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

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

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

    2. Forum Support

    3. Site Suggestions

Sign in to follow this  
Automan

CLEO3-0612: set_actor [email protected] animation.

Recommended Posts

Automan

Hi! biggrin.gif

After about 100 mods for GTA-SA, including the Gundam and Misterix (with Zeb89)

for my new mod (Atlantis) I started to use some 'CLEO3.

 

So here's my problem: I gave an animation to a ped,

but remains firm as a pile of light...

user posted image

 

 

thread 'SPW_PD2':STARTwait 0 msifPlayer.Defined($PLAYER_CHAR)jf @STARTif 00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere -2490.0 1673.7 4.72 radius 100.0 100.0 50.0jf @STARTif$ACTIVEINTERIOR == 0jf @START0247: load_model #SWMOTR404ED: load_animation "COWER":ACTIONwait 500 ms009A: [email protected] = create_actor_pedtype 4 model #SWMOTR4 at -2490.0 1673.7 4.720612: set_actor [email protected] animation "COWER" paused 0 :ENDwait 0 ms004E: end_thread 

 

 

Remaining in the area, you can enlighten? smile.gif

Thank you! smile.gif

Edited by Automan

Share this post


Link to post
Share on other sites
spaceeinstein

When you load an animation, you load its file. "COWER" is in file "PED" which I think is already preloaded into the game. Here's an example

 

0605: actor [email protected] perform_animation_sequence "COWER" IFP_file "PED" 4.0 loop 0 0 0 0 time -1

Share this post


Link to post
Share on other sites
Automan

Thanks, but now the game crashed when I approached! smile.gif

 

 

:STARTwait 0 msifPlayer.Defined($PLAYER_CHAR)jf @STARTif 00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere -2490.0 1673.7 4.72 radius 100.0 100.0 50.0jf @STARTif$ACTIVEINTERIOR == 0jf @START0247: load_model #SWMOTR404ED: load_animation "COWER":ACTIONwait 500 ms009A: [email protected] = create_actor_pedtype 4 model #SWMOTR4 at -2490.0 1673.7 4.720605: actor [email protected] perform_animation_sequence "COWER" IFP_file "PED" 4.0 loop 0 0 0 0 time -1 :ENDwait 0 ms004E: end_thread 

 

Share this post


Link to post
Share on other sites
_VaNkAtA_

 

04ED: load_animation "COWER"

Maybe this is your problem....

Share this post


Link to post
Share on other sites
Automan

Thanks! Now the game no crashes, but not there is still animation ... smile.gif

 

 

:STARTwait 0 msifPlayer.Defined($PLAYER_CHAR)jf @STARTif 00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere -2490.0 1673.7 4.72 radius 100.0 100.0 50.0jf @STARTif$ACTIVEINTERIOR == 0jf @START0247: load_model #SWMOTR4:ACTIONwait 500 ms009A: [email protected] = create_actor_pedtype 4 model #SWMOTR4 at -2490.0 1673.7 4.720605: actor [email protected] perform_animation_sequence "COWER" IFP_file "PED" 4.0 loop 0 0 0 0 time -1 :ENDwait 0 ms004E: end_thread

 

Share this post


Link to post
Share on other sites
_VaNkAtA_

 

:STARTwait 0 ms077E: get_active_interior_to $ACTIVE_INTERIOR wait 150ifPlayer.Defined($PLAYER_CHAR)jf @STARTif00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere -2490.0 1673.7 4.72 radius 100.0 100.0 50.0jf @STARTif$ACTIVE_INTERIOR == 0jf @START0247: load_model #SWMOTR4:ACTIONwait 500 ms009A: [email protected] = create_actor_pedtype 4 model #SWMOTR4 at -2490.0 1673.7 4.720605: actor [email protected] perform_animation_sequence "COWER" IFP_file "PED" 4.0 loop 0 0 0 0 time -1:ENDwait 0 msjump @START

 

Works now?

Note: I have no Windows OS(again)

Edited by _VaNkAtA_

Share this post


Link to post
Share on other sites
spaceeinstein

When you load a model you have to check if the model is loaded... Check the modding wiki for examples on how to create a ped.

Share this post


Link to post
Share on other sites
Automan

But the ped me it works: the animation is not seen...

In mod 'wiki' (?) there are animations?... monocle.gif

Share this post


Link to post
Share on other sites
spaceeinstein

Maybe 05C5 would be better.

Share this post


Link to post
Share on other sites
Automan

no, no change ...

If it is so difficult to run something so simple, when there are complicated things will be a massacre!... biggrin.gif

Share this post


Link to post
Share on other sites
james227uk

 

:STARTwait 0 ms077E: get_active_interior_to $ACTIVE_INTERIOR wait 150ifPlayer.Defined($PLAYER_CHAR)jf @STARTif00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere -2490.0 1673.7 4.72 radius 100.0 100.0 50.0jf @STARTif$ACTIVE_INTERIOR == 0jf @START0247: load_model #SWMOTR4:ACTIONwait 500 ms009A: [email protected] = create_actor_pedtype 4 model #SWMOTR4 at -2490.0 1673.7 4.720605: actor [email protected] perform_animation_sequence "COWER" IFP_file "PED" 4.0 loop 0 0 0 0 time -1:ENDwait 0 msjump @START

 

Works now?

Note: I have no Windows OS(again)

The $ACTIVE_INTERIOR variable is already available without the get active interior thing

Share this post


Link to post
Share on other sites
Automan

Yes, but the pedestrian is there. But do not make any animation...

The problem is that there is no soul, not even kicked! smile.gif

Share this post


Link to post
Share on other sites
_VaNkAtA_

Well, then, why don't you try 05C3 or 05C5

Share this post


Link to post
Share on other sites
Automan

Nope... Do not work ... dozingoff.gif

There is a simple script that animation does to you?... facedesk.gif

 

***

 

Ok: no animation... wink.gif

 

Edited by Automan

Share this post


Link to post
Share on other sites
spaceeinstein

Ok, I got this to work

 

 

{$CLEO}0000::STARTwait 0 msifPlayer.Defined($PLAYER_CHAR)jf @STARTif00FE:   actor $PLAYER_ACTOR sphere 1 in_sphere 54.3 782.38 1.47 radius 5.0 5.0 5.0jf @START077E: get_active_interior_to $ACTIVE_INTERIOR if$ACTIVE_INTERIOR == 0jf @START0247: load_model #SWMOTR4:ACTIONwait 0ifmodel.Available(#SWMOTR4)jf @ACTION009A: [email protected] = create_actor_pedtype 4 model #SWMOTR4 at 54.3 782.38 1.470605: actor [email protected] perform_animation_sequence "COWER" IFP_file "PED" 4.0 loop 1 0 0 0 time -1:END0A93: end_custom_thread

 

 

But one little bump and the animation is over. If you want to make him cower constantly no matter what, you have to check if the ped is using the cower animation.

Share this post


Link to post
Share on other sites
xnotoriousss
Ok, I got this to work

 

 

{$CLEO}0000::STARTwait 0 msifPlayer.Defined($PLAYER_CHAR)jf @STARTif00FE:   actor $PLAYER_ACTOR sphere 1 in_sphere 54.3 782.38 1.47 radius 5.0 5.0 5.0jf @START077E: get_active_interior_to $ACTIVE_INTERIOR if$ACTIVE_INTERIOR == 0jf @START0247: load_model #SWMOTR4:ACTIONwait 0ifmodel.Available(#SWMOTR4)jf @ACTION009A: [email protected] = create_actor_pedtype 4 model #SWMOTR4 at 54.3 782.38 1.470605: actor [email protected] perform_animation_sequence "COWER" IFP_file "PED" 4.0 loop 1 0 0 0 time -1:END0A93: end_custom_thread

 

 

But one little bump and the animation is over. If you want to make him cower constantly no matter what, you have to check if the ped is using the cower animation.

yo cant you just use a loop with a check if hes doing cower or not?

Share this post


Link to post
Share on other sites
spaceeinstein

I just said you can if you want. It's simple to do it yourself.

Share this post


Link to post
Share on other sites
Automan

Many thanks spaceeinstein! biggrin.gif

user posted image

 

I change all the scripts to see if it solves the principal problem:

Not all are spawaning ped, but not always them, depends on where it come to them.

Share this post


Link to post
Share on other sites
Automan

Very good! biggrin.gif

This form of script:

 

{$CLEO}0000:(---)0A93: end_custom_thread

 

Instead of this:

 

{$VERSION 3.1.0027}{$CLEO .CS}thread 'name'(---)004E: end_thread 

 

has solved the problem with the peds:

user posted image

and between ped and sphere:

user posted image

 

But I do not remember where I saw the solution of this problem:

user posted image

when the player dies replaced ...

 

This repositioning of the camera does not work:

 

00A1: put_actor $PLAYER_ACTOR at 2027.1 996.5 10.820173: set_actor $PLAYER_ACTOR Z_angle_to -90.00001: wait 1000 ms015F: set_camera_position 2027.1 996.5 10.82 rotation 0.0 0.0 -90.0

 

There is another opcode better, or I who use this evil?...

Share this post


Link to post
Share on other sites
spaceeinstein

The CJ spaghetti can be fixed if you prevent him from gaining/losing weight and muscle.

 

When you set_camera, you also have to point_camera.

Share this post


Link to post
Share on other sites
Automan

biggrin.gif

 

But CJ dies/stops, it does not lose weight/muscle... mercie_blink.gif

 

0920: point_camera? ... I have to use this? monocle.gif

Share this post


Link to post
Share on other sites
Wesser

You must use 0160 (point camera) or 0159 (camera on ped) if you want to change the current camera position because it seems that it's locked. Follow what spaceeinstein said and set the muscle\fat values to 0 or erase their opcodes.

Share this post


Link to post
Share on other sites
Automan

I can not find opcode with muscle/fat...

 

With both the opcode the visual moves to 0 0 0 xyz and freezes...

 

00A1: put_actor $PLAYER_ACTOR at 2027.1 997.5 10.820173: set_actor $PLAYER_ACTOR Z_angle_to -90.00160: set_camera_point_at 2027.1 997.5 10.82 mode 2 

 

 

00A1: put_actor $PLAYER_ACTOR at 2027.1 997.5 10.820173: set_actor $PLAYER_ACTOR Z_angle_to -90.00159: camera_on_ped $PLAYER_ACTOR 15 2 

 

 

***

 

Problem solved with:

 

0373: set_camera_directly_behind_player

 

 

Now lacks only CJ Spaghetti! And if I do not want me, spaghetti! biggrin.gif

Edited by Automan

Share this post


Link to post
Share on other sites
Wesser

All opcodes and their values type or params number are stored in SB\data\sascm.ini. The muscle\fat weight is a stat value defined by an ID. You can find all stat values in Help->Contents->SCM Documentation->GTA SA->Statistics ID. What you need is to delete these opcodes from main.scm (if you use .cs files leave them).

 

062A: change_float_stat 23 to 50.0 062A: change_float_stat 21 to 200.0 

 

The first parameters mean respectively muscle and fat weight. If you don't want to delete them you can set their value to 0.0.

Share this post


Link to post
Share on other sites
Automan

Thanks! wink.gif

I tried that, but the question remains:

 

{$CLEO}0000:$RADAR_1 = Marker.CreateIconWithoutSphere(42, -2806.5, 1847.8, 23.2)02A8: $RADAR_2 = create_marker 38 at 1500.0 1000.0 10.8302A8: $RADAR_3 = create_marker 40 at -2801.26 1942.52 21.002A8: $RADAR_4 = create_marker 16 at 16, 271.7 1859.3 8.8$RADAR_5 = Marker.CreateIconWithoutSphere(35, -2348.0, 1838.0, 9.5)062A: change_float_stat 23 to 0.0 062A: change_float_stat 21 to 0.0 0247: load_model #SOFYRIwait 500 ms09c7: change_player_model $PLAYER_CHAR #SOFYRI:END0A93: end_custom_thread

 

Back CJ 'spaghetti', instead dell'actor replaced...

If I try to put controls in the rerun replace, or crashes the game or the player is replaced continuously. sad.gif

Share this post


Link to post
Share on other sites
Wesser

I don't know. However you have to put 0248 (is_model_available) as a condition to check if the model is correctly loaded.

 

{$VERSION 3.1.0027}{$CLEO .cs}//-------------MAIN---------------thread 'MODEL' :MODEL_50001: wait 0 0247: load_model #SOFYRI 00D6: if 0248:  model #SOFYRI available 004D: jump_if_false @MODEL_5 09C7: change_player $PLAYER_CHAR model_to #SOFYRI 0A93: end_custom_thread 

 

If you can't resolve this annoying problem try to separate all model groups (1,2,...) with 3dsmax and then save them as some bodyparts (add them in player.img). In data\clothes.dat you can create new anim sets like gimpsuit and call them with 087B.

 

087B: set_player $PLAYER_CHAR clothes_texture "TEXTURE_NAME" model "MODEL_NAME" body_part 17 

 

Anyway, that code works correctly if you use a stripped .scm.

Share this post


Link to post
Share on other sites
Automan

I have not yet put the controls, because before I wanted to do the main lain! biggrin.gif

 

However neither 3dsmax or animations fall into my competence.

I use only ZModeler2...

 

I think the player must restart the game! biggrin.gif

Share this post


Link to post
Share on other sites
Automan

I tried to put an external command for reloaded the player, but the game stops:

 

 

{$CLEO}0000::LOADwait 0 ms0247: load_model #SOFYRI00D6: if 0248:  model #SOFYRI available 004D: jump_if_false @LOAD:STARTwait 500 ms09c7: change_player_model $PLAYER_CHAR #SOFYRI:CTRLwait 0 msIF00E1:   player 0 pressed_key 19 // look behindelse_jump @CTRLjump @START:END0A93: end_custom_thread

 

Share this post


Link to post
Share on other sites
coin-god
{$CLEO}0000::LOADwait 0 ms0247: load_model #SOFYRI00D6: if 0248:  model #SOFYRI available 004D: jump_if_false @LOAD:CTRLwait 0 msIF00E1:   player 0 pressed_key 19 // look behindelse_jump @CTRL:STARTwait 500 ms09c7: change_player_model $PLAYER_CHAR #SOFYRI0A93: end_custom_thread

 

Share this post


Link to post
Share on other sites
_VaNkAtA_
{$CLEO}0000::LOADwait 0 ms0247: load_model #SOFYRI00D6: if 0248:  model #SOFYRI available 004D: jump_if_false @LOAD:CTRLwait 0 msIF00E1:   player 0 pressed_key 19 // look behindelse_jump @CTRL:STARTwait 500 ms09c7: change_player_model $PLAYER_CHAR #SOFYRI0A93: end_custom_thread

 

You've forgot one jump. smile.gif

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • 2 Users Currently Viewing
    0 members, 0 Anonymous, 2 Guests

×
×
  • Create New...

Important Information

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