SphereCommunity
Region or room underground - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: General Help (/Forum-General-Help)
+--- Thread: Region or room underground (/Thread-Region-or-room-underground)



Region or room underground - artexd - 09-19-2014 04:08 AM

How to define a room or region that is underground ( -25 )?
I don't want events and region types trigger on the ground ( 0 ) just underground (-25).


RE: Region or room underground - Extreme - 09-19-2014 06:39 AM

Add "region_flag_underground" to room/region events.


RE: Region or room underground - artexd - 09-19-2014 09:03 PM

But I want weather on the ground. When I make a room with flag UNDERGROUND then all the Z positions have the flag.
What I mean is, I want in the same X,Y location have 2 rooms. One above Z=0 and one below Z=-5.


RE: Region or room underground - Coruja - 09-20-2014 02:01 AM

on sphere it's not possible create 2 AREADEF / ROOMDEF at the same spot with different Z

but if you really want stop the weather effect, try using a workaround that will set FLAGS |= statf_indoors on the player when it goes underground, players with this flag will not have weather effects. It's a horrible solution but maybe it will help. Something like this
Code:
[ITEMDEF i_floor_noweather]
ID=i_floor_marble
NAME=Floor to stop weather effects

ON=@Create
ATTR=attr_invis|attr_move_never  //this will make it invisible to players

ON=@Step
IF (<SRC.FLAGS> & statf_indoors)
  SRC.FLAGS &= ~statf_indoors
  SRC.EVENTS -e_floor_noweather
ELSE
  SRC.FLAGS |= statf_indoors
  SRC.EVENTS +e_floor_noweather
ENDIF

[EVENTS e_floor_noweather]  //this event will remove the flag if the player leave the region using teleport/recall/gate/etc without step again on the workaround floor to unset the flag
ON=@RegionLeave
SRC.FLAGS &= ~statf_indoors
SRC.EVENTS -e_floor_noweather



RE: Region or room underground - artexd - 09-20-2014 03:20 AM

OK, Thanks Smile