Baaleos
Joined: 02 Sep 2007 Posts: 830
|
Posted: Wed Jun 20, 2012 18:14 Post subject: ApplyVFXForPC() working with Duration type effects? |
|
|
I just had an idea, of how to get Duration type effects working in such a way that only one player can see the effect, and another cannot.
Code: |
// Sets the visibility of oObject for everybody
void NWNXFuncs_SetVisibilityOverride(object oObject, int nVisibilityType);
// Sets whether oObject2 can see oObject1
void NWNXFuncs_SetVisibility(object oObject1, object oObject2, int nVisibility);
|
Spawn a placeable (invisible object) at location x
Set Visibility Override for that object so no one can see it
Set the Visibility using the second method, so oPC Can see the invisible object
Apply any Duration type VFX to the object, and because oPC is the only one who can see the object, it should allow him and only him to see the visual effect.
Granted - Glows etc, wont work - well, they will, but it looks like a glowing patch of ground.
But premonition type effects would appear and fade away naturally.
A wrapper function can also be setup to destroy the object at the end of the duration too.
Just posting this incase someone needed to try it. |
|