arminc Posted June 21, 2018 Share Posted June 21, 2018 Hi! So I got this plugin where the cam block behind the heli, but I want to make it active only after I press the bind (and I want it like a toggle not just when I press) Code: 0000: NOP :Noname_2 wait 0 if and 04A9: actor $PLAYER_ACTOR driving_heli 8AB0: not key_pressed 67 else_jump @Noname_2 Camera.SetBehindPlayer jump @Noname_2 * I tried more methods (about 2-3) but every time when I press the game crashed or it crashed at loading.. Link to comment Share on other sites More sharing options...
spaceeinstein Posted June 30, 2018 Share Posted June 30, 2018 (edited) Have a variable that you can use to help with the toggle. Somewhat like this: [email protected] = 0 // a variable that represents your toggle, initialized to off while if in_heli wait 0 if key_pressed then if not key_pressed // let go the key to trigger the toggle then if [email protected] == 0 // check if toggle is off then [email protected] = 1 // set toggle on else [email protected] = 0 // otherwise set toggle off end end end if [email protected] == 1 // check for the toggle then set_camera end end Edited June 30, 2018 by spaceeinstein 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