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. Forum Support

    3. Suggestions

How can I make AIs jump/climb when they touch the wall


skatefilter5
 Share

Recommended Posts

Like I was playing MTA: Zombie Survival, the AI zombies chases me and jump to me when i jump to the ledge.

 

I want the Actors to do the same thing like it's done like the zombies jump and climb when there stuck from running to the wall or the fence. And they can get past by the fence.

 

The same thing like I was playing:

 

Edited by skatefilter5
Link to comment
Share on other sites

They're just normal peds I guess, I think you have to give a command to a specific event but sadly I don't know how to do it

Link to comment
Share on other sites

do you think we're watching video for a hour to find what you mean?

well the zombies that keeps jumping to me when their climbing up the fence and the ledge like realistic chase and this is the video i only had, I will make the short video about the zombies chasing me soon.

 

for example running away from peds off the wrestling match and make the ped jump over the object whenever it detects collisions

Link to comment
Share on other sites

skatefilter5

here the one I wanted to have request with these AIs

 

 

Edited by skatefilter5
Link to comment
Share on other sites

 

make a testscript to see what the code returns

083D: get_actor [email protected] velocity_in_direction_XYZ [email protected] [email protected] [email protected]

use it to check if the zombies have progress when moving

if not, then execute the jump code 05BC: AS_actor [email protected] jump 1

Link to comment
Share on other sites

skatefilter5
Well i try it and he not jumping while he's chasing me, through the ledges and how do I create an object for the city instead of new object?


there's no collision with an city object in the list



{$CLEO .cs}


//-------------MAIN---------------

0000: NOP



//:NONAME_9

//Model.Load(#HECK1)

//Model.Load(#colt45)




//object.Create([email protected], $TEMPVAR_FLOAT_1 $TEMPVAR_FLOAT_2 $TEMPVAR_FLOAT_3)


:NONAME_9

Model.Load(#HECK1)

wait 100

if

0ADC: test_cheat "test"

jf @NONAME_9

04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 0.0 15.0 -1.0

wait 500

00BA: show_text_styled GXT 'TXT_01' time 1000 style 1

wait 200

$WAV15 = Audiostream.Load("CLEO\SOUND\FIGHT.WAV")

Audiostream.PerformAction($WAV15, PLAY)

wait 1000


Actor.Health([email protected]) = 99999

Actor.AddArmour([email protected], 99999)

Actor.SetWalkStyle([email protected], "PLAYER")

Actor.SetImmunities([email protected], 1, 1, 1, 1, 1)

//078F: AS_actor [email protected] climb 1

083D: get_actor $PLAYER_ACTOR velocity_in_direction_XYZ $TEMPVAR_FLOAT_1 $TEMPVAR_FLOAT_2 $TEMPVAR_FLOAT_3



07FE: set_actor [email protected] fighting_style_to 7 moves 6

0946: set_actor [email protected] actions_uninterupted_by_weapon_fire 1

07DD: set_actor [email protected] attack_rate 100 // previously known as temper_to

02E0: actor [email protected] firing_weapon

//06E3: AS_actor [email protected] roll_sideways 1

//04EB: AS_actor [email protected] crouch 1

0856: set_actor [email protected] enable_crouch 1

0850: AS_actor [email protected] follow_actor $PLAYER_ACTOR

05E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR

04D8: set_actor [email protected] drowns_in_water 0

//Actor.GiveWeaponAndAmmo([email protected], Pistol, 9999)

0619: enable_actor [email protected] collision_detection 1



gosub @Jump


:Jump

wait 100


if or


//0474: actor [email protected] near_object_in_cube [email protected] radius 15.0 15.0 4.0 sphere 0


//0471: actor [email protected] near_object_in_rectangle $2727 radius 50.0 50.0 sphere 0


00F0: actor [email protected] 0 near_point 2175.29 -2259.22 radius 3.0 3.0 stopped_on_foot


0102: actor [email protected] in_sphere 2468.8 -1278.2 29.1 radius 1.2 1.2 3.0 sphere 1 stopped_on_foot


00FE: actor [email protected] sphere 0 in_sphere 658.0068 -1866.313 4.4537 radius 15.0 15.0 15.0


00A3: actor [email protected] sphere 0 in_rectangle_cornerA 2037.536 2365.373 cornerB 2117.177 2483.922


//0471: actor [email protected] near_object_in_rectangle $2727 radius 5.0 5.0 sphere 0

else_jump @Jump

jf @Jump

05BC: AS_actor [email protected] jump 1

jump @Jump





:NONAME_2

wait 0

if

0ADC: test_cheat "test"


jf @NONAME_2

Audiostream.PerformAction($WAV15, STOP)

Audiostream.Release($WAV15)

wait 1000

Actor.DestroyInstantly([email protected])



jump @NONAME_9


I tried 00FE: actor [email protected] sphere 0 in_sphere 658.0068 -1866.313 4.4537 radius 15.0 15.0 15.0 and it didn't work.


She can't jump into the fence


Edited by skatefilter5
Link to comment
Share on other sites

  • 5 years later...

{$CLEO .cs}


//-------------MAIN---------------

0000: NOP

//:NONAME_9

//Model.Load(#HECK1)

//Model.Load(#colt45)


//object.Create([email protected], $TEMPVAR_FLOAT_1 $TEMPVAR_FLOAT_2 $TEMPVAR_FLOAT_3)


:NONAME_9

Model.Load(#HECK1)

wait 100

if

0ADC: test_cheat "w"

jf @NONAME_9

04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 0.0 15.0 -1.0
 

wait 500

00BA: show_text_styled GXT 'TXT_01' time 1000 style 1

wait 200

  0209: [email protected] = random_int_in_ranges 70 85
  0209: [email protected] = random_int_in_ranges 1 5

[email protected] = Actor.Create(gang1, #HECK1, [email protected], [email protected], [email protected])

Actor.Health([email protected]) = 999

Actor.AddArmour([email protected], 999)

Actor.SetWalkStyle([email protected], "BLINDMAN")

Actor.SetImmunities([email protected], 0, 0, 0, 0, 0)

actor.GiveWeaponAndAmmo([email protected],[email protected],[email protected])

06AB: set_actor [email protected] all_weapons_hidden 1

083D: get_actor [email protected] velocity_in_direction_XYZ $TEMPVAR_FLOAT_1 $TEMPVAR_FLOAT_2 $TEMPVAR_FLOAT_3

083D: get_actor [email protected] velocity_in_direction_XYZ [email protected] [email protected] [email protected]

07FE: set_actor [email protected] fighting_style_to 7 moves 6

0946: set_actor [email protected] actions_uninterupted_by_weapon_fire 1

07DD: set_actor [email protected] attack_rate 100 // previously known as temper_to

0850: AS_actor [email protected] follow_actor $PLAYER_ACTOR

05E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR

04D8: set_actor [email protected] drowns_in_water 0

0619: enable_actor [email protected] collision_detection 1

:NOF

00E1:   player 0 pressed_key 14

wait 500
 
if

05BC: AS_actor [email protected] jump 1
078F: AS_actor [email protected] climb 1

jump @NOF

:NONAME_2

wait 0

if

0ADC: test_cheat "w"


jf @NONAME_2


wait 100

Actor.DestroyInstantly([email protected])

jump @NONAME_9
 

 

 

 

 

 

 

############

Look what happend: 

 

Link to comment
Share on other sites

On 2/4/2022 at 9:57 AM, Oitavu said:

{$CLEO .cs}


//-------------MAIN---------------

0000: NOP

//:NONAME_9

//Model.Load(#HECK1)

//Model.Load(#colt45)


//object.Create([email protected], $TEMPVAR_FLOAT_1 $TEMPVAR_FLOAT_2 $TEMPVAR_FLOAT_3)


:NONAME_9

Model.Load(#HECK1)

wait 100

if

0ADC: test_cheat "w"

jf @NONAME_9

04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 0.0 15.0 -1.0
 

wait 500

00BA: show_text_styled GXT 'TXT_01' time 1000 style 1

wait 200

  0209: [email protected] = random_int_in_ranges 70 85
  0209: [email protected] = random_int_in_ranges 1 5

[email protected] = Actor.Create(gang1, #HECK1, [email protected], [email protected], [email protected])

Actor.Health([email protected]) = 999

Actor.AddArmour([email protected], 999)

Actor.SetWalkStyle([email protected], "BLINDMAN")

Actor.SetImmunities([email protected], 0, 0, 0, 0, 0)

actor.GiveWeaponAndAmmo([email protected],[email protected],[email protected])

06AB: set_actor [email protected] all_weapons_hidden 1

083D: get_actor [email protected] velocity_in_direction_XYZ $TEMPVAR_FLOAT_1 $TEMPVAR_FLOAT_2 $TEMPVAR_FLOAT_3

083D: get_actor [email protected] velocity_in_direction_XYZ [email protected] [email protected] [email protected]

07FE: set_actor [email protected] fighting_style_to 7 moves 6

0946: set_actor [email protected] actions_uninterupted_by_weapon_fire 1

07DD: set_actor [email protected] attack_rate 100 // previously known as temper_to

0850: AS_actor [email protected] follow_actor $PLAYER_ACTOR

05E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR

04D8: set_actor [email protected] drowns_in_water 0

0619: enable_actor [email protected] collision_detection 1

:NOF

00E1:   player 0 pressed_key 14

wait 500
 
if

05BC: AS_actor [email protected] jump 1
078F: AS_actor [email protected] climb 1

jump @NOF

:NONAME_2

wait 0

if

0ADC: test_cheat "w"


jf @NONAME_2


wait 100

Actor.DestroyInstantly([email protected])

jump @NONAME_9
 

 

 

 

 

 

 

############

Look what happend: 

 

Climbing command is a problematic with an AI when anytime passes even twice but he'll always keep jumping more than 4 times. 

Even looking for a command with jump animation check and character in air will still jump more than twice aslo.

 

There is a number beside jump/climb setting to 0 do the same result as 1

 

Here another method add [email protected] as built in timer for use of cooldown and look for the animation jumping or find is character playing anims from cleo+ if u have install already.

 

That can prevent spam jumping more than twice.

 

 

Link to comment
Share on other sites

{$CLEO .cs}

script_name 'escalar' 

:IV_11
wait 0 
0000: NOP
if 
   Player.Defined($PLAYER_CHAR)
jf @IV_11 
jump @IV_62

:IV_62
wait 0 
04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 0.0 25.0 0.0
if
0AE1: [email protected] = random_actor_near_point  [email protected] [email protected] [email protected] in_radius 500.0 find_next 1 pass_deads 1 //IF and SET  
jf @IV_11
jump @testando

:testando
wait 0
if
056D:   actor [email protected] defined
jf @IV_11
080E: get_actor [email protected] ped_event_to [email protected] 
04C4: store_coords_to [email protected] [email protected] [email protected] from_actor [email protected] with_offset 0.0 0.0 0.5 
04C4: store_coords_to [email protected] [email protected] [email protected] from_actor [email protected] with_offset 0.0 0.5 0.5
if or
  0611:   actor [email protected] performing_animation "HIT_wall"
  [email protected] == 93
  [email protected] == 30 
  86BD:   not no_obstacles_between [email protected] [email protected] [email protected] and [email protected] [email protected] [email protected] solid 1 car 1 actor 0 object 1 particle 0 
jf @IV_11
jump @sss 

:sss
WAIT 0
if
056D:   actor [email protected] defined
jf @IV_11
if or
0611:   actor [email protected] performing_animation "CLIMB_Pull"
0611:   actor [email protected] performing_animation "CLIMB_Stand"
0611:   actor [email protected] performing_animation "CLIMB_idle"
0611:   actor [email protected] performing_animation "CLIMB_jump"  
0611:   actor [email protected] performing_animation "CLIMB_jump_B"      
jf @anim
jump @IV_11

:anim
wait 0
0638: AS_actor [email protected] stay_put 1
0792: disembark_instantly_actor [email protected]
//05B9: AS_actor [email protected] stay_idle 1000 ms
//wait 1000
078F: AS_actor [email protected] climb 1
//083C: set_actor [email protected] velocity_in_direction_XYZ 0.0 0.0 7.0
05E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR 
0638: AS_actor [email protected] stay_put 0
jump @IV_11

 

 

 

##############

 

I didn't make this script, it was this guy:

 

  • YEE 1
Link to comment
Share on other sites

22 hours ago, Oitavu said:

{$CLEO .cs}

script_name 'escalar' 

:IV_11
wait 0 
0000: NOP
if 
   Player.Defined($PLAYER_CHAR)
jf @IV_11 
jump @IV_62

:IV_62
wait 0 
04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 0.0 25.0 0.0
if
0AE1: [email protected] = random_actor_near_point  [email protected] [email protected] [email protected] in_radius 500.0 find_next 1 pass_deads 1 //IF and SET  
jf @IV_11
jump @testando

:testando
wait 0
if
056D:   actor [email protected] defined
jf @IV_11
080E: get_actor [email protected] ped_event_to [email protected] 
04C4: store_coords_to [email protected] [email protected] [email protected] from_actor [email protected] with_offset 0.0 0.0 0.5 
04C4: store_coords_to [email protected] [email protected] [email protected] from_actor [email protected] with_offset 0.0 0.5 0.5
if or
  0611:   actor [email protected] performing_animation "HIT_wall"
  [email protected] == 93
  [email protected] == 30 
  86BD:   not no_obstacles_between [email protected] [email protected] [email protected] and [email protected] [email protected] [email protected] solid 1 car 1 actor 0 object 1 particle 0 
jf @IV_11
jump @sss 

:sss
WAIT 0
if
056D:   actor [email protected] defined
jf @IV_11
if or
0611:   actor [email protected] performing_animation "CLIMB_Pull"
0611:   actor [email protected] performing_animation "CLIMB_Stand"
0611:   actor [email protected] performing_animation "CLIMB_idle"
0611:   actor [email protected] performing_animation "CLIMB_jump"  
0611:   actor [email protected] performing_animation "CLIMB_jump_B"      
jf @anim
jump @IV_11

:anim
wait 0
0638: AS_actor [email protected] stay_put 1
0792: disembark_instantly_actor [email protected]
//05B9: AS_actor [email protected] stay_idle 1000 ms
//wait 1000
078F: AS_actor [email protected] climb 1
//083C: set_actor [email protected] velocity_in_direction_XYZ 0.0 0.0 7.0
05E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR 
0638: AS_actor [email protected] stay_put 0
jump @IV_11

 

 

 

##############

 

I didn't make this script, it was this guy:

 

Oh thank you so much! 

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.