SphereCommunity
Doors and Opening - Distance, LOS - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: General Help (/Forum-General-Help)
+--- Thread: Doors and Opening - Distance, LOS (/Thread-Doors-and-Opening-Distance-LOS)



Doors and Opening - Distance, LOS - snoozed - 05-14-2017 01:34 AM

Hello,

Trying to find where door logic happens - los/distance checking.

Only thing I can find is notes from 2010:

Code:
12-08-2010, ShiryuX
- Fixed #1793: OpenDoor Macro now won't ignore LOS and Distance is 3 (max).

Any idea where this is stored? (server, script? - file?)

Thanks


RE: Doors and Opening - Distance, LOS - pointhz - 05-14-2017 03:05 AM

probably on typedef or itemdef of the door on@dclick


RE: Doors and Opening - Distance, LOS - snoozed - 05-14-2017 07:45 AM

(05-14-2017 03:05 AM)pointhz Wrote:  probably on typedef or itemdef of the door on@dclick

Lol, that doesn't really get anywhere - I'm assuming it's on@dclick.. somewhere.

But I'm not seeing it.

And it's not in ItemDef or TypeDef..


RE: Doors and Opening - Distance, LOS - pointhz - 05-15-2017 06:53 AM

[ITEMDEF 06a5]
DEFNAME=i_door_wood
RESOURCES=25 I_log
TYPE=T_DOOR
CATEGORY=Buildings - Doors
SUBSECTION=Wooden Door 1
DESCRIPTION=@ (n / sw)
DUPELIST=06a7,06a9,06ab,06ad,06af,06b1,06b3

ON = @SpellEffect
return 1

ON = @DClick
if ( <SRC.ISDEAD> )
SRC.SYSMESSAGE "Get a life..."
return 0
endif


RE: Doors and Opening - Distance, LOS - snoozed - 05-15-2017 08:33 AM

Lol, that doesn't exist in 'sphere_item_building_doors.scp'

That check should be performed in a centralized place (from the change log notes I posted). I'm trying to find that place.

Thanks for your suggestions though


RE: Doors and Opening - Distance, LOS - darksun84 - 05-15-2017 05:50 PM

I think it's not in the scripts but somewhere in the source Tongue


RE: Doors and Opening - Distance, LOS - pointhz - 05-16-2017 05:50 AM

(05-15-2017 08:33 AM)snoozed Wrote:  Lol, that doesn't exist in 'sphere_item_building_doors.scp'

That check should be performed in a centralized place (from the change log notes I posted). I'm trying to find that place.

Thanks for your suggestions though

Add it somewhere and test if it overwrites the default or not


RE: Doors and Opening - Distance, LOS - snoozed - 05-16-2017 08:19 AM

(05-16-2017 05:50 AM)pointhz Wrote:  
(05-15-2017 08:33 AM)snoozed Wrote:  Lol, that doesn't exist in 'sphere_item_building_doors.scp'

That check should be performed in a centralized place (from the change log notes I posted). I'm trying to find that place.

Thanks for your suggestions though

Add it somewhere and test if it overwrites the default or not

Yes, it will read it, but I'd strongly prefer to find the source, so there aren't any unintended issues.

With that, any idea what the range checking variable is?

Thanks


RE: Doors and Opening - Distance, LOS - Coruja - 05-17-2017 12:26 PM

LOS/distance checks works in the same way for all items, including doors
the only difference is that if you use CAN=can_i_dcignorelos or can_i_dcignoredist it will ignore LOS or distance, and this is also the same for all items using these CAN flags