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

Opcode for actor in focus/aimed?


perkin
 Share

Recommended Posts

Is there any opcode like in VC identfiy a random car in a selected area, but this time gets a random actor in a selected area, or the actor aimed by CJ?

 

I'm trying to make a bodyguard mod so that when I use CJ to aim at certain character and press Y, my bodyguard will hunt them down.

 

But the opcode list from Barton's MB 0.33 got too many unknown, and seems no mission or parts of the game I play had similar functions I can try to find it out from scatch code.

 

Anybody?

Edited by perkin
Link to comment
Share on other sites

random_download

Well in Vice City there was 0457: is_player_aiming_at_actor $player_char, $actor, and even if that did work in SA which I'm not sure about you would need to get a random ped in area

Link to comment
Share on other sites

Really thankq though,

 

well I knew there was a get_random_car_in_area opcode for VC, so we can make the bodyguard to blast out the car in front of tommy in that sense, but I still gotta find that opcode for SA too. and if there is a get_random_ped_in_area in SA will be super, or get_actor_aimed_by_player.

 

other than all this, I just found out that one of the girlfriend is shooting the wall in the county, and I'm trying to find out what opcode commanded her to do that, coz if there's a opcode commanding actor to shoot in co-ordinates or just an object will be great, coz we can create an invisible object and ask the bodyguard to shoot at it, and we can move that object anywhere we want. (ie offset it with the player's position) then a loop keep offset a longer and longer distance with the player.

Link to comment
Share on other sites

In VC you could use

058F: unknown create distribution actor $id at x1 y1 x2 y2 flag  1  0  1

to get an handle of a random ped in a square area defined by x1,y1 x2,y2. The handle will be returned in $id, which should be initilized with -1 before this call.

 

If a random ped is in the area, the handle will be returned, is there is none, the $id will still contain -1. If there are multiple peds, it will take one at random (as far as we know)

 

Sadly the opcode is not used in SA, but it might still be supported, although I doubt it.

 

 

bS8xA.png
Link to comment
Share on other sites

Oh cool, thanks Patrick. At least there's hope now...

 

or maybe I can add the function to Mard's or Spinne's Bodyguard mod in VC,

but that will be after I setup my own server, I just got it up and running.

 

SA's engine is way smoother, VC's mod offen crash for some reasons. Can't wait to find out the opcode for SA.

Link to comment
Share on other sites

as far as i know, the aiming at actor opcode in VC was only used in the shop robbery thing, which isn't in SA, so not sure. but since in SA the actor you're aiming at can be determined by simply looking at which ped you've locked on with rmb, so i think there might be an opcode for it.

i think if you aim at your girlfriend for a few seconds while you're on a date you fail (not sure). if it's so, i guess the date script needs something like that.

 

but until i checked this part of the forum i didn't even know SA's main.scm can be decompiled already, so i'm gonna disappear for some time now. smile.gif

Link to comment
Share on other sites

Oh the pc version of SA is decomilable through Barton's SA MBuilder v0.33 for PS with two more lines added to the SASCM.INI

 

I just checked the give and take mod released

http://www.gtaforums.com/index.php?showtopic=198860

 

seems the random peds, ganges, gfriends.. etc were in different groups which we can define each of them, but there seems to be so many peds to define in order to find just one of them CJ will target/aim at. But again I will keep searching and waiting when the puzzle reveals itselfs. Thankq thankq.

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.