Back to Index

2 - Accessing User Data

A great way of detecting when players are in a room, or nearby. It's simple and easy to use.

All code requires you to add a using Eco.CTK.GreenEnergy in claystk-greenenergy.dll.

Is Daylight

Check whether it's daylight or not.

bool DaylightSensorHelper.IsDayLight

Anyone Near

Check if there is someone in the proximity of an object.

bool PlayerSensor.AnyoneNear ( Eco.Gameplay.Objects.WorldObject, int Distance )

Anyone In Same Room

Check whether there is someone in the same room as object.

bool PlayerSensor.AnyoneInSameRoom ( Eco.Gameplay.Objects.WorldObject, int Distance )

Get Near

Get User who is closest to the object.

Eco.Gameplay.Players.User PlayerSensor.GetNear ( Eco.Gameplay.Objects.WorldObject, int MaxDistance )
;