Looking for a script or guidance.
#1
Posté 30 août 2013 - 08:46
#2
Posté 30 août 2013 - 09:45
If that doesn't suit, let me know, and I'll post code for dm_invis as an item instead of a chat command.
Funky
Modifié par FunkySwerve, 30 août 2013 - 09:52 .
#3
Posté 31 août 2013 - 02:15
Basically, I just need a simple script to add to their wand that causes them to go dm_invis and can be used again to make them reappear.
#4
Posté 31 août 2013 - 02:49
Funky
#5
Posté 31 août 2013 - 03:30
#6
Posté 31 août 2013 - 03:11
#7
Posté 31 août 2013 - 07:19
FunkySwerve wrote...
You can't use items while poly'd, at least in vanilla (sans nwscript). You're right, that system is ludicrous, if that's the only reason it's done that way, which I kind of doubt (but I've seen sillier things). I could make you a potion that'd do that, but you'd be much better served by an item that made them cutscene invis and ghosted, I think - like the wand you're talking about. Are you using tag-based scripting?
Funky
Basically, I created the wand through the toolset first then wrote the conversation script. Then, I attached the script by using the module script for OnActivateItem which checks for the Item tag and then loads the appropriate conversation script. Then I wrote the scripting for each of the item options in the wand.
- Arm
Modifié par Rio420, 31 août 2013 - 07:20 .
#8
Posté 01 septembre 2013 - 06:32
#include "x2_inc_switches"
void DoDMInvis(object oPC)
{
effect eEffect = EffectCutsceneGhost();
effect eEffect2 = EffectVisualEffect(VFX_DUR_CUTSCENE_INVISIBILITY);
effect eLink = SupernaturalEffect(EffectLinkEffects(eEffect, eEffect2));
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eLink, oPC);
}
void main() {
object oPC, oItem, oMod;
SetExecutedScriptReturnValue(X2_EXECUTE_SCRIPT_END);
if (GetUserDefinedItemEventNumber() != X2_ITEM_EVENT_ACTIVATE)
return;
oPC = GetItemActivator();
oItem = GetItemActivated();
oMod = GetModule();
effect eEffect = GetFirstEffect(oPC);
int nAlreadyInvis = FALSE;
while (GetIsEffectValid(eEffect)) {
if (GetEffectCreator(eEffect) == oMod) {
DelayCommand(0.1, RemoveEffect(oPC, eEffect));
nAlreadyInvis = TRUE;
}
eEffect = GetNextEffect(oPC);
}
if (!nAlreadyInvis)
AssignCommand(oMod, DoDMInvis(oPC));
}
Funky
Modifié par FunkySwerve, 01 septembre 2013 - 06:33 .
#9
Posté 01 septembre 2013 - 06:37
Funky
#10
Posté 01 septembre 2013 - 07:01
Combined with nwnx_func's visibility functions, you can set it up so that when a certain player/subrace/group member toggles stealth, it actually applies a level of stealth that is effectively the same as DM Stealth.
No amount of Perception or True Seeing can penetrate it.
Although - monsters still see through it, but you can remedy that with the addition of Sanctuary at the same time.
Then the toggle mode can be used to remove both effects.
#11
Posté 01 septembre 2013 - 10:32
#12
Posté 02 septembre 2013 - 01:34
Baaleos wrote...
If you have nwnx - I'd recommend using nwnx_cool - for its toggle/mode detection.
Combined with nwnx_func's visibility functions, you can set it up so that when a certain player/subrace/group member toggles stealth, it actually applies a level of stealth that is effectively the same as DM Stealth.
No amount of Perception or True Seeing can penetrate it.
Although - monsters still see through it, but you can remedy that with the addition of Sanctuary at the same time.
Then the toggle mode can be used to remove both effects.
That sounds identical to what mine does, absent client 2da edits. Can you elaborate on the difference? Neither perception nor true seeing can pierce cutscene.
Funky





Retour en haut







