| StaticEffect | ||
|---|---|---|
| Prototype | void StaticEffect( short Effect, UCHAR speed, UCHAR loop ); //Chars | |
| Purpose | Does a static effect for a char (first prototype) or for an item (second prototype). If you want a hued static effect, try using DoMovingEffect instead, but with both source and target set to same object | |
| Example of Usage | srcChar.StaticEffect( 0x376A, 9, 0 ); | |
| DoMovingEffect | ||
|---|---|---|
| Prototype | DoMovingEffect( srcObject, trgObject, effect, speed, loop, explode, [hue], [renderMode] ); | |
| Purpose | Does a moving effect (eg fireball) from srcObject to trgObject, or srcObject to targ location effect is the ID of the moving effect explode == 0 no explosion explode == 1 explodes hue = the colour of the effect rendermode = how to render the effect. Available options: 0 - normal, 1 - transparent, 2 - additive, 3 - dark colors transparent, 4 - bright colors transparent, 5 - semi transparent, 6 - subtractive/negative colors, 7 - inverted colors? hue and renderMode are OPTIONAL, none, one or both can be left out, but if setting renderMode, hue MUST be specified. Hue for effects also seems to be offset by 1 compared to hues for items; if you have a staff with hue 0x0480 and you want an effect with same hue, try 0x047f for the effect (in some cases combined with a different renderMode - like 0xa for 0x047f) | |
| Example of Usage |
function onUseChecked( pUser, iUsed )
{
DoMovingEffect( pUser, pUser, 0x36D5, 0x07, 0x00, true, 0x1EC );
}
| |
| DoTempEffect | ||
|---|---|---|
| Prototype | DoTempEffect( iType, src, trg, targNum, more1, more2, more3, [itemPtr] ); | |
| Purpose | Does a temporary effect (things like protection, night sight, and what not) frm src to trg. If iType = 0, then it's a character, otherwise it's an item. | |
| Example of Usage | DoTempEffect( 0, pTalking, pTalkingTo, 3, GetSkill( pTalking, 0 ) / 100, 0, 0 ); | |
| SoundEffect | ||
|---|---|---|
| Prototype | void SoundEffect( soundID, bAllHear ); | |
| Purpose | Plays a sound effect. SoundID is the full ID of the sound to play. If bAllHear is TRUE, then everyone nearby hears it. If it's false, then only the object it plays for will hear it.. | |
| Example of Usage | myChar.SoundEffect( 568, FALSE ); | |