RemoveEffect fails or what...
#1
Posté 17 septembre 2010 - 06:41
Looks like i'm run into a bug again, and i'm just curious anyone encountered this too.
It's about removing visualeffects.
I have a secret door system, which works this way: if someone founds a lever and pulls, that removes the VFX_DUR_CUTSCENE_INVISIBILITY visualeffect from the secret-door placeable object. The log says the script founds the effect, and RemoveEffect takes place too. But, sometimes the placeable secret-door does not appear. Even stranger, for someone it appears, for someone not (both player standing beside the door). This means the effect is removed, but in an unknown circumstances, for some players it still appears invisible.
Any idea?
thx
#2
Posté 17 septembre 2010 - 08:28
#3
Posté 17 septembre 2010 - 10:32
Now i'm trying to link the visualeffect to other, non-visual effect, and remove the latter. Delaying it. Assign it to the area. Everything. I hope that will work.
#4
Posté 18 septembre 2010 - 12:20
Why not just create/destroy the door instead of placing it in the toolset then making it invisible?
-420
#5
Posté 18 septembre 2010 - 01:22
Modifié par ShaDoOoW, 18 septembre 2010 - 01:23 .
#6
Posté 18 septembre 2010 - 01:40
#7
Posté 18 septembre 2010 - 11:18
Think about it; plot will change nothing, also doors must be usable to they aren't staticBuilder_Anthony wrote...
Long shot for a solution but maybe try checking static or unchecking it.Try plot as well.
#8
Posté 18 septembre 2010 - 02:29
420 wrote...
Why not just create/destroy the door instead of placing it in the toolset then making it invisible?
-420
Coz i have to make a blueprint for every appearance i use for secret doors. I'm using fissures, trapdoors, walldoors of every kind... makes me mad that i cannot copy placeables. Cannot change appearances on th fly (nwnx can, but pc must reenter area....).
Delay and assign cannot work, removeeffect fails randomly. Now i'm trying this: when i want to remove the invis effect, i reapply it with a linked effect (invis+temp hitpoints), AND remove that. Same visualeffects are stacks, so the removeeffect loop removes only one effect. Now testing this.
#9
Posté 18 septembre 2010 - 02:44
#10
Posté 18 septembre 2010 - 04:37
Players says relog helps.
What do you mean, fire the perception event? PC's don't have that.
#11
Posté 19 septembre 2010 - 01:33
Modifié par Builder_Anthony, 19 septembre 2010 - 01:38 .
#12
Posté 19 septembre 2010 - 02:36
P.S. And if you can not find a solution for this, you could still do what 420 suggested and still only need one script. You could change the tag of the lever to match whatever object's res ref you want created. Then where you need res ref just use GetTag(OBJECT_SELF); . You could do this if you want to use waypoints to put the placeables as well. When it calls for location you could do GetLocation(GetWaypointByTag(GetTag(OBJECT_SELF))); etc..
Hope it helps.
Modifié par GhostOfGod, 19 septembre 2010 - 02:57 .
#13
Posté 19 septembre 2010 - 03:39
Ravine_HU wrote...
What HB? Module-heartbeat? No, door not appear.
Players says relog helps.
What do you mean, fire the perception event? PC's don't have that.
Sorry, I meant fire the HB event. Actually, PCs do have a Perception Event - check your PC's bic (it'll be named "default").
#14
Posté 19 septembre 2010 - 06:05
Replace: RemoveEffect(oPC,eEffect);
With:RemoveSpecificEffect(EFFECT_TYPE_BLINDNESS, oPC);
and include #include "nw_i0_spells"
#15
Posté 20 septembre 2010 - 10:17
The effect remover script is very simple:
effect eLoop=GetFirstEffect(oSD);
while (GetIsEffectValid(eLoop)){
//if (GetEffectType(eLoop)==EFFECT_TYPE_VISUALEFFECT){
SSDB("secret effect removed");
RemoveEffect(oSD, eLoop);
//}
eLoop=GetNextEffect(oSD);
}
The effect creator is the area itself (the creation of (reapplied) effect is assigned to the area). The effect is removed as the log says.
@Pstemarie: yep i aware of the 'default' thing, but why should i fire the HB event? And how? With SignalEvent? To a non-existent script?
@Knight_Shield: that function is just a wrapper to RemoveEffect, i did the same as you see.
So, still no idea what can cause this. I made an area with 10 hidden door in it with levers. And all working, i tried 5 times in a row. But looks like it mostly happens, when the server is up for more time. Still the same, some ppl can see the appearing door, some cannot. When the non-seeing PC reconnects, the door is there, now he can see it...
Modifié par Ravine_HU, 20 septembre 2010 - 10:21 .
#16
Posté 20 septembre 2010 - 10:23
Modifié par Ravine_HU, 20 septembre 2010 - 10:26 .
#17
Posté 21 septembre 2010 - 06:39
#18
Posté 21 septembre 2010 - 07:32
Modifié par Ravine_HU, 21 septembre 2010 - 07:47 .
#19
Posté 21 septembre 2010 - 10:06
To test for the client just not drawing the model. Give the door a glow effect after removing all the effects on it. If the player can see the glow but can not see the door, the problem is on the client side. I am thinking it is the same Known bug with NPC that spawn in-stealth and never get there modles drawn on some clients. The Log in and out works to fix that one also.
Modifié par Lightfoot8, 21 septembre 2010 - 10:18 .
#20
Posté 22 septembre 2010 - 01:15
Well, i'm gonna try the glow, however i'm almost sure that won't be visible. The door is usable, so when i press TAB, that should glow anyway. But it's not.
And no, sometimes it happens to me too, sometimes not (same character).





Retour en haut






