PDA

View Full Version : Invisibilty types?


Malxados
03-12-2009, 08:34 PM
I was looking through the script functions, and I saw this one:
// 457: Create an Invisibility effect.
// - nInvisibilityType: INVISIBILITY_TYPE_*
// * Returns an effect of type EFFECT_TYPE_INVALIDEFFECT if nInvisibilityType
// is invalid.

effect EffectInvisibility(int nInvisibilityType);
I was wondering if anyone knew the "INVISILITY_TYPE_" 's, and how I would assign that to the PC.

Thanks,
Malxados

Mandalore_The_Great
03-13-2009, 01:26 AM
Did you find this in KT? Otherwise, it might be from Neverwinter Nights. And I don't remember a invisibility.2da (correct me if I'm wrong)

glovemaster
03-13-2009, 10:53 AM
I'm pretty sure it's from NWN but it might work in KotOR if they left it in there. I think it has probably got an effect on the distance that enemies perceive you rather than a visual effect. Its possiblity how the stealth system works - I haven't ever looked into it though.

Oh and the types are:
int INVISIBILITY_TYPE_NORMAL = 1;
int INVISIBILITY_TYPE_DARKNESS = 2;
int INVISIBILITY_TYPE_IMPROVED = 4;

Adn you can apply that to the PC with a script like so:
void main() {
effect eInvis = EffectInvisibility(INVISIBILITY_TYPE_NORMAL);
float fDur = 10.0; // 10 seconds - just change this to how long.

ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eInvis, GetFirstPC(), fDur);
}

Malxados
03-13-2009, 12:33 PM
Thanks.
Ya, I found it in Kotor Tool's text editor script functions for TSL.

stoffe
03-13-2009, 12:35 PM
I'm pretty sure it's from NWN but it might work in KotOR if they left it in there. I think it has probably got an effect on the distance that enemies perceive you rather than a visual effect.

INVISIBILITY_TYPE_NORMAL means you are invisible but the invisibility will drop as soon as the affected character attack or use an offensive force power, while INVISIBILITY_TYPE_IMPROVED will last for the specified duration no matter what action the character takes.

Note that this effect will not render the character invisible visually to the player or change their appearance, it will just prevent NPCs/AI controlled characters from detecting and targeting you.

Use this with care since this effect isn't used for anything in the KOTOR games (NWN legacy) and as such the general AI does not take it into account and do anything to try to counter it. If used in combat enemy NPCs will just stand around twiddling their thumbs allowing you to kill them.