Data Realms Fan Forums
http://forums.datarealms.com/

Doors and Switches
http://forums.datarealms.com/viewtopic.php?f=73&t=25168
Page 1 of 1

Author:  LordBistian [ Mon Aug 15, 2011 9:55 am ]
Post subject:  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?

Author:  Grif [ Mon Aug 15, 2011 10:46 am ]
Post subject:  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.

Author:  LordBistian [ Mon Aug 15, 2011 11:38 am ]
Post subject:  Re: Doors and Switches

Unfortunately it didnt work.

Author:  TheLastBanana [ Mon Aug 15, 2011 7:33 pm ]
Post subject:  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.

Author:  Sims_Doc [ Wed Aug 17, 2011 4:02 am ]
Post subject:  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.

Author:  LordBistian [ Wed Aug 17, 2011 11:42 am ]
Post subject:  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.

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/