Jump to content

Triggering once andonce only?


Demeggy

Recommended Posts

Triggers.

 

Bloody annoying things, but important I guess.

 

I'm trying to get my triggered script event to run once and once only, but after fannying around with having it set int's and the likes, it doesn't seem to want to do much. Can anyone point me on the right track? Here's the script;

 

scn LCoGLockdownSCRIPT

begin onTriggerEnter player

PlaySound3D EmergencyALARM
TriggerHitShader 5
blastdoor1.lock


end

 

Much obliged

Link to comment
Share on other sites

It doesn't even play the sound? make sure the script type is "object" and that it's linked to the activator

anyway, to run the script only once you have to add an "if"-line and make it untrue at the end of your script, for example:

scn script

short doOnce

begin xx

if doOnce==0
  xx
  xx
  set doOnce to 1
endif

end

Link to comment
Share on other sites

Cheers dude,

 

I knew it was along those lines, just after sitting here for hours staring, brain tends to skip a few beats :P the object script I've tossed in goes;

 

scn LCoGLockdownSCRIPT

short doOnce

begin onTriggerEnter player

if doOnce==0
  PlaySound3D TARDIScloisterBell
  TriggerHitShader 5
  dimensiondoor1.lock
  set doOnce to 1
endif

end

 

which I've applied to a trigger that the player crosses through to start off this little sequence. However it still doesn't seem to be registering... :/ hmmm

 

edit: ignore, Im being a complete spaz... the trigger was in the wrong place... cough...

 

whilst Ive got your attention though, is there anyway to force a start of dialogue between my player and this intercom Ive got setup right next to where the trigger is placed? I wasn't sure if I could use the say function, as it's not an NPC (although the intercom does refer to an NPC's topic tree).

Link to comment
Share on other sites

  • Recently Browsing   0 members

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