Page 3 of 3

Posted: Wed Dec 27, 2006 23:58
by wildweasel
Ideally, it should also use GetCvar to check if the default crosshair is already on, and if it is, disable the script.

Posted: Thu Dec 28, 2006 0:54
by Doomed Soul
Okay, how 'bout an example for the custom crosshair? I learn better that way, and I don't know ACS, but I can probably figure it out by example. It seems every one forgot about FlashAlpha :(.

Posted: Thu Dec 28, 2006 1:33
by TheDarkArchon
Use an alpha channeled PNG.

Posted: Thu Dec 28, 2006 1:43
by DoomRater
HUDMessage is such a PAINFUL ELEMENT! I'll give it a real crack though. (I'm SOOOO rusty...)

This goes into a "LOADACS" text lump:

Code: Select all

name_of_Global_ACS_entry
Keep in mind that it's only going to remember the first 8 letters of this name when it checks inside a WAD.

You can name this text lump entry anything you want, but it needs the following lines in it:

Code: Select all

#library "name_of_Global_ACS_entry"
#include "zcommon.acs"
the code example follows:

Code: Select all

script 1 (int weapontype) {
//define 9 usable crosshairs
  str XHairCodes[8];
//You'll need to define what the names of the crosshairs ARE before you can use them.
  If(getcvar("crosshair")!=0) {
    SetFont(XHairCodes[weapontype]);
    hudmessage ("A"; HUDMSG_PLAIN, 999, CR_RED, 0.0, 0.0, 0.0);
  }
}
To run this, your weapon calls ACS_ExecuteAlways with the appropriate parameters.

Oh, almost forgot to mention it calls this during the Select Frames! (The Wiki says to only have the gun raise, but it's practical to have anything you need to do to initialize your weapon there too.)