Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Shelf | Store

Privacy Policy


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Unlock door when timer is run out
Author Message
Greven Offline
Member

Posts: 106
Joined: May 2011
Reputation: 3
Post: #11
RE: Unlock door when timer is run out
(05-27-2011 03:04 PM)dasde Wrote:  
(05-27-2011 03:00 PM)Greven Wrote:  
(05-27-2011 02:54 PM)dasde Wrote:  Thanks for the fast replies, very nice.

The door name is:

BruteDoor_1


There is nothing in the script yet, I am starting with the timer. I have the OnStart, OnEnter and OnLeave, all the starter stuff.

Ok so is the timer for the beginning or when you enter a area?

If its in the beginning (on enter) then:
OnEnter()
{
AddTimer("", 30.0f, DoorOpen)
}

void DoorOpen(string &in asTimer)
{
SetSwingDoorLocked("BruteDoor_1", false, true)
}

Didnt work. If you can use this information, then the door is locked in the editor.

Ok... that shouldnt make a difference. hmmm i cant really see what the problem is... Only that if you try to open it before 30 s... Edit: Lol silly me and my nooby mistakes, after AddTimer("", 30.0f, DoorOpen)
ther should be a ; and also after the SetSwingDoorLocked("BruteDoor_1", false, true)

[WIP] Recidivus
(This post was last modified: 05-27-2011 03:15 PM by Greven.)
05-27-2011 03:11 PM
Find all posts by this user Quote this message in a reply
dasde Offline
Junior Member

Posts: 30
Joined: May 2011
Reputation: 0
Post: #12
RE: Unlock door when timer is run out
Quote:Ok... that shouldnt make a difference. hmmm i cant really see what the problem is... Only that if you try to open it before 30 s... Edit: Lol silly me and my nooby mistakes, after AddTimer("", 30.0f, DoorOpen)
ther should be a ; and also after the SetSwingDoorLocked("BruteDoor_1", false, true)

Already done
(This post was last modified: 05-27-2011 03:22 PM by dasde.)
05-27-2011 03:22 PM
Find all posts by this user Quote this message in a reply
Greven Offline
Member

Posts: 106
Joined: May 2011
Reputation: 3
Post: #13
RE: Unlock door when timer is run out
Ok then unlock the door in the editor and lock it in the script instead, Even though it shouldnt matter...
OnEnter()
{
SetSwingDoorLocked("BruteDoor_1", true, true);
AddTimer("", 30.0f, DoorOpen);
}

void DoorOpen(string &in asTimer)
{
SetSwingDoorLocked("BruteDoor_1", false, true);
}

[WIP] Recidivus
05-27-2011 03:25 PM
Find all posts by this user Quote this message in a reply
dasde Offline
Junior Member

Posts: 30
Joined: May 2011
Reputation: 0
Post: #14
RE: Unlock door when timer is run out
(05-27-2011 03:25 PM)Greven Wrote:  Ok then unlock the door in the editor and lock it in the script instead, Even though it shouldnt matter...
OnEnter()
{
SetSwingDoorLocked("BruteDoor_1", true, true);
AddTimer("", 30.0f, DoorOpen);
}

void DoorOpen(string &in asTimer)
{
SetSwingDoorLocked("BruteDoor_1", false, true);
}

LOOOOOOOOOOOOOOOOOOOL it worked!


Thank you so much Smile
05-27-2011 03:33 PM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)