Jump to content

Script help


us2china2

Recommended Posts

I have one last thing I need to happen in this script, and I can't figure out how to do it. Any help is greatly appreciated. Please keep in mind I'm not a guru, so... if you can, lay it out in simple terms.

 

On to the problem. I want a script to run when the player enters the cell. No problem! Piece of cake! But I also want it to run at least once when the player leaves the cell. Everything I've tried fails. I think I need to link it to a quest, then have the quest run the script as often as I need. But the problem with that is that I want it to run once as soon as I leave the cell, and start back up if I return. Like a light switch that detects movement. When you go in, the light comes on, if you leave and come back a short while later, the lights are off and come on again.

I have the script in an actuator so I can keep some ref data. That may be good or bad, I'm just letting you know.

 

Thanks in advance!

Link to comment
Share on other sites

You're right that you'd probably need to use a quest script instead of an object script, since GameMode blocks on Object scripts don't run that often when the player isn't present. A Quest script would keep running one way or the other, so I'm not sure what the problem you're having is? Is the five-second delay between the block's running too long? :unsure:

 

An alternative, if the script is currently attached to an activator in the same cell, is giving it an OnLoad block that disables the lights. That way, they wouldn't vanish as soon as the player leaves, but taper out if he wanders elsewhere. That was the solution I was planning to do when I got the more important stuff out of the way (We're working on the same project. ;D).

Link to comment
Share on other sites

Archived

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

  • Recently Browsing   0 members

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