perkin Posted June 18, 2005 Share Posted June 18, 2005 (edited) 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 June 18, 2005 by perkin Link to comment Share on other sites More sharing options...
random_download Posted June 19, 2005 Share Posted June 19, 2005 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 More sharing options...
perkin Posted June 20, 2005 Author Share Posted June 20, 2005 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 More sharing options...
PatrickW Posted June 20, 2005 Share Posted June 20, 2005 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. Link to comment Share on other sites More sharing options...
perkin Posted June 21, 2005 Author Share Posted June 21, 2005 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 More sharing options...
GodGell Posted June 22, 2005 Share Posted June 22, 2005 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. Link to comment Share on other sites More sharing options...
perkin Posted June 24, 2005 Author Share Posted June 24, 2005 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now