wiki.sine.space | sinespace

Scripting/SSeat

From wiki.sine.space
Revision as of 11:08, 25 June 2021 by Voidtech (Talk | contribs)

Jump to: navigation, search

Members

SitPlayer

void SitPlayer ();

Make a player sit.

local thisObject=Space.Host.ExecutingObject

local seat=thisObject.Children[0].Seat
function Seat()
    seat.SitPlayer()

end


UnseatPlayer

void UnseatPlayer ();

Make a player unseat.

local thisObject=Space.Host.ExecutingObject

local seat=thisObject.Children[0].Seat
function UnSeat()
    seat.UnseatPlayer()

end


OnStandUp

void OnStandUp (Closure e);

Binds a function to the Seat's On Stand Up event

e = function()
Space.Log("On Stand Up event")
end

Space.Host.ExecutingObject.Seat.OnStandUp(e)


OnSit

void OnSit (Closure e);

Binds a function to the Seat's On Sit event

e = function()
Space.Log("On Sit event")
end

Space.Host.ExecutingObject.Seat.OnSit(e)


OnPlayerStandUp

void OnPlayerStandUp (Closure e);

Binds a function to the Seat's On Player Stand Up event

e = function()
Space.Log("On Player Stand Up")
end

Space.Host.ExecutingObject.Seat.OnPlayerStandUp(e)


OnPlayerSit

void OnPlayerSit (Closure e);

Binds a function to the Seat's On Player Sit event

e = function()
Space.Log("On Player Sit event")
end

Space.Host.ExecutingObject.Seat.OnPlayerSit(e)



Properties

Enabled

bool Enabled {get; set;}

Whether the seat component is enabled.

local seat=thisObject.seat

Space.Log(seat.Enabled)

--print true.


InUse

bool InUse (get;)

Return that whether the seat is in use.

local thisObject=Space.Host.ExecutingObject

local seat=thisObject.Children[0].Seat
function InUse()
    local inUse=seat.InUse
    Space.Log(inUse)

end


PlayerSeated

long PlayerSeated (get;);

Return the ID of the seating player.

local thisObject=Space.Host.ExecutingObject

local seat=thisObject.Children[0].Seat
function PlaySeated ()
    local playSeated=seat.PlayerSeated
    Space.Log(playSeated)

end


UseSlotID

bool UseSlotID (get;set;);

Return true if uses SlotID

local thisObject=Space.Host.ExecutingObject

local seat=thisObject.Children[0].Seat
function UseSlotID ()
    local useSlotID=seat.UseSlotID
    Space.Log(useSlotID)

end


SlotID

string SlotID (get;set;);

Return the slot ID of the seat.

local thisObject=Space.Host.ExecutingObject

local seat=thisObject.Children[0].Seat
function SlotID ()
    local slotID=seat.SlotID
    Space.Log(slotID)

end


ClickableCollider

SCollider ClickableCollider (get;set;);

Return the clickable collider.

local thisObject=Space.Host.ExecutingObject

local seat=thisObject.Children[0].Seat
function ClickableCollider()
    local clickcoll=seat.ClickableCollider
    Space.Log(clickcoll.Enabled)

end


Animation

SResource Animation (get;set;);

Return the animation clip.

local thisObject=Space.Host.ExecutingObject

local seat=thisObject.Children[0].Seat
local animation=seat.Animation
Space.Log(animation.Name)

--print the name of animation.


AnimationMale

SResource AnimationMale (get;set;);

Return the animation clip.

local thisObject=Space.Host.ExecutingObject

local seat=thisObject.Children[0].Seat
local animation=seat.AnimationMale
Space.Log(animation.Name)

--print the name of animation.


AnimationFemale

SResource AnimationFemale (get;set;);

Return the animation clip.

local thisObject=Space.Host.ExecutingObject

local seat=thisObject.Children[0].Seat
local animation=seat.AnimationFemale
Space.Log(animation.Name)

--print the name of animation.