Carnage_C Posted May 23, 2008 Share Posted May 23, 2008 Any chance someone could show me some usefull opcodes for this ? I want to be able to look at a ped/object and press say F5 and the ped/object will freeze in it's position (if it was moving) and I gain control over it, anywhere I look from then on the ped/object will move to that position (maybe I could use a weapon for this with the target ?). Most of the code I have pretty much figured out in my head apart from the actuall selecting which ped/object I'd grab so this is where I mostly need help. Any commented code would be great ! If you have played gMod then I'm talking about something like the physics gun. Link to comment Share on other sites More sharing options...
Doomed_Space_Marine Posted May 23, 2008 Share Posted May 23, 2008 It's very easy to find which ped you're aiming at. Sanny builder code (I didn't test this): for [email protected] = 100 to 30000if056D: actor [email protected] defined then if 0457: player $PLAYER_CHAR aiming_at_actor [email protected] then //code [email protected] = 30000 end endend If [email protected] = 30000 makes the loop end, then the code should work fine. And this way to find the actor you're aiming at may slow down the game if you use it every frame. But when I use it every 500 ms, it works without any slow down. 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