Jump to content

Trigger Object.


Recommended Posts

Also, is it possible to store "Nothing" as the trigger (as a marker value)?

I was thinking of this:

//reset trigger, always true





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:



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

Actually DON'T.


I just tested something really simple with the tobcleric dude:

 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





This makes me a little angry. Any way to fool the engine to treat these as "external" trigger, whatever that is?

Link to comment

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


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

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

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


This topic is now archived and is closed to further replies.

  • Create New...