2 Feature Ideas

Moderator: Graf Zahl

User avatar
wildweasel
DRD Team Admin (Inactive)
Posts: 2132
Joined: Wed Jun 29, 2005 22:00
Location: the Admincave!
Contact:

Post by wildweasel »

Ideally, it should also use GetCvar to check if the default crosshair is already on, and if it is, disable the script.
User avatar
Doomed Soul
Posts: 203
Joined: Sun Apr 30, 2006 16:54
Location: In front of my monitor working on Hell Opps.
Contact:

Post 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 :(.
User avatar
TheDarkArchon
Posts: 1000
Joined: Wed Jul 06, 2005 11:58
Location: What's that fucking smell
Contact:

Post by TheDarkArchon »

Use an alpha channeled PNG.
User avatar
DoomRater
Posts: 397
Joined: Tue Jul 19, 2005 4:14
Location: Programmer's Room, talking to Will Harvey
Contact:

Post 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.)
Locked

Return to “Closed Feature Suggestions”