Bioware Archive V2 > Builders - Scripting

default script caution

(1/2) > >>

Legacy_Shadooow:


               Rumours spread this script fires only for PC heartbeat, but lately I decided to use it, PC heartbeat was great opportnity to save persistent info about PC. But when I looked into database, I saw strange values so I made few debugs and guess what, any trap made via scripting, fires default script every 6seconds...

Yes you can add [nwscript] if(!GetIsPC(OBJECT_SELF))return;[/nwscript] but I think pseudoheartbeat will be much "clean" way to do this afterall...
               
               

               
            

Legacy_Baragg:


               Traps fire the script titled "default"? Intresting, you could do the if not pc return OR use that to do specials with trap IE:



if not a PC(assume is trap) and do this

if is PC do this other thing
               
               

               
            

Legacy_ElgarL:


               I wonder if the trap was named 'default' and it triggered the script through 'tag based scripting'.



Just an idea. I'll give this a test when I get time.
               
               

               
            

Legacy_Shadooow:


               ElgarL wrote...

I wonder if the trap was named 'default' and it triggered the script through 'tag based scripting'.

Just an idea. I'll give this a test when I get time.
--- End quote ---
First I dont use tag based scripting.
Second, traps cant trigger tag based scripts, because tag based script are in OnPlayer events - (un)equip,(un)acquire,activate.
Third those traps created via CreateTrapAtLocation (guess those on object dont do that) had tag = "" (null).
               
               

               
            

Legacy_Lightfoot8:


               I have alway been afraid something like that would happen. Ever since I heard about people useing the defualt script I have wondered about what strange things could happen or what other places bioware my have placed 'default' as the name of a script not filled in. Axe seemed to clear the use of the script for PC heart beat. But if it is running on some other objects also I think I would advoid it for sure. I agree the use of the pseudo heart beat of a known overhead value. Is better then an unknown overhead value checking to make sure it is a PC and a script running on other objects.

just my 2 cents again.


Edit:  oh If you did happen to put a script in the HB of the traps, even if it was a blank script, Then it would no longer run the Default script as its HB.  another messy solution to the problem.   lol
               
               

               
                     Modifié par Lightfoot8, 16 juillet 2010 - 01:29 .
                     
                  
            

Navigation

[0] Message Index

[#] Next page

Go to full version