Matheus Reis Posted August 6, 2010 Share Posted August 6, 2010 Hi, I was trying to create a new version to my mod, but in that, the player could customize the vision ingame, like this. {$VERSION 3.1.0027}{$CLEO .cs}//-------------MAIN---------------thread 'FreeCam' 067C: put_camera_on_actor $PLAYER_ACTOR with_offset [email protected] [email protected] [email protected] rotation 0.0 180.0 0.0 0.0 2:Beginwait 000D6: if 00E1: player 0 pressed_key 104 // 8 of NumPad004D: jump_if_false @Begin000B: [email protected] += 1 wait 1 ms067C: put_camera_on_actor $PLAYER_ACTOR with_offset [email protected] [email protected] [email protected] rotation 0.0 180.0 0.0 0.0 20002: jump @Begin I want to, when the player press 8 the variable [email protected] increase by 1 and then, the camera go forward but, this is not working, what's is my wrong? Link to comment Share on other sites More sharing options...
yair1221 Posted August 7, 2010 Share Posted August 7, 2010 the [email protected] [email protected] [email protected] are not defined Link to comment Share on other sites More sharing options...
Matheus Reis Posted August 7, 2010 Author Share Posted August 7, 2010 How can I do it? Link to comment Share on other sites More sharing options...
Adler Posted August 7, 2010 Share Posted August 7, 2010 (edited) This: 00E1: player 0 pressed_key 104 // Wrong opcode should be this: 0AB0: key_pressed 104 // 8 of NumPad wait 1 ms Excessive waits aren't necessary. 000B: [email protected] += 1 This should be a float opcode instead since we're messing with coords. Here's a working one : {$CLEO .cs}thread 'FreeCam':Beginwait 100if 0AB0: key_pressed 104 // 8 of NumPadjf @Begin068D: get_camera_position_to [email protected] [email protected] [email protected]: get_camera_target_point_to [email protected] [email protected] [email protected]@ += [email protected] += 1.0015F: set_camera_position [email protected] [email protected] [email protected] rotation 0.0 0.0 0.00160: set_camera_point_at [email protected] [email protected] [email protected] mode 2jump @Begin Well actually it just moves the camera forward along the Y axis but that's the best I got hehe. Edited August 7, 2010 by Adler Link to comment Share on other sites More sharing options...
Matheus Reis Posted August 8, 2010 Author Share Posted August 8, 2010 (edited) No, I don't want a free cam, I want the camera to follow the player, but you can move the camera using the mouse (Like in FPS), or pressing a button, but only changing the offset, in this case. But anyway, thanks for the help! Edited August 8, 2010 by Matheus Reis Link to comment Share on other sites More sharing options...
Adler Posted August 9, 2010 Share Posted August 9, 2010 (edited) Ops never mind. Edited August 9, 2010 by Adler 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