View unanswered posts | View active topics It is currently Tue Jul 23, 2019 3:19 pm



Reply to topic  [ 6 posts ] 
 Doors and Switches 
Author Message

Joined: Wed Jun 02, 2010 8:05 pm
Posts: 31
Reply with quote
Post Doors and Switches
So I was poking around with Lua and found no simple way to do it.
As in, there's apparently no open() function for doors (And yet there's OpenAllDoors()? Wouldn't it be the first logical step for an open() function, then iterate through all doors and execute open()?), and changing ClosedByDefault does nothing.
So I was wondering if I could use a small actor that moves into the Sensor of the door when it's shot...
Are there any better ways to do it?


Mon Aug 15, 2011 9:55 am
Profile
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post Re: Doors and Switches
I don't remember for sure, but have you tried setting the ADoor's control state to Primary Action?

Specifically, you'd get a pointer to the door, then:

door:GetController():SetState(Controller.PRIMARY_ACTION, true)

That syntax may not be entirely correct. But it's worth a shot, assuming ADoors follow generic actor traits. This is a somewhat wild assumption, so don't assume that it will.


Mon Aug 15, 2011 10:46 am
Profile

Joined: Wed Jun 02, 2010 8:05 pm
Posts: 31
Reply with quote
Post Re: Doors and Switches
Unfortunately it didnt work.


Mon Aug 15, 2011 11:38 am
Profile
DRL Developer
DRL Developer
User avatar

Joined: Wed Dec 13, 2006 5:27 am
Posts: 3134
Location: A little south and a lot west of Moscow
Reply with quote
Post Re: Doors and Switches
As I recall, yeah, placing an invisible actor in the door is pretty much the only way to go about it.


Mon Aug 15, 2011 7:33 pm
Profile WWW
User avatar

Joined: Fri Aug 20, 2010 4:45 am
Posts: 911
Location: No Comment.
Reply with quote
Post Re: Doors and Switches
its a shame Data never added switches into B25, has anyone thought of making the code for Switches and then sending it to Data? I'm sure he would added it then, Hopefully.


Wed Aug 17, 2011 4:02 am
Profile

Joined: Wed Jun 02, 2010 8:05 pm
Posts: 31
Reply with quote
Post Re: Doors and Switches
Sims_Doc wrote:
its a shame Data never added switches into B25, has anyone thought of making the code for Switches and then sending it to Data? I'm sure he would added it then, Hopefully.


The problem about that is the energy transfer.
You'd have to specify exactly what thing you want to activate.
So long-range switches are improbable.
But some kind of switch infront of a door you have to shoot to open would be pretty cool.


Wed Aug 17, 2011 11:42 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 6 posts ] 

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.017s | 13 Queries | GZIP : Off ]