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. Arena War
      2. After Hours
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Grand Theft Auto Series

    3. GTA Next

    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  
tysman

Bear Mod (help needed)

Recommended Posts

ZAZ

 

from the BEAR_ANIMATION file the animation for running is BEAR_RUN

you have allready loaded the ifp file "BEAR_ANIMATION"

you can then use the BEAR_RUN animation

 

04ED: load_animation "BEAR_ANIMATION"  :BEAR_117wait 0if and023D:   special_actor 5 loaded04EE:   animation "BEAR_ANIMATION" loaded  else_jump @BEAR_117

 

 

 

0605: actor $PLAYER_ACTOR perform_animation_sequence "BEAR_RUN" from_file "BEAR_ANIMATION"  4.0  0  1  1  0 -1 ms

 

Share this post


Link to post
Share on other sites
tysman

how would i make the bear perform the animation after it gets shot at

Share this post


Link to post
Share on other sites
ZAZ

 

how would i make the bear perform the animation after it gets shot at

 

if051A:   actor [email protected] damaged_by_actor $PLAYER_ACTORjf @0605: actor [email protected] perform_animation_sequence "BEAR_RUN" from_file "BEAR_ANIMATION"  4.0  0  1  1  0 -1 ms

 

 

 

Note: opcode 051A: checks if an actor is damaged by PLAYER_ACTOR.

So, if the actor is damaged, he is allways damaged no matter what the PLAYER_ACTOR do.

This opcode doesn't check each hit. Do you understand?

The check will be passed then allways when he was damaged and the animation opcode will be repeated.

But you need to prevent that the animation opcode will be repeated.

So let the code run into a new loop

 

 

:BEAR_321wait 0ifPlayer.Defined($PLAYER_CHAR)else_jump @BEAR_410ifnot Actor.Dead([email protected])else_jump @BEAR_431if00F2:   actor $PLAYER_ACTOR near_actor [email protected] radius 200.0 200.0 0else_jump @BEAR_410$BEAR_ACTOR = Actor.Health([email protected])$BEAR_ACTOR /= 25if  0 >= $BEAR_ACTORthen0829: actor [email protected] perform_animation "BEAR_DEATH" IFP_file "BEAR_ANIMATION" rate 4.0 time 0 and_dies0321: kill_actor [email protected]:   actor [email protected] damaged_by_actor $PLAYER_ACTORjf @BEAR_3210605: actor [email protected] perform_animation_sequence "BEAR_RUN" from_file "BEAR_ANIMATION"  4.0  0  1  1  0 -1 ms:BEAR_325wait 0ifPlayer.Defined($PLAYER_CHAR)else_jump @BEAR_410ifnot Actor.Dead([email protected])else_jump @BEAR_431if00F2:   actor $PLAYER_ACTOR near_actor [email protected] radius 200.0 200.0 0else_jump @BEAR_410$BEAR_ACTOR = Actor.Health([email protected])$BEAR_ACTOR /= 25if  0 >= $BEAR_ACTORthen0829: actor [email protected] perform_animation "BEAR_DEATH" IFP_file "BEAR_ANIMATION" rate 4.0 time 0 and_dies0321: kill_actor [email protected] @BEAR_325

 

 

If you need to loop the animation itself because it's very short then set the anim-loop-parameter to 1

0605: actor [email protected] perform_animation_sequence "BEAR_RUN" from_file "BEAR_ANIMATION" 4.0 1 1 1 0 -1 ms

 

 

 

 

Edited by ZAZ

Share this post


Link to post
Share on other sites
tysman

Thanks, basically when the bear is walking to a spot (I will use the running animation again but slow down the speed of the animation) CJ will shoot the bear anytime in between the walking, then the bear will perform the run animation (at normal speed), running at CJ then when the bear is close to CJ hopefully still using the run animation and the

0850: AS_actor [email protected] follow_actor $PLAYER_ACTOR

then the bear will perform the attack animation (the last animation) and repeat that attack animation (the attack animation has to hurt CJ) till CJ kills the bear. Hopefully I worded that ok for you to understand confused.gif

Edited by tysman

Share this post


Link to post
Share on other sites
ZAZ

 

Thanks, basically when the bear is walking to a spot (I will use the running animation again but slow down the speed of the animation) CJ will shoot the bear anytime in between the walking, then the bear will perform the run animation (at normal speed), running at CJ then when the bear is close to CJ hopefully still using the run animation and the
0850: AS_actor [email protected] follow_actor $PLAYER_ACTOR

then the bear will perform the attack animation (the last animation) and repeat that attack animation (the attack animation has to hurt CJ) till CJ kills the bear. Hopefully I worded that ok for you to understand confused.gif

I wonder what your question should be. Animation speed can be set with opcode 0393:

I assume the task to follow actor cancels the animation or the opposite, he do the animation but doesn't follow.

 

For some missions are used to assign_actor to_animation_path_with_walk_mode

 

0754: define_new_animation_path 0755: add_animation_path_3D_coord 1289.988 -766.581 1084.063 animation "NONE" IFP_file "NONE" 0755: add_animation_path_3D_coord 1270.314 -766.564 1084.063 animation "ROADCROSS" IFP_file "PED" 0755: add_animation_path_3D_coord 1270.074 -782.155 1084.063 animation "NONE" IFP_file "NONE" 0755: add_animation_path_3D_coord 1290.246 -782.463 1084.056 animation "ROADCROSS" IFP_file "PED" 0817: assign_actor [email protected] to_animation_path_with_walk_mode 4 route_mode 3//////////////////0754: define_new_animation_path 0755: add_animation_path_3D_coord [email protected]([email protected],6f) [email protected]([email protected],6f) [email protected]([email protected],6f) animation "ROADCROSS" IFP_file "PED" 0755: add_animation_path_3D_coord [email protected]([email protected],6f) [email protected]([email protected],6f) [email protected]([email protected],6f) animation "ROADCROSS" IFP_file "PED" 0817: assign_actor [email protected]([email protected],6i) to_animation_path_with_walk_mode 4 route_mode 2

 

 

 

An animation can't hurt or damage an actor. This needs to do a bit more complex coding.

Share this post


Link to post
Share on other sites
tysman

can it be done?

Share this post


Link to post
Share on other sites
ZAZ

 

can it be done?

A damage system?, yes, it's just hard work and you need advanced coding skills especially in math coding

Share this post


Link to post
Share on other sites
tysman

is there an easier way like maybe when the attack animation happens CJ's health will decrease at a 3-4 second interval I got that idea from the Radio Active truth from Misterix Mod smile.gif

Share this post


Link to post
Share on other sites
ZAZ

 

is there an easier way like maybe when the attack animation happens CJ's health will decrease at a 3-4 second interval I got that idea from the Radio Active truth from Misterix Mod smile.gif

yes of course, but it looks stupid if the bear looks in another direction and not to CJ

Share this post


Link to post
Share on other sites
tysman

yah your right. lets just get the walk animation out of the way, i want to use the run animation but slow it down like the bear is walking how would I do that using cleo?

Share this post


Link to post
Share on other sites
ZAZ

 

yah your right. lets just get the walk animation out of the way, i want to use the run animation but slow it down like the bear is walking how would I do that using cleo?

in this way

 

0605: actor [email protected] perform_animation_sequence "BEAR_RUN" from_file "BEAR_ANIMATION"  4.0  0  1  1  0 -1 msthen checks in the following loopif 0611:   actor [email protected] performing_animation "BEAR_RUN" else_jump @[email protected] = 0.5if<your condition>else_jump @[email protected] = 0.7jump @run:step1if<your condition>else_jump @[email protected] = 1.0jump @run:step2if<your condition>else_jump @[email protected] = 1.5jump @run:run 0393: actor [email protected] perform_animation "BEAR_RUN" at [email protected] times_normal_rate

 

Share this post


Link to post
Share on other sites
tysman

OK how would I use it with a

 05D3: AS_actor [email protected] goto_point X,Y,Z mode 7 -2 ms // versionA

 

 

could I use a code like this

0804: AS_actor [email protected] walk_to 2351.97 -1170.26 27.013 angle 0.0 radius 0.2 animation "GRLFRD_KISS_03" IFP_file "BD_FIRE" 4.0 LA 0 LX 0 LY 0 LF 0 LT -1

 

 

I would like the bear to walk to a spot using the run animation and have it slowed down a bit

 

Edited by tysman

Share this post


Link to post
Share on other sites
ZAZ

 

OK how would I use it

 

this won't work:

 

with a
 05D3: AS_actor [email protected] goto_point X,Y,Z mode 7 -2 ms // versionA

 

it works only with walkstyle, a walkanimation of ped.ifp

 

 

this can work:

 

could I use a code like this
0804: AS_actor [email protected] walk_to 2351.97 -1170.26 27.013 angle 0.0 radius 0.2 animation "GRLFRD_KISS_03" IFP_file "BD_FIRE" 4.0 LA 0 LX 0 LY 0 LF 0 LT -1

 

 

 

I posted another codes more above

did you tried it?

 

Share this post


Link to post
Share on other sites
tysman

Yes I tried all the codes above but they didn't work. Here is my full edited code, the bear is going to the spot but not using the run animation

 

// This file was decompiled using sascm.ini published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007{$VERSION 3.1.0027}{$CLEO .cs}//-------------MAIN---------------thread 'BEAR':BEAR_11wait 0if Player.Defined($PLAYER_CHAR)else_jump @BEAR_11if$ONMISSION == 0else_jump @BEAR_11if00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere -696.9056 -2102.9678 26.2662 radius 60.0 60.0 60.0else_jump @BEAR_11023C: load_special_actor 'BEAR' as 5 // models 290-299wait 504ED: load_animation "BEAR_ANIMATION"  :BEAR_117wait 0if and023D:   special_actor 5 loaded04EE:   animation "BEAR_ANIMATION" loaded  else_jump @[email protected] = Actor.Create(Mission1, #SPECIAL05, -594.8727, -2067.8113, 42.0035)Actor.Angle([email protected]) = 254.662Actor.Health([email protected]) = 100000446: set_actor [email protected] immune_to_headshots 004D8: set_actor [email protected] drowns_in_water 00946: set_actor [email protected] actions_uninterupted_by_weapon_fire 1060B: set_actor [email protected] decision_maker_to 3203FE: set_actor [email protected] money 00A1D: AS_actor [email protected] rotate_to_and_look_at_actor $PLAYER_ACTORwait 1000615: define_AS_pack_begin [email protected]: assign_actor [email protected] to_AS_pack [email protected]: actor -1 perform_animation_sequence "BEAR_STAND" IFP_file "BEAR_ANIMATION" 4.0 loop 1 0 0 0 time -1 // versionA0616: define_AS_pack_end [email protected]: remove_references_to_AS_pack [email protected] 3000754: define_new_animation_path 0755: add_animation_path_3D_coord -700.7722 -2168.2158 21.4923 animation "BEAR_RUN" IFP_file "BEAR_ANIMATION"0817: assign_actor [email protected] to_animation_path_with_walk_mode 4 route_mode 3 wait 200$BEAR_ACTOR = Actor.Health([email protected])$BEAR_ACTOR /= 4003C4: set_status_text $BEAR_ACTOR type 1 GXT 'NA' // global_variable0296: unload_special_actor 5:BEAR_321wait 0if Player.Defined($PLAYER_CHAR)else_jump @BEAR_410if not Actor.Dead([email protected])else_jump @BEAR_431if00F2:   actor $PLAYER_ACTOR near_actor [email protected] radius 200.0 200.0 0else_jump @BEAR_410$BEAR_ACTOR = Actor.Health([email protected])$BEAR_ACTOR /= 25if   0 >= $BEAR_ACTORthen 0829: actor [email protected] perform_animation "BEAR_DEATH" IFP_file "BEAR_ANIMATION" rate 4.0 time 0 and_dies 0321: kill_actor [email protected] @BEAR_321:BEAR_410Actor.RemoveReferences([email protected])0151: remove_status_text $BEAR_ACTOR065C: release_decision_maker 32jump @BEAR_11:BEAR_431Actor.RemoveReferences([email protected])0151: remove_status_text $BEAR_ACTOR0A93: end_custom_thread

 

Edited by tysman

Share this post


Link to post
Share on other sites
ZAZ

 

Here is my full edited code, the bear is going to the spot but not using the run animation

 

No, it won't work. The walk- and anim- opcodes 0755:, 0817:, as well as 0804: let the actor first walk to the specified coords and performs at the destination coords the animation.

Your plan isn't possible. A walk command let the actor allways do walkanimations of ped.ifp.

 

The only chance is to move the actor with opcode 083C: while he performs animations.

Another way would be to attach the actor to an unvisible object and attach the object to an unvisible actor and let the unvisible actor follow CJ while the main actor perform animations.

But it have negative effects.

So i recomand to use the move opcode

I wrote you a template but i don't have your animation. I used the swim animation.

Try the script below, go to Back o Beyond into red marker to spawn the BEAR

He follows CJ by moving and performs swim animation.

The script ends if you damage or aims the BEAR

Then change the animation into yours and try again

 

{$CLEO .cs}:ActorBEARMOVEAnimthread 'ACTBMAN' :ACTBMAN_1wait 0 if   Player.Defined($PLAYER_CHAR)jf @ACTBMAN_1 if 00FF:   actor $PLAYER_ACTOR sphere 1 in_sphere -594.8727 -2067.8113 42.0035 radius 8.0 8.0 8.0 on_foot jf @ACTBMAN_1 :ACTBMAN_3wait 0 023C: load_special_actor 'BEAR' as 5 // models 290-299 04ED: load_animation "SWIM" if and04EE:   animation "SWIM" loaded 023D:   special_actor 5 loaded jf @ACTBMAN_3 [email protected] = Actor.Create(CivMale, #SPECIAL05, -594.8727, -2067.8113, 42.0035)0296: unload_special_actor 5 0812: AS_actor [email protected] perform_animation "SWIM_BREAST" IFP_file "SWIM" 4.0 loopA 1 lockX 1 lockY 1 lockF 0 time -1 // versionB wait 500 083C: set_actor [email protected] velocity_in_direction_XYZ 0.0 2.0 10.0 wait 50 083C: set_actor [email protected] velocity_in_direction_XYZ 0.0 2.0 1.0 [email protected] = 5.0:ACTBMAN_12wait 0 if   Player.Defined($PLAYER_CHAR)jf @ACTBMAN_35 if and  not Actor.Dead([email protected])00F2:   actor $PLAYER_ACTOR near_actor [email protected] radius 80.0 80.0 0 jf @ACTBMAN_35 // the move calculation to follow the playerActor.StorePos([email protected], [email protected], [email protected], [email protected])Actor.StorePos($PLAYER_ACTOR, [email protected], [email protected], [email protected])0063: [email protected] -= [email protected] // (float) 0063: [email protected] -= [email protected] // (float)0604: get_Z_angle_for_point [email protected] [email protected] store_to [email protected] [email protected] += 180.0Actor.Angle([email protected]) = [email protected]: [email protected] = sine [email protected] // (float) 02F7: [email protected] = cosine [email protected] // (float) 006B: [email protected] *= [email protected] // (float) 006B: [email protected] *= [email protected] // (float) [email protected] *= -1.0083C: set_actor [email protected] velocity_in_direction_XYZ [email protected] [email protected] 0.7 if or051A:   actor [email protected] damaged_by_actor $PLAYER_ACTOR 0457:   player $PLAYER_CHAR aiming_at_actor [email protected] jf @ACTBMAN_12 :ACTBMAN_3504EF: release_animation "SWIM" Actor.RemoveReferences([email protected])jump @ACTBMAN_1

 

Edited by ZAZ

Share this post


Link to post
Share on other sites
tysman

Hey thanks ZAZ the animation works smile.gif the only problem is the bear isn't following CJ it is running to a random place and wont stop, so I have to chase after the bear and kill it. The good news is the animation isn't interrupted no matter what, all I need is it to follow CJ with the animation. My edited code

 

// This file was decompiled using sascm.ini published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007{$VERSION 3.1.0027}{$CLEO .cs}//-------------MAIN---------------thread 'BEAR':BEAR_11wait 0if Player.Defined($PLAYER_CHAR)else_jump @BEAR_11if$ONMISSION == 0else_jump @BEAR_11if00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere -696.9056 -2102.9678 26.2662 radius 60.0 60.0 60.0else_jump @BEAR_11023C: load_special_actor 'BEAR' as 5 // models 290-299wait 504ED: load_animation "BEAR_ANIMATION"  :BEAR_117wait 0if and023D:   special_actor 5 loaded04EE:   animation "BEAR_ANIMATION" loaded  else_jump @[email protected] = Actor.Create(Mission1, #SPECIAL05, -594.8727, -2067.8113, 42.0035)Actor.Angle([email protected]) = 254.662Actor.Health([email protected]) = 100000446: set_actor [email protected] immune_to_headshots 004D8: set_actor [email protected] drowns_in_water 00946: set_actor [email protected] actions_uninterupted_by_weapon_fire 1060B: set_actor [email protected] decision_maker_to 3203FE: set_actor [email protected] money 00A1D: AS_actor [email protected] rotate_to_and_look_at_actor $PLAYER_ACTORwait 1000615: define_AS_pack_begin [email protected]: assign_actor [email protected] to_AS_pack [email protected]: actor -1 perform_animation_sequence "BEAR_STAND" IFP_file "BEAR_ANIMATION" 4.0 loop 1 0 0 0 time -1 // versionA0616: define_AS_pack_end [email protected]: remove_references_to_AS_pack [email protected] 3000812: AS_actor [email protected] perform_animation "BEAR_RUN" IFP_file "BEAR_ANIMATION" 4.0 loopA 1 lockX 1 lockY 1 lockF 0 time -1 // versionBwait 500083C: set_actor [email protected] velocity_in_direction_XYZ 0.0 2.0 10.0wait 50083C: set_actor [email protected] velocity_in_direction_XYZ 0.0 2.0 [email protected] = 5.0 // the move calculation to follow the playerActor.StorePos([email protected], [email protected], [email protected], [email protected])Actor.StorePos($PLAYER_ACTOR, [email protected], [email protected], [email protected])0063: [email protected] -= [email protected] // (float)0063: [email protected] -= [email protected] // (float)0604: get_Z_angle_for_point [email protected] [email protected] store_to [email protected]@ += 180.0Actor.Angle([email protected]) = [email protected]: [email protected] = sine [email protected] // (float)02F7: [email protected] = cosine [email protected] // (float)006B: [email protected] *= [email protected] // (float)006B: [email protected] *= [email protected] // (float)[email protected] *= -1.0083C: set_actor [email protected] velocity_in_direction_XYZ [email protected] [email protected] 0.7if or051A:   actor [email protected] damaged_by_actor $PLAYER_ACTOR0457:   player $PLAYER_CHAR aiming_at_actor [email protected] wait 200$BEAR_ACTOR = Actor.Health([email protected])$BEAR_ACTOR /= 4003C4: set_status_text $BEAR_ACTOR type 1 GXT 'NA' // global_variable0296: unload_special_actor 5:BEAR_321wait 0if Player.Defined($PLAYER_CHAR)else_jump @BEAR_410if not Actor.Dead([email protected])else_jump @BEAR_431if00F2:   actor $PLAYER_ACTOR near_actor [email protected] radius 200.0 200.0 0else_jump @BEAR_410$BEAR_ACTOR = Actor.Health([email protected])$BEAR_ACTOR /= 25if   0 >= $BEAR_ACTORthen 0829: actor [email protected] perform_animation "BEAR_DEATH" IFP_file "BEAR_ANIMATION" rate 4.0 time 0 and_dies 0321: kill_actor [email protected] @BEAR_321:BEAR_410Actor.RemoveReferences([email protected])0151: remove_status_text $BEAR_ACTOR065C: release_decision_maker 32jump @BEAR_11:BEAR_431Actor.RemoveReferences([email protected])0151: remove_status_text $BEAR_ACTOR0A93: end_custom_thread

 

Share this post


Link to post
Share on other sites
ZAZ

 

Hey thanks ZAZ the animation works smile.gif the only problem is the bear isn't following CJ it is running to a random place and wont stop, so I have to chase after the bear and kill it. The good news is the animation isn't interrupted no matter what, all I need is it to follow CJ with the animation. My edited code

 

The the move calculation and the move opcode must run in a loop

Share this post


Link to post
Share on other sites
tysman

I got it to loop smile.gif even if CJ shoots at the bear it still follows, the only problem is the bear follows to close so when cj turns around to shoot there is not enough space to shoot the bear, is there a way to add more space in between the bear and cj when cj is running?

 

// This file was decompiled using sascm.ini published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007{$VERSION 3.1.0027}{$CLEO .cs}//-------------MAIN---------------thread 'BEAR':BEAR_11wait 0if Player.Defined($PLAYER_CHAR)else_jump @BEAR_11if$ONMISSION == 0else_jump @BEAR_11if00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere -696.9056 -2102.9678 26.2662 radius 60.0 60.0 60.0else_jump @BEAR_11023C: load_special_actor 'BEAR' as 5 // models 290-299wait 504ED: load_animation "BEAR_ANIMATION"  :BEAR_117wait 0if and023D:   special_actor 5 loaded04EE:   animation "BEAR_ANIMATION" loaded  else_jump @[email protected] = Actor.Create(Mission1, #SPECIAL05, -594.8727, -2067.8113, 42.0035)Actor.Angle([email protected]) = 254.662Actor.Health([email protected]) = 100000446: set_actor [email protected] immune_to_headshots 004D8: set_actor [email protected] drowns_in_water 00946: set_actor [email protected] actions_uninterupted_by_weapon_fire 1060B: set_actor [email protected] decision_maker_to 3203FE: set_actor [email protected] money 00A1D: AS_actor [email protected] rotate_to_and_look_at_actor $PLAYER_ACTORwait 1000615: define_AS_pack_begin [email protected]: assign_actor [email protected] to_AS_pack [email protected]: actor -1 perform_animation_sequence "BEAR_STAND" IFP_file "BEAR_ANIMATION" 4.0 loop 1 0 0 0 time -1 // versionA0616: define_AS_pack_end [email protected]: remove_references_to_AS_pack [email protected] 3000812: AS_actor [email protected] perform_animation "BEAR_RUN" IFP_file "BEAR_ANIMATION" 4.0 loopA 1 lockX 1 lockY 1 lockF 0 time -1 // versionBwait 500083C: set_actor [email protected] velocity_in_direction_XYZ 0.0 2.0 10.0wait 50083C: set_actor [email protected] velocity_in_direction_XYZ 0.0 2.0 [email protected] = 5.0:BEAR_220 // the move calculation to follow the playerActor.StorePos([email protected], [email protected], [email protected], [email protected])Actor.StorePos($PLAYER_ACTOR, [email protected], [email protected], [email protected])0063: [email protected] -= [email protected] // (float)0063: [email protected] -= [email protected] // (float)0604: get_Z_angle_for_point [email protected] [email protected] store_to [email protected]@ += 180.0Actor.Angle([email protected]) = [email protected]: [email protected] = sine [email protected] // (float)02F7: [email protected] = cosine [email protected] // (float)006B: [email protected] *= [email protected] // (float)006B: [email protected] *= [email protected] // (float)[email protected] *= -1.0083C: set_actor [email protected] velocity_in_direction_XYZ [email protected] [email protected] 0.7if or051A:   actor [email protected] damaged_by_actor $PLAYER_ACTOR0457:   player $PLAYER_CHAR aiming_at_actor [email protected] 200$BEAR_ACTOR = Actor.Health([email protected])$BEAR_ACTOR /= 4003C4: set_status_text $BEAR_ACTOR type 1 GXT 'NA' // global_variable0296: unload_special_actor 5jump @BEAR_220:BEAR_321wait 0if Player.Defined($PLAYER_CHAR)else_jump @BEAR_410if not Actor.Dead([email protected])else_jump @BEAR_431if00F2:   actor $PLAYER_ACTOR near_actor [email protected] radius 200.0 200.0 0else_jump @BEAR_410$BEAR_ACTOR = Actor.Health([email protected])$BEAR_ACTOR /= 25if   0 >= $BEAR_ACTORthen 0829: actor [email protected] perform_animation "BEAR_DEATH" IFP_file "BEAR_ANIMATION" rate 4.0 time 0 and_dies 0321: kill_actor [email protected] @BEAR_321:BEAR_410Actor.RemoveReferences([email protected])0151: remove_status_text $BEAR_ACTOR065C: release_decision_maker 32jump @BEAR_11:BEAR_431Actor.RemoveReferences([email protected])0151: remove_status_text $BEAR_ACTOR0A93: end_custom_thread

 

Edited by tysman

Share this post


Link to post
Share on other sites
tysman

also the bear doesn't perform death animation and dies sad.gif

Share this post


Link to post
Share on other sites
ZAZ

 

also the bear doesn't perform death animation and dies sad.gif

Oh tysman, it's very hard.

You made a closed loop

 

 

:BEAR_220now it's looping endless in this partno other jump instruction to jump outjump @BEAR_220

 

 

and you had luck that it didn't crash because there should be a wait

 

remove that part!

 

add the move calculation and the move opcode at that place where the $BEAR_ACTOR calculation is placed

 

 

 

////////////////////////////////////////////////////// the move calculation to follow the playerActor.StorePos([email protected], [email protected], [email protected], [email protected])Actor.StorePos($PLAYER_ACTOR, [email protected], [email protected], [email protected])0063: [email protected] -= [email protected] // (float)0063: [email protected] -= [email protected] // (float)0604: get_Z_angle_for_point [email protected] [email protected] store_to [email protected]@ += 180.0Actor.Angle([email protected]) = [email protected]: [email protected] = sine [email protected] // (float)02F7: [email protected] = cosine [email protected] // (float)006B: [email protected] *= [email protected] // (float)006B: [email protected] *= [email protected] // (float)[email protected] *= -1.0083C: set_actor [email protected] velocity_in_direction_XYZ [email protected] [email protected] 0.7/////////////////////////////// paste this ^^,  below VV:BEAR_321wait 0ifPlayer.Defined($PLAYER_CHAR)else_jump @BEAR_410ifnot Actor.Dead([email protected])else_jump @BEAR_431if00F2:   actor $PLAYER_ACTOR near_actor [email protected] radius 200.0 200.0 0else_jump @BEAR_410//              <---------------add the move calculation and the move opcode here$BEAR_ACTOR = Actor.Health([email protected])$BEAR_ACTOR /= 25if  0 >= $BEAR_ACTORthen0829: actor [email protected] perform_animation "BEAR_DEATH" IFP_file "BEAR_ANIMATION" rate 4.0 time 0 and_dies0321: kill_actor [email protected] @BEAR_321

 

Share this post


Link to post
Share on other sites
tysman

Hey thanks it worked the bear dies properly and he follows cj no matter what, how can I slow the run animation down a bit or put some space between cj and the bear so cj has a chance to shoot it smile.gif My working code

 

// This file was decompiled using sascm.ini published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007{$VERSION 3.1.0027}{$CLEO .cs}//-------------MAIN---------------thread 'BEAR':BEAR_11wait 0if Player.Defined($PLAYER_CHAR)else_jump @BEAR_11if$ONMISSION == 0else_jump @BEAR_11if00FF:   actor $PLAYER_ACTOR sphere 0 in_sphere -696.9056 -2102.9678 26.2662 radius 60.0 60.0 60.0 on_footelse_jump @BEAR_11023C: load_special_actor 'BEAR' as 5 // models 290-299wait 504ED: load_animation "BEAR_ANIMATION"  :BEAR_117wait 0if and023D:   special_actor 5 loaded04EE:   animation "BEAR_ANIMATION" loaded  else_jump @[email protected] = Actor.Create(Mission1, #SPECIAL05, -594.8727, -2067.8113, 42.0035)Actor.Angle([email protected]) = 254.662Actor.Health([email protected]) = 100000446: set_actor [email protected] immune_to_headshots 004D8: set_actor [email protected] drowns_in_water 00946: set_actor [email protected] actions_uninterupted_by_weapon_fire 1060B: set_actor [email protected] decision_maker_to 3203FE: set_actor [email protected] money 00A1D: AS_actor [email protected] rotate_to_and_look_at_actor $PLAYER_ACTORwait 1000615: define_AS_pack_begin [email protected]: assign_actor [email protected] to_AS_pack [email protected]: actor -1 perform_animation_sequence "BEAR_STAND" IFP_file "BEAR_ANIMATION" 4.0 loop 1 0 0 0 time -1 // versionA0616: define_AS_pack_end [email protected]: remove_references_to_AS_pack [email protected] 200$BEAR_ACTOR = Actor.Health([email protected])$BEAR_ACTOR /= 4003C4: set_status_text $BEAR_ACTOR type 1 GXT 'NA' // global_variable0296: unload_special_actor 5:BEAR_220wait 3000812: AS_actor [email protected] perform_animation "BEAR_RUN" IFP_file "BEAR_ANIMATION" 4.0 loopA 1 lockX 1 lockY 1 lockF 0 time -1 // versionBwait 500083C: set_actor [email protected] velocity_in_direction_XYZ 0.0 2.0 10.0wait 50083C: set_actor [email protected] velocity_in_direction_XYZ 0.0 2.0 [email protected] = 5.0jump @BEAR_321:BEAR_321wait 0if Player.Defined($PLAYER_CHAR)else_jump @BEAR_410if not Actor.Dead([email protected])else_jump @BEAR_431if00F2:   actor $PLAYER_ACTOR near_actor [email protected] radius 200.0 200.0 0else_jump @BEAR_410// the move calculation to follow the playerActor.StorePos([email protected], [email protected], [email protected], [email protected])Actor.StorePos($PLAYER_ACTOR, [email protected], [email protected], [email protected])0063: [email protected] -= [email protected] // (float)0063: [email protected] -= [email protected] // (float)0604: get_Z_angle_for_point [email protected] [email protected] store_to [email protected]@ += 180.0Actor.Angle([email protected]) = [email protected]: [email protected] = sine [email protected] // (float)02F7: [email protected] = cosine [email protected] // (float)006B: [email protected] *= [email protected] // (float)006B: [email protected] *= [email protected] // (float)[email protected] *= -1.0083C: set_actor [email protected] velocity_in_direction_XYZ [email protected] [email protected] 0.7if or051A:   actor [email protected] damaged_by_actor $PLAYER_ACTOR0457:   player $PLAYER_CHAR aiming_at_actor [email protected]$BEAR_ACTOR = Actor.Health([email protected])$BEAR_ACTOR /= 25if   0 >= $BEAR_ACTORthen 0829: actor [email protected] perform_animation "BEAR_DEATH" IFP_file "BEAR_ANIMATION" rate 4.0 time 0 and_dies 0321: kill_actor [email protected] @BEAR_321:BEAR_410Actor.RemoveReferences([email protected])0151: remove_status_text $BEAR_ACTOR065C: release_decision_maker 32jump @BEAR_11:BEAR_431Actor.RemoveReferences([email protected])0151: remove_status_text $BEAR_ACTOR0A93: end_custom_thread

 

Edited by tysman

Share this post


Link to post
Share on other sites
ZAZ

 

Hey thanks it worked the bear dies properly and he follows cj no matter what, how can I slow the run animation down a bit or put some space between cj and the bear so cj has a chance to shoot it smile.gif My working code

 

 

in this way

 

0605: actor [email protected] perform_animation_sequence "BEAR_RUN" from_file "BEAR_ANIMATION"  4.0  0  1  1  0 -1 msthen checks in the following loopif 0611:   actor [email protected] performing_animation "BEAR_RUN" else_jump @[email protected] = 0.5if<your condition>else_jump @[email protected] = 0.7jump @run:step1if<your condition>else_jump @[email protected] = 1.0jump @run:step2if<your condition>else_jump @[email protected] = 1.5jump @run:run 0393: actor [email protected] perform_animation "BEAR_RUN" at [email protected] times_normal_rate

 

 

 

 

 

 

and for the move speed:

this is the value for the speed:

 

[email protected] = 5.0

 

 

you must add checks to adjust value

 

 

if<your condition>else_jump @[email protected] = 3.0jump @run:step1if<your condition>else_jump @[email protected] = 5.0jump @run:step2if<your condition>else_jump @[email protected] = 10.0jump @run:run// the move calculation to follow the playerActor.StorePos([email protected], [email protected], [email protected], [email protected])Actor.StorePos($PLAYER_ACTOR, [email protected], [email protected], [email protected])0063: [email protected] -= [email protected] // (float)0063: [email protected] -= [email protected] // (float)0604: get_Z_angle_for_point [email protected] [email protected] store_to [email protected]@ += 180.0Actor.Angle([email protected]) = [email protected]: [email protected] = sine [email protected] // (float)02F7: [email protected] = cosine [email protected] // (float)006B: [email protected] *= [email protected] // (float)006B: [email protected] *= [email protected] // (float)[email protected] *= -1.0083C: set_actor [email protected] velocity_in_direction_XYZ [email protected] [email protected] 0.7

 

 

 

now it's time for you to learn about Math coding

Edited by ZAZ

Share this post


Link to post
Share on other sites
tysman

I decided to try the mod again, but this time the bear is running up into the sky, when I wait little bit then the bear starts to slowly come down to about on top of CJ's head then if CJ moves the bear will slowly, go to the ground and it will remain on the ground after that. The bear is still following CJ through all of that but I want the bear to be on the ground LOL, how can I fix that?

 

// This file was decompiled using sascm.ini published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007{$VERSION 3.1.0027}{$CLEO .cs}//-------------MAIN---------------thread 'BEAR':BEAR_11wait 0if Player.Defined($PLAYER_CHAR)else_jump @BEAR_11if$ONMISSION == 0else_jump @BEAR_11if00FF:   actor $PLAYER_ACTOR sphere 0 in_sphere -696.9056 -2102.9678 26.2662 radius 60.0 60.0 60.0 on_footelse_jump @BEAR_11023C: load_special_actor 'BEAR' as 5 // models 290-299wait 504ED: load_animation "BEAR_ANIMATION"  :BEAR_117wait 0if and023D:   special_actor 5 loaded04EE:   animation "BEAR_ANIMATION" loaded  else_jump @[email protected] = Actor.Create(Mission1, #SPECIAL05, -594.8727, -2067.8113, 42.0035)Actor.Angle([email protected]) = 254.662Actor.Health([email protected]) = 100000446: set_actor [email protected] immune_to_headshots 004D8: set_actor [email protected] drowns_in_water 00946: set_actor [email protected] actions_uninterupted_by_weapon_fire 1060B: set_actor [email protected] decision_maker_to 3203FE: set_actor [email protected] money 00A1D: AS_actor [email protected] rotate_to_and_look_at_actor $PLAYER_ACTORwait 1000615: define_AS_pack_begin [email protected]: assign_actor [email protected] to_AS_pack [email protected]: actor -1 perform_animation_sequence "BEAR_STAND" IFP_file "BEAR_ANIMATION" 4.0 loop 1 0 0 0 time -1 // versionA0616: define_AS_pack_end [email protected]: remove_references_to_AS_pack [email protected] 200$BEAR_ACTOR = Actor.Health([email protected])$BEAR_ACTOR /= 4003C4: set_status_text $BEAR_ACTOR type 1 GXT 'NA' // global_variable0296: unload_special_actor 5:BEAR_220wait 3000812: AS_actor [email protected] perform_animation "BEAR_RUN" IFP_file "BEAR_ANIMATION" 4.0 loopA 1 lockX 1 lockY 1 lockF 0 time -1 // versionBwait 500083C: set_actor [email protected] velocity_in_direction_XYZ 0.0 2.0 10.0wait 50083C: set_actor [email protected] velocity_in_direction_XYZ 0.0 2.0 [email protected] = 5.0jump @BEAR_321:BEAR_321wait 0if Player.Defined($PLAYER_CHAR)else_jump @BEAR_410if not Actor.Dead([email protected])else_jump @BEAR_431if00F2:   actor $PLAYER_ACTOR near_actor [email protected] radius 200.0 200.0 0else_jump @BEAR_410// the move calculation to follow the playerActor.StorePos([email protected], [email protected], [email protected], [email protected])Actor.StorePos($PLAYER_ACTOR, [email protected], [email protected], [email protected])0063: [email protected] -= [email protected] // (float)0063: [email protected] -= [email protected] // (float)0604: get_Z_angle_for_point [email protected] [email protected] store_to [email protected]@ += 180.0Actor.Angle([email protected]) = [email protected]: [email protected] = sine [email protected] // (float)02F7: [email protected] = cosine [email protected] // (float)006B: [email protected] *= [email protected] // (float)006B: [email protected] *= [email protected] // (float)[email protected] *= -1.0083C: set_actor [email protected] velocity_in_direction_XYZ [email protected] [email protected] 0.7if or051A:   actor [email protected] damaged_by_actor $PLAYER_ACTOR0457:   player $PLAYER_CHAR aiming_at_actor [email protected]$BEAR_ACTOR = Actor.Health([email protected])$BEAR_ACTOR /= 25if   0 >= $BEAR_ACTORthen 0829: actor [email protected] perform_animation "BEAR_DEATH" IFP_file "BEAR_ANIMATION" rate 4.0 time 0 and_dies 0321: kill_actor [email protected] @BEAR_321:BEAR_410Actor.RemoveReferences([email protected])0151: remove_status_text $BEAR_ACTOR065C: release_decision_maker 32jump @BEAR_11:BEAR_431Actor.RemoveReferences([email protected])0151: remove_status_text $BEAR_ACTOR0A93: end_custom_thread

 

Edited by tysman

Share this post


Link to post
Share on other sites
tysman

Sorry for double post, I figured out why the bear was running up towards the sky then slowly coming down. I had to remove these codes

 

wait 500083C: set_actor [email protected] velocity_in_direction_XYZ 0.0 2.0 10.0wait 50083C: set_actor [email protected] velocity_in_direction_XYZ 0.0 2.0 1.0

 

apparently the bear is up in the air using the first Z axis of 10.0 then it uses the next one which is 1.0 where the bear is on the ground, so I removed them both and now the bear runs on the ground smile.gif OK I am ready for hard math coding smile.gif

Share this post


Link to post
Share on other sites
ZAZ

I find out that it is very easy with a run animtion without opcode 083C: in the case that your "BEAR_RUN" works correct

I tested with "BBALL_run" of IFP_file "BSKTBALL"

Try the script below then replace the animations and test again

 

"BSKTBALL" into "BEAR_ANIMATION"

"BBALL_run" into "BEAR_RUN"

"BBALL_react_miss" into "BEAR_DEATH"

 

 

{$CLEO .cs}//-------------MAIN---------------thread 'BEAR'wait 1000:BEAR_11wait 0ifPlayer.Defined($PLAYER_CHAR)else_jump @BEAR_11if$ONMISSION == 0else_jump @BEAR_11if00FF:   actor $PLAYER_ACTOR sphere 0 in_sphere -696.9056 -2102.9678 26.2662 radius 60.0 60.0 60.0 on_footelse_jump @BEAR_11023C: load_special_actor 'BEAR' as 5 // models 290-299wait 504ED: load_animation "BSKTBALL"  :BEAR_117wait 0if and023D:   special_actor 5 loaded04EE:   animation "BSKTBALL" loaded  else_jump @[email protected] = Actor.Create(Mission1, #SPECIAL05, -594.8727, -2067.8113, 42.0035)Actor.Angle([email protected]) = 254.662Actor.Health([email protected]) = 100000446: set_actor [email protected] immune_to_headshots 004D8: set_actor [email protected] drowns_in_water 00946: set_actor [email protected] actions_uninterupted_by_weapon_fire 1060B: set_actor [email protected] decision_maker_to 3203FE: set_actor [email protected] money 0wait 5000639: AS_actor [email protected] rotate_to_actor $PLAYER_ACTOR wait 1500$BEAR_ACTOR = Actor.Health([email protected])$BEAR_ACTOR /= 4003C4: set_status_text $BEAR_ACTOR type 1 GXT 'NA' // global_variable0296: unload_special_actor 50812: AS_actor [email protected] perform_animation "BBALL_run" IFP_file "BSKTBALL" 4.0 loopA 1 lockX 1 lockY 1 lockF 0 time -1 // versionB:BEAR_321wait 0ifPlayer.Defined($PLAYER_CHAR)else_jump @BEAR_410ifnot Actor.Dead([email protected])else_jump @BEAR_431if00F2:   actor $PLAYER_ACTOR near_actor [email protected] radius 200.0 200.0 0else_jump @BEAR_410if80F2: not  actor $PLAYER_ACTOR near_actor [email protected] radius 0.5 0.5 0else_jump @[email protected] = 1.0if00F2:   actor $PLAYER_ACTOR near_actor [email protected] radius 8.0 8.0 0else_jump @[email protected] = 0.5:BEAR_325if0611:   actor [email protected] performing_animation "BBALL_run" else_jump @BEAR_3270393: actor [email protected] perform_animation "BBALL_run" at [email protected] times_normal_rate:BEAR_327Actor.StorePos([email protected], [email protected], [email protected], [email protected])Actor.StorePos($PLAYER_ACTOR, [email protected], [email protected], [email protected])0063: [email protected] -= [email protected] // (float)0063: [email protected] -= [email protected] // (float)0604: get_Z_angle_for_point [email protected] [email protected] store_to [email protected]@ += 180.0Actor.Angle([email protected]) = [email protected]:BEAR_377if or051A:   actor [email protected] damaged_by_actor $PLAYER_ACTOR0457:   player $PLAYER_CHAR aiming_at_actor [email protected]$BEAR_ACTOR = Actor.Health([email protected])$BEAR_ACTOR /= 25if  0 >= $BEAR_ACTORthen0829: actor [email protected] perform_animation "BBALL_react_miss" IFP_file "BSKTBALL" rate 4.0 time 0 and_dieswait 10000792: disembark_instantly_actor [email protected]: AS_kill_actor [email protected] @BEAR_431endjump @BEAR_321:BEAR_410Actor.RemoveReferences([email protected])0151: remove_status_text $BEAR_ACTOR065C: release_decision_maker 32jump @BEAR_11:BEAR_431Actor.RemoveReferences([email protected])0151: remove_status_text $BEAR_ACTOR0A93: end_custom_thread

 

Share this post


Link to post
Share on other sites
tysman

Hey thanks now the bear slows down when it is close to CJ smile.gif I read your tutorial on math coding, and it is well explained. I think I have a basic idea of how it works, but I couldn't find anything on performing an animation and hurting the player at the same time, can you please help smile.gif

Edited by tysman

Share this post


Link to post
Share on other sites
tysman

I know double post, I really need to stop doing it. Hey ZAZ I noticed you have allot of guys to help on this Forum site, so help me with the math coding when ever you are free. smile.gif OH I haven't really said it before but, I really appreciate you helping me with this mod smile.gif

Share this post


Link to post
Share on other sites
ZAZ

 

Hey thanks now the bear slows down when it is close to CJ smile.gif  I read your tutorial on math coding, and it is well explained. I think I have a basic idea of how it works, but I couldn't find anything on performing an animation and hurting the player at the same time, can you please help smile.gif

At first we need to make it possible that BEAR makes a fight animation.

The script should switch between RUN and FIGHT.

This could basicly easy because the script can check if the BEAR is near CJ and let him do a fight animation

and if the BEAR is not near CJ, it can let him do the run anim.

 

if00F2:  actor $PLAYER_ACTOR near_actor [email protected] radius 1.5 1.5 0else_jump @BEAR_3220812: AS_actor [email protected] perform_animation "FightA_3" IFP_file "PED" 4.0 loopA 1 lockX 1 lockY 1 lockF 0 time -1 // versionBjump @BEAR_324:BEAR_322if80F2: not  actor $PLAYER_ACTOR near_actor [email protected] radius 1.7 1.7 0else_jump @BEAR_3240812: AS_actor [email protected] perform_animation "BBALL_run" IFP_file "BSKTBALL" 4.0 loopA 1 lockX 1 lockY 1 lockF 0 time -1 // versionB

 

 

But the problem is that the animation code shouldn't loop otherwise the BEAR would studdering

so we need something which I called "Give access with math coding"

 

Use a variable which have the value 0 as default

check if the value is still 0 to give access for a command

then change the value to 1 to prevent access for the command

 

Now merge the access check with the check "if BEAR is near CJ" into one conditional check

Make 2 of such conditional checks to toggle between RUN and FIGHT.

 

I hope you understand what i mean, look at the script snippet below

 

[email protected] = 0:BEAR_LOOPif [email protected] == 000F2:  actor $PLAYER_ACTOR near_actor [email protected] radius 1.5 1.5 0else_jump @BEAR_3220812: AS_actor [email protected] perform_animation "FightA_3" IFP_file "PED" 4.0 loopA 1 lockX 1 lockY 1 lockF 0 time -1 // [email protected] = 1jump @BEAR_324:BEAR_322if [email protected] == 180F2: not  actor $PLAYER_ACTOR near_actor [email protected] radius 1.7 1.7 0else_jump @BEAR_3240812: AS_actor [email protected] perform_animation "BBALL_run" IFP_file "BSKTBALL" 4.0 loopA 1 lockX 1 lockY 1 lockF 0 time -1 // [email protected] = 0

 

 

Try the script below. I used again the BSKTBALL animation and at this time the "FightA_3" of IFP_file "PED"

Then change the animations with yours

 

{$CLEO .cs}//-------------MAIN---------------thread 'BEAR':BEAR_11wait 0ifPlayer.Defined($PLAYER_CHAR)else_jump @BEAR_11if$ONMISSION == 0else_jump @BEAR_11if00FF:   actor $PLAYER_ACTOR sphere 0 in_sphere -696.9056 -2102.9678 26.2662 radius 60.0 60.0 60.0 on_footelse_jump @BEAR_11023C: load_special_actor 'BEAR' as 5 // models 290-299wait 504ED: load_animation "BSKTBALL"  :BEAR_117wait 0if and023D:   special_actor 5 loaded04EE:   animation "BSKTBALL" loaded  else_jump @[email protected] = Actor.Create(Mission1, #SPECIAL05, -594.8727, -2067.8113, 42.0035)Actor.Angle([email protected]) = 254.662Actor.Health([email protected]) = 100000446: set_actor [email protected] immune_to_headshots 004D8: set_actor [email protected] drowns_in_water 00946: set_actor [email protected] actions_uninterupted_by_weapon_fire 1060B: set_actor [email protected] decision_maker_to 3203FE: set_actor [email protected] money 0wait 5000639: AS_actor [email protected] rotate_to_actor $PLAYER_ACTOR wait 1500$BEAR_ACTOR = Actor.Health([email protected])$BEAR_ACTOR /= 4003C4: set_status_text $BEAR_ACTOR type 1 GXT 'NA' // global_variable0296: unload_special_actor 50812: AS_actor [email protected] perform_animation "BBALL_run" IFP_file "BSKTBALL" 4.0 loopA 1 lockX 1 lockY 1 lockF 0 time -1 // [email protected] = 0:BEAR_321wait 0ifPlayer.Defined($PLAYER_CHAR)else_jump @BEAR_410ifnot Actor.Dead([email protected])else_jump @BEAR_431if00F2:   actor $PLAYER_ACTOR near_actor [email protected] radius 200.0 200.0 0else_jump @BEAR_410if [email protected] == 000F2:  actor $PLAYER_ACTOR near_actor [email protected] radius 1.5 1.5 0else_jump @BEAR_3220812: AS_actor [email protected] perform_animation "FightA_3" IFP_file "PED" 4.0 loopA 1 lockX 1 lockY 1 lockF 0 time -1 // [email protected] = 1jump @BEAR_324:BEAR_322if [email protected] == 180F2: not  actor $PLAYER_ACTOR near_actor [email protected] radius 1.7 1.7 0else_jump @BEAR_3240812: AS_actor [email protected] perform_animation "BBALL_run" IFP_file "BSKTBALL" 4.0 loopA 1 lockX 1 lockY 1 lockF 0 time -1 // [email protected] = 0:[email protected] = 1.0if00F2:   actor $PLAYER_ACTOR near_actor [email protected] radius 8.0 8.0 0else_jump @[email protected] = 0.5:BEAR_325if0611:   actor [email protected] performing_animation "BBALL_run" else_jump @BEAR_3270393: actor [email protected] perform_animation "BBALL_run" at [email protected] times_normal_rate:BEAR_327Actor.StorePos([email protected], [email protected], [email protected], [email protected])Actor.StorePos($PLAYER_ACTOR, [email protected], [email protected], [email protected])0063: [email protected] -= [email protected] // (float)0063: [email protected] -= [email protected] // (float)0604: get_Z_angle_for_point [email protected] [email protected] store_to [email protected]@ += 180.0Actor.Angle([email protected]) = [email protected]:BEAR_377if or051A:   actor [email protected] damaged_by_actor $PLAYER_ACTOR0457:   player $PLAYER_CHAR aiming_at_actor [email protected]$BEAR_ACTOR = Actor.Health([email protected])$BEAR_ACTOR /= 25if  0 >= $BEAR_ACTORthen0829: actor [email protected] perform_animation "BBALL_react_miss" IFP_file "BSKTBALL" rate 4.0 time 0 and_dieswait 10000792: disembark_instantly_actor [email protected]: AS_kill_actor [email protected] @BEAR_431endjump @BEAR_321:BEAR_410Actor.RemoveReferences([email protected])0151: remove_status_text $BEAR_ACTOR065C: release_decision_maker 32jump @BEAR_11:BEAR_431Actor.RemoveReferences([email protected])0151: remove_status_text $BEAR_ACTOR0A93: end_custom_thread

 

Edited by ZAZ

Share this post


Link to post
Share on other sites
tysman

It works great but the animation for the attack is to fast the bear moves his paw to hurt CJ a little to fast

Share this post


Link to post
Share on other sites
ZAZ

 

It works great but the animation for the attack is to fast the bear moves his paw to hurt CJ a little to fast

Do you mean the "FightA_3" of IFP_file "PED" ?

or do you have a BEAR_FIGHT animation?

Is the animation itself to fast or does it repeat to fast?

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  

  • 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.