'Lo again peeps. So I'm having all kinds of fun with the new stuff in FREDO, but something is still beating my brain.
I'm trying to use the player_use_ai function to bodge an automatic landing for Alpha 1. Now, a simple press-a-key-and-you-land kind of scenario seems to work just fine. But I'm trying to build in an option for the player to disengage the AI and retake control... just in case he/she feels they want to fly around a bit longer admiring their handiwork, or whatever.
My initial attempt was to have one SEXP adding the use-ai command when a key was pressed, with a repeat count of 999, and another with the not-use-ai version, again repeating... in tests, this simply makes my fighter do cartwheels when I use the disengage bit.
I think repeats are not my friend here. I've just discovered the new bits like every-time and such, but not convinced they're right for me. What I really want is a toggle-type feature, where you can flip a switch on and off. Is there any way to call up the last key pressed? Or any hackey simulation of that?
Strangely, despite the huge demand for this kind of auto-landing back in the day, there doesn't seem to be a thread on this subject...
DG