i30817 Posted November 28, 2011 Share Posted November 28, 2011 Does the "Trigger" object that gets set by these functions: Also gets set if they return false? Link to comment
i30817 Posted November 29, 2011 Author Share Posted November 29, 2011 Also, is it possible to store "Nothing" as the trigger (as a marker value)? I was thinking of this: //reset trigger, always true HP(Nothing,0) If this works, then how can i recognize if the trigger is "Nothing": I need a function that doesn't save the trigger that nevertheless allows me to check that (for optimization). I was thinking of: OR(N) InMyGroup(Trigger)//if in the group, bail out, if still "Nothing" continue That sounds like if it compares a numeric value so it should be fast, Link to comment
i30817 Posted November 29, 2011 Author Share Posted November 29, 2011 Realized that the svtriobj.htm page mislead me, but can't edit my old posts anymore: Mentally replace "Trigger" by "LastTrigger" when reading these questions. Link to comment
i30817 Posted November 29, 2011 Author Share Posted November 29, 2011 Actually DON'T. I just tested something really simple with the tobcleric dude: Exists(Myself)//true CharName("Rothgar", LastTrigger)//true and CharName("Rothgar", LastTrigger) is false, however, CharName("Rothgar", Myself) is true! So Exists(Myself) and probably the others are not putting the objects matched into LastTrigger, and i'm even more confused than before. Edit: Eh. I just dig up this post by Avenger http://www.shsforums...post__p__250229 This makes me a little angry. Any way to fool the engine to treat these as "external" trigger, whatever that is? Link to comment
Avenger Posted November 29, 2011 Share Posted November 29, 2011 Probably not all triggers could be forced to be placed into LastTrigger (even with svtriobj). I suspect there is a difference between 0x4nnn triggers and normal triggers. Link to comment
i30817 Posted November 29, 2011 Author Share Posted November 29, 2011 Did you ever try to extend the file and just... add a shadow of the triggers that has the upper bits zeroed and a different name? I'm going to try something like that. Tried it, it didn't work so far. It also needs a trigger.ids shadow to call. Trigger.ids shadows that don't have the same number don't get called 0x000d ExistsSetTrigger(O:Object*) doesn't work but 0x400d ExistsSetTrigger(O:Object*) does. Since the svtriobj.ids (save trigger object) also uses the same format, I tried to put there 0x000d ExistsSetTrigger(O:Object*) Didn't do anything i could see. Rather annoying, i was hoping that the higher byte in trigger.ids was cosmetic and i could change the setting in svtriobj. Link to comment
i30817 Posted November 29, 2011 Author Share Posted November 29, 2011 Wait, maybe it's stopping at the first match in svtriobj... Even if it works it looks dangerous. Link to comment
i30817 Posted November 29, 2011 Author Share Posted November 29, 2011 Nope. Guess the only solution is to hope for TobEx to deliver variable substitution for Objects as well as numbers. Link to comment
devSin Posted December 1, 2011 Share Posted December 1, 2011 The trigger object should be set in hardcode, not because of the trigger. Whatever caused the trigger to be true is what set the object, not the actual trigger result. E.g., AttackedBy() will have LastTrigger being the person who attacked you, not because you checked AttackedBy() but because the attack action saved the object (and they correspond since AttackedBy() has such a short window to be true; next round, LastTrigger would likely be something else). It's pretty situational, since a ton of stuff will set it. Link to comment
i30817 Posted December 2, 2011 Author Share Posted December 2, 2011 Dang. So Seen() is the only trigger that can store a object while it is executing the trigger block? What about detect? I don't really care about how the npc is detected, only that i can get it in both cases if it is heard or seen. Link to comment
devSin Posted December 3, 2011 Share Posted December 3, 2011 Detect() and See() function the same (they just treat visibility differently when doing it). A Detect()ed object is your LastSeenBy() until you Detect() or See() something else (you never look except when directed via the triggers). Most the other objects I believe all correspond to external activity; you can't set them forcibly except by getting another object to do something that sets them. Link to comment
igi Posted December 17, 2011 Share Posted December 17, 2011 Does the "Trigger" object that gets set by these functions: Some of them. Also gets set if they return false? No. Moving to archive. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.