AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   DoorMod Question (https://forums.alliedmods.net/showthread.php?t=46150)

Bad_Bud 10-19-2006 14:52

DoorMod Question
 
If I had a basic DoorMod that lets the user open/close lock/unlock doors, would there be a way to check to see if the door is in its open state so that a user can't lock a door while it's open? I was looking through the entity keys in Engine and I couldn't find anything.

Silencer123 10-19-2006 16:35

Re: DoorMod Question
 
locking unlocked doors that cannot be locked by the map itself can not
be locked by amxx without creating a multisource entity. create a multisource
with any name and set the master of the door entity to that name, too.
If the door is locked then, it works, else try triggering the multisource but
that requires a player in game which can be a big disadvantage in same cases
but not in this I think just use the players id who is triggering that then.
if it still does not work the answer is "no", because then you know that the
way of working of multisource entities is written into map on compile and creating
such with amxx is probably impossible and that then might be because multisource entity
is bound together with other entities that can trigger it so triggering it via amxx using
any way might crash or you make an entity that triggers the multisource and
temporarily removes entities that can trigger the multisource just try around.

XxAvalanchexX 10-19-2006 18:52

Re: DoorMod Question
 
What does that have to do with checking if a door is open?

I would save each door's origin on map load. To check if it is open, see if its current origin differs from its original. You will also have to take into account the Start Open spawnflag (1) for func_door's.

Bad_Bud 10-19-2006 22:18

Re: DoorMod Question
 
Good idea. I'll try that. Thanks Avalanche.

I would +karma but I havn't spread enough around. :(


All times are GMT -4. The time now is 04:56.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.