Jump to content

Geck How-To's


Xedric

Recommended Posts

Okay, so I'm still working on the Tardis mod.

 

I want to be able to make it so that the NPCs ignore the outside door and don't come in when they're chasing the player. Now if I were to set each outside door to be ignored by sandbox, would that prevent entry by non-followers?

 

Also, I need to be able to generate a random number. I'm going to make a random destination selector. The problem is that it needs to be a random number between like 27 and 37. Now I get how I could do that if I could do like 1 to 100. I could make an if then else statement that would be if 1-10 set it to 27, if 11-20 set it to 28, etc. But the issue is that I still can't generate a random number.

 

Edit: Also, I've been trying to set the game hour. Do I just use 'Set Gamehour [0-23]' or is there a better way of coding it.

Edited by Xedric
Link to comment
Share on other sites

The command to set the game hour is right 0-23.

 

For the random number I'm not sure: http://geck.bethsoft.com/index.php/GetRandomPercent That might help, it might not.

 

The Ignored by Sandbox is just that, it is ignored by sandboxing actors. It will have no effect on during combat. You can use the No AI Acquire / Obstacle flag on the door to see if that helps. Another route would be to use a script to prevent activation by anyone but the player and other select actors:

 

Begin OnActivate

 

if GetActionRef != Player

return

elseif GetActionRef Player

activate

endif

Link to comment
Share on other sites

  • Recently Browsing   0 members

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