Ambrosia Garden Archive
    • Quick Question about Chärs, Gender, Shďps and Oütfs.


      Is G(Gxxx) possible?

      I'm trying to make a shďp resource that uses one graphic for a male and a different one for a female pilot. To that end, if I designed a sprite with extra frames, and set the ship to use that sprite's extra frames when its KeyCarried is aboard, and want the player to be granted the keycarried on starting a chär that uses that ship, but only if their pilot is female, will putting G(Gxxx) in the OnStart field of the chär work?

      And also, is there an easier way to accomplish different ships for different sexes right from the start?

      This post has been edited by Qaanol : 12 October 2005 - 12:29 PM

    • No, unfortunately, there is no way to put a test inside of a set expression (with one exception, but the easy answer first):

      Create either and invisible mission or a cron that does the following:

      If (HasShipX and Male and noPenis)

      Grant Penis

      This will work fine, maybe make it when you sell the ship, remove the outfit (regardless of gender. If they dont have it, nothing will happen).

      The other method is rather a bit fancier, less entertaining, and probably less usefull in the general case.

      This hinges around the fact that there IS indeed a way to have a set expression evaluate a 'test'. This hinges around the Axxx/Fxxx operators. IF mission xxx is active, abort it. So at the beginning of the game, start invisible missions XX and XY. In mission XX's onfail, put SXX, plus everything you want to have happen when the gender is evaluated (note all of these will happen every time you do this, regardless), and the same thing for XY. So, every time you want to evaluate the pilots gender, put FXX FXY. The missions will reactivate themselves and also do whatever is in the onfail field (or onaccept).

      Note that the missions should be invisible and should also have the CanAbort flag set. If they do not have the latter, then the failed mission will remain (and it would have a bullet in front of it if it werent invisible, and show the failtext when you reach the destination, but there shouldnt be one, or the player will 'accieve' his/her gender.)

      Anyway. The first method will work for you. The second is a special case if you need something to happen midflight. There are ways to set up more than one of each in such a way that you dont have everything happen at once, but this is really a very advanced discussion that Im fairly sure no plugin will ever take advantage of.

    • Ooh, chromosome mďsns, I like!

      As for the "GrantPenis" idea, maybe I just have to try it out some, but will the mission or chronological event work on the very first day a new pilot is loaded, and if so, what must be set up to allow that to happen?

    • Hmm. The very first day is kind of tricky, as far as I know, chars and gender are completely independant, and you can always be either gender of every char. Hmm, actually, its easy, it just involves wasting a misn and a cron. In the field of the char rescource where you put those opening bits (i forget what its called), start a mission that autoaborts and has a datepostinc of 1. Then have a cron with the above tests. Im pretty sure that all that will happen is a single frame of the one ship immediately replaced by the other.

    • Awesome, thanks. 🆒