Aller au contenu

Photo

RemoveEffect fails or what...


  • Veuillez vous connecter pour répondre
19 réponses à ce sujet

#1
Ravine_HU

Ravine_HU
  • Members
  • 10 messages
Hello!

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
Lightfoot8

Lightfoot8
  • Members
  • 2 535 messages
Just a guess, have you tryed a RecomputeStaticLighting in the area.

#3
Ravine_HU

Ravine_HU
  • Members
  • 10 messages
Nope, and i hope i don't have to. That function makes lag-spikes IIRC.

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
420

420
  • Members
  • 190 messages
I believe there has always been a problem with removing certain invisibility visual effects.



Why not just create/destroy the door instead of placing it in the toolset then making it invisible?



-420

#5
Shadooow

Shadooow
  • Members
  • 4 470 messages
Because its cleaner and better solution. I like it, hope you find the solution. Can't suggest you anything else than you are about to try though.

Modifié par ShaDoOoW, 18 septembre 2010 - 01:23 .


#6
Builder_Anthony

Builder_Anthony
  • Members
  • 450 messages
Long shot for a solution but maybe try checking static or unchecking it.Try plot as well.

#7
Shadooow

Shadooow
  • Members
  • 4 470 messages

Builder_Anthony wrote...

Long shot for a solution but maybe try checking static or unchecking it.Try plot as well.

Think about it; plot will change nothing, also doors must be usable to they aren't static ;)

#8
Ravine_HU

Ravine_HU
  • Members
  • 10 messages

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
Pstemarie

Pstemarie
  • Members
  • 2 745 messages
What you describe with the one PC Seeing/One Not might be a perception/timing issue on the part of the creature seeing it. Does the door appear to the other PC (the one who can't see it) when the next HB event fires? If so you might have to force the perception event to fire on all creatures within perception range of your door.

#10
Ravine_HU

Ravine_HU
  • Members
  • 10 messages
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.

#11
Builder_Anthony

Builder_Anthony
  • Members
  • 450 messages
Another long shot here and i never tried this but maybe spawn in a invsable wall in front of your secert door to hide the secert door.Im not sure if it will block out your entrance since ive never tried to use it to hide a object.If that doesnt work theres vines that can be rotated 180 and theres very little detail on the back of the vines model.......maybe use that to hide them.Both are off the wall ideas....i dont really know what to tell you to do,And if that doesnt work maybe just alter the z axzis bringing the objecgt out of the ground.

Modifié par Builder_Anthony, 19 septembre 2010 - 01:38 .


#12
GhostOfGod

GhostOfGod
  • Members
  • 863 messages
Just out of curiosity...could you post the script that is supposed to remove the effect? Just want to see if you are looping through effects and/or how you are checking them. And also..how/when is the effect created? Who/what is the creator? From how you explained it, this probably is not the problem but it wouldn't hurt to take a look.

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
Pstemarie

Pstemarie
  • Members
  • 2 745 messages

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
Knight_Shield

Knight_Shield
  • Members
  • 444 messages
First I would say post the script so one of these pro's can look at it .Im not good with scripts but I do know my rest script wouldnt remove an effect properly until I wrote this line .Needed these lines to remove them from oPC maybe need something like that for yuor placable *shrug*



Replace: RemoveEffect(oPC,eEffect);







With:RemoveSpecificEffect(EFFECT_TYPE_BLINDNESS, oPC);







and include #include "nw_i0_spells"




#15
Ravine_HU

Ravine_HU
  • Members
  • 10 messages
This mechanism is still erratic
:( 

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
Ravine_HU

Ravine_HU
  • Members
  • 10 messages
Social network... my arse! Where is the nwscript -tag? Omg i hate this. The old forum was so nice.

Modifié par Ravine_HU, 20 septembre 2010 - 10:26 .


#17
Mudeye

Mudeye
  • Members
  • 126 messages
Are you: (1) using a regular door and making it invisible with an effect or (2) using one of the hidden doors in the tool set?

#18
Ravine_HU

Ravine_HU
  • Members
  • 10 messages
Hidden doors, and fissures (mostly from CEP). Placeables, with animation. Applying visualeffect: VFX_DUR_CUTSCENE_INVISIBILITY

Modifié par Ravine_HU, 21 septembre 2010 - 07:47 .


#19
Lightfoot8

Lightfoot8
  • Members
  • 2 535 messages
Is it always the same people, having the problem of not being able to see the door? It may be more of a client side bug.

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
Ravine_HU

Ravine_HU
  • Members
  • 10 messages
Yeah, i bet this is a client-side bug.

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).