Post Pacific  

Go Back   Post Pacific > Восстановленный архив > Темы без сохранившегося раздела
FAQ Community Calendar Today's Posts Search

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 02.07.2006, 17:59   #1
Dave
Архивный участник
 
Join Date: Jun 2005
Posts: 364
Default [HELP] door in TOI

there is a door on the 11th floor in TOI (other floors to) but In retial in opens on a timer and closes on a time. does anyone have the door data that tells how to do this for TOI?
Dave is offline  
Old 03.07.2006, 12:20   #2
Bradj
Архивный участник
 
Join Date: Jun 2006
Posts: 17
Default

SetTimerPeriod(seconds)? possibly?

not sure about the movement though... hmmm

AddMoveToDesire(int x, int y, int z, float value)

so...

You might have to declare a variable and set a timer_id to it then set a time to that ID... Once the time runs out on the ID go to the AddMovetoDesire(). I am just guessing here... i have no clue if this works or not... Seem logical though.
Bradj is offline  
Old 04.07.2006, 00:33   #3
Cardon
Архивный участник
 
Join Date: Apr 2006
Posts: 65
Default

Just a basic NASC idea....

Code:
class door_open_toi : default_npc
{
     parameter:
     int Timer = 1234;
     int TimerID = 1234;
     handler:
     EventHandler CREATED() {
          AddTimerEx(TimerID, Timer);
     }
     EventHandler TIMER_FIRED_EX(timer_id) {
          if (timer_id == TimerID) {
               DoorFunction(Door, open);  // You will need to look this function up
               AddTimerEX(TimerID, Timer);
          }
     }
}
Replace DoorFunction with the proper door opening function, I'm currently not at home and I do not remember it off the top of my head, it's pretty obvious however.

Attach that AI to an "invisible" npc (one that has an extremely high col_height) and spawn it near the TOI door, and in theory it should work.
Cardon is offline  
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 18:38.