Author Topic: RemoveEffect fails or what...  (Read 701 times)

Legacy_Ravine_HU

  • Newbie
  • *
  • Posts: 20
  • Karma: +0/-0
RemoveEffect fails or what...
« on: September 17, 2010, 07:41:30 pm »


               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
               
               

               
            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
RemoveEffect fails or what...
« Reply #1 on: September 17, 2010, 09:28:53 pm »


               Just a guess,  have you tryed a RecomputeStaticLighting in the area.
               
               

               
            

Legacy_Ravine_HU

  • Newbie
  • *
  • Posts: 20
  • Karma: +0/-0
RemoveEffect fails or what...
« Reply #2 on: September 17, 2010, 11:32:01 pm »


               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.
               
               

               
            

Legacy_420

  • Sr. Member
  • ****
  • Posts: 370
  • Karma: +0/-0
RemoveEffect fails or what...
« Reply #3 on: September 18, 2010, 01:20:32 am »


               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
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
RemoveEffect fails or what...
« Reply #4 on: September 18, 2010, 02:22:49 am »


               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 .
                     
                  


            

Legacy_Builder_Anthony

  • Hero Member
  • *****
  • Posts: 786
  • Karma: +0/-0
RemoveEffect fails or what...
« Reply #5 on: September 18, 2010, 02:40:40 am »


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

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
RemoveEffect fails or what...
« Reply #6 on: September 18, 2010, 12:18:29 pm »


               

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 '<img'>
               
               

               
            

Legacy_Ravine_HU

  • Newbie
  • *
  • Posts: 20
  • Karma: +0/-0
RemoveEffect fails or what...
« Reply #7 on: September 18, 2010, 03:29:49 pm »


               

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.
               
               

               
            

Legacy_Pstemarie

  • Hero Member
  • *****
  • Posts: 4368
  • Karma: +0/-0
RemoveEffect fails or what...
« Reply #8 on: September 18, 2010, 03:44:21 pm »


               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.
               
               

               
            

Legacy_Ravine_HU

  • Newbie
  • *
  • Posts: 20
  • Karma: +0/-0
RemoveEffect fails or what...
« Reply #9 on: September 18, 2010, 05:37:54 pm »


               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.
               
               

               
            

Legacy_Builder_Anthony

  • Hero Member
  • *****
  • Posts: 786
  • Karma: +0/-0
RemoveEffect fails or what...
« Reply #10 on: September 19, 2010, 02:33:10 am »


               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 .
                     
                  


            

Legacy_GhostOfGod

  • Hero Member
  • *****
  • Posts: 1490
  • Karma: +0/-0
RemoveEffect fails or what...
« Reply #11 on: September 19, 2010, 03:36:40 am »


               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 .
                     
                  


            

Legacy_Pstemarie

  • Hero Member
  • *****
  • Posts: 4368
  • Karma: +0/-0
RemoveEffect fails or what...
« Reply #12 on: September 19, 2010, 04:39:32 pm »


               

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

               
            

Legacy_Knight_Shield

  • Hero Member
  • *****
  • Posts: 812
  • Karma: +0/-0
RemoveEffect fails or what...
« Reply #13 on: September 19, 2010, 07:05:21 pm »


               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"



               
               

               
            

Legacy_Ravine_HU

  • Newbie
  • *
  • Posts: 20
  • Karma: +0/-0
RemoveEffect fails or what...
« Reply #14 on: September 20, 2010, 11:17:34 am »


               This mechanism is still erratic
'<img'> 

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 .