Author Topic: Disable "Take 20"??  (Read 412 times)

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Disable "Take 20"??
« Reply #15 on: February 08, 2014, 08:10:12 pm »


               Belushi, if you are willing to use heartbeats, why not use heartbeat on a given area?

Then loop players inside it via

GetFirstPC/GetNextPC and checking if GetArea(oPC) == OBJECT_SELF

alternatively I'll check my module and post my pseudo-heartbeat solution
               
               

               
            

Legacy_Belushi1965

  • Newbie
  • *
  • Posts: 16
  • Karma: +0/-0
Disable "Take 20"??
« Reply #16 on: February 09, 2014, 03:15:54 pm »


               

MrZork wrote...

First, I should just say that I actually didn't think that there was a Take 20 for trap detection. That doesn't mean that there isn't one, because I certainly learn new things all the time. But, the wiki[/iurl] doesn't mention it. You might want to do some more testing to make sure that this is really a problem that you need to solve.


Hm... strange. I can't find the source where I read about that, but I see the wikia denies it. However, I played around with my little testmodule a lot, and it seems to be much harder to find traps using my setup than before. It takes much longer, and sometimes only 2 of the 4 traps are detected. Without the script, the PC detects 3 of them more or less quickly - and sometimes from quite some distance. The 4th trap is out of reach for my character anyhow.
So, I guess there is some kind of penalty when in combat, but I'm not shure which one. Range, may be?

The approach of using triggers seems workable. But, if you intend to have whole areas (maps) be inhibitive of Take 20s, then it seems like your earlier approach of checking the area names (or checking a variable set for each area) may be an easier approach than drawing a bunch of large triggers.


You are right, but it gives me better control of the things; that's worth the work. ;)

You didn't post the code that was not working for that approach, but I wonder if perhaps you weren't passing the right parameter to GetArea?


I got GetArea to work, it was GetMyArea that did nothing at all. You are right again, the way you described it was the solution for GetArea. However, both are no longer needed for the script to work. All that is required is the event that a PC entered or exited an area.
               
               

               


                     Modifié par Belushi1965, 09 février 2014 - 03:53 .
                     
                  


            

Legacy_Belushi1965

  • Newbie
  • *
  • Posts: 16
  • Karma: +0/-0
Disable "Take 20"??
« Reply #17 on: February 09, 2014, 03:49:28 pm »


               

ShaDoOoW wrote...

Belushi, if you are willing to use heartbeats, why not use heartbeat on a given area?
Then loop players inside it via
GetFirstPC/GetNextPC and checking if GetArea(oPC) == OBJECT_SELF


Hello ShaDoOoW,  the reason for that is simple: 
It would require a heartbeat-script attached to every single area, and I've read it's a bad thing to set up too many of them because they might sacrifice performance or even cause crashes. Doing it that way only needs 1.

As I explained in the reply to MrZork's post, I am willing to do the work and set up subareas for the sake of having more control (allowing rest areas and such). Depending on the final layout there may be plenty of them, so I believe it's better to avoid the above. Do you agree?
:innocent: