Jump to content

trigger trouble


stevie70

Recommended Posts

why (meaning for which one of the 8 billion possible reasons) does this not work:

ref Blocker

begin OnTrigger
set Blocker to GetActionRef
if ( Blocker.GetIsFormType CREA == 1 ) || ( Blocker.GetIsFormType NPC_ == 1 ) || ( Blocker == player )
               ; (...do stuff)
endif
end

the purpose of this is to make a trigger react to creatures, npcs or player, but not any other items in the trigger.

playtested with pc so far (don't see how any of the others could possibly work if player doesn't), and it does:

nothing (no, it really does nothing, not does this frame and undoes next frame).

 

the geck-manual's giving me a real hard time finding out why though:

the section about triggers says, a trigger won't set actionRef, so it's no use getting them.

the GetActionRef-section says though, it does, but it remains for only the one frame in which it is triggered (which i'm pretty sure am getting here).

so, what's actually fact? i'm not even sure where to look for the problem anymore, and neither trial nor error got me anywhere.

 

and i can't use triggerEnter in this case, because the triggers getting enabled when needed and needs to also react to people already standing there (yes, this basically works fine, i'm using the same principle for another trigger that just goes OnTrigger player, but can't to this here either :-(

wish there was something like "begin OnTrigger ( player || crea || npc_ )", wouldn't have a problem then :-)

Edited by stevie70
Link to comment
Share on other sites

GetActionRef can't be used in an OnTrigger block, because the block does not set the action reference at all. You'll have to use an OnTriggerEnter block if you need to conditionalize your script based upon what causes the trigger to fire.

ah, an answer finally, thx :-)

don't get me wrong, but is this something you _know_ and i can take for granted enough to completely overthrow my whole setup (because it would _need_ onTrigger the way it is), or is this what you read in the manual's trigger-section? -

'cause like i said in my original post, in the GetActionRef-section, the manual's telling different. (and honestly, it wouldn't make a lot of sense to me if it really _never_ set an actionRef, because however would OnTrigger player work then?)

but anyway, if you said you definitely know that for sure, i'd flush the whole thing and try to figure another way for what i want to do (just was hard enough to come up with this one at all, that's why i'm asking...)

Link to comment
Share on other sites

From the Notes section at http://geck.bethsoft.com/index.php/OnTrigger

 

"The action ref is NOT set, so IsActionRef and GetActionRef should not be used inside this blocktype."

yeah, that's what i feared. read that too, but on the next page, it says like this

but thx anyway.

 

damn, i'm stuck on this one...

somebody maybe know of any other way to check the form type of what goes in a trigger, like onTrigger npc or something (analogue to onTrigger player), dunno, something...

so much for having the mod out the bygone weekend... hehe... :-)

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...