|
|
(7 intermediate revisions by the same user not shown) |
Line 1: |
Line 1: |
− | | + | This page has moved to: https://docs.sine.space/v/scripting/client-scripting/components/sseat |
− | =Members=
| + | |
− | | + | |
− | {{ScriptFunction|void|SitPlayer|();|Make a player sit.|5=
| + | |
− | local thisObject=Space.Host.ExecutingObject<br>
| + | |
− | local seat=thisObject.Children[0].Seat<br>
| + | |
− | function Seat()<br>
| + | |
− | seat.SitPlayer()<br>
| + | |
− | end
| + | |
− | }}
| + | |
− | | + | |
− | {{ScriptFunction|void|UnseatPlayer|();|Make a player unseat.|5=
| + | |
− | local thisObject=Space.Host.ExecutingObject<br>
| + | |
− | local seat=thisObject.Children[0].Seat<br>
| + | |
− | function UnSeat()<br>
| + | |
− | seat.UnseatPlayer()<br>
| + | |
− | end
| + | |
− | }}
| + | |
− | | + | |
− | {{ScriptFunction|void|OnStandUp|(Closure e);|Binds a function to the Seat's On Stand Up event|5=<pre>
| + | |
− | e = function()
| + | |
− | Space.Log("On Stand Up event")
| + | |
− | end
| + | |
− | | + | |
− | Space.Host.ExecutingObject.Seat.OnStandUp(e)
| + | |
− | </pre>
| + | |
− | }}
| + | |
− | | + | |
− | {{ScriptFunction|void|OnSit|(Closure e);|Binds a function to the Seat's On Sit event|5=<pre>
| + | |
− | e = function()
| + | |
− | Space.Log("On Sit event")
| + | |
− | end
| + | |
− | | + | |
− | Space.Host.ExecutingObject.Seat.OnSit(e)
| + | |
− | </pre>
| + | |
− | }}
| + | |
− | | + | |
− | {{ScriptFunction|void|OnPlayerStandUp|(Closure e);|Binds a function to the Seat's On Player Stand Up event|5=<pre>
| + | |
− | e = function()
| + | |
− | Space.Log("On Player Stand Up")
| + | |
− | end
| + | |
− | | + | |
− | Space.Host.ExecutingObject.Seat.OnPlayerStandUp(e)
| + | |
− | </pre>
| + | |
− | }}
| + | |
− | | + | |
− | {{ScriptFunction|void|OnPlayerSit|(Closure e);|Binds a function to the Seat's On Player Sit event|5=<pre>
| + | |
− | e = function()
| + | |
− | Space.Log("On Player Sit event")
| + | |
− | end
| + | |
− | | + | |
− | Space.Host.ExecutingObject.Seat.OnPlayerSit(e)
| + | |
− | </pre>
| + | |
− | }}
| + | |
− | | + | |
− | | + | |
− | | + | |
− | =Properties=
| + | |
− | | + | |
− | {{ScriptFunction|bool|Enabled|{get; set;}|Whether the seat component is enabled.|5=
| + | |
− | local seat=thisObject.seat<br>
| + | |
− | Space.Log(seat.Enabled)<br>
| + | |
− | ''--print true.''
| + | |
− | }}
| + | |
− | | + | |
− | {{ScriptFunction|bool|InUse|(get;)|Return that whether the seat is in use.|5=
| + | |
− | local thisObject=Space.Host.ExecutingObject<br>
| + | |
− | local seat=thisObject.Children[0].Seat<br>
| + | |
− | function InUse()<br>
| + | |
− | local inUse=seat.InUse<br>
| + | |
− | Space.Log(inUse)<br>
| + | |
− | end
| + | |
− | }}
| + | |
− | | + | |
− | {{ScriptFunction|long|PlayerSeated|(get;);|Return the ID of the seating player.|5=
| + | |
− | local thisObject=Space.Host.ExecutingObject<br>
| + | |
− | local seat=thisObject.Children[0].Seat<br>
| + | |
− | function PlaySeated ()<br>
| + | |
− | local playSeated=seat.PlayerSeated<br>
| + | |
− | Space.Log(playSeated)<br>
| + | |
− | end
| + | |
− | }}
| + | |
− | | + | |
− | {{ScriptFunction|bool|UseSlotID|(get;set;);|Return true if uses SlotID|5=
| + | |
− | local thisObject=Space.Host.ExecutingObject<br>
| + | |
− | local seat=thisObject.Children[0].Seat<br>
| + | |
− | function UseSlotID ()<br>
| + | |
− | local useSlotID=seat.UseSlotID<br>
| + | |
− | Space.Log(useSlotID)<br>
| + | |
− | end
| + | |
− | }}
| + | |
− | | + | |
− | {{ScriptFunction|string|SlotID|(get;set;);|Return the slot ID of the seat.|5=
| + | |
− | local thisObject=Space.Host.ExecutingObject<br>
| + | |
− | local seat=thisObject.Children[0].Seat<br>
| + | |
− | function SlotID ()<br>
| + | |
− | local slotID=seat.SlotID<br>
| + | |
− | Space.Log(slotID)<br>
| + | |
− | end
| + | |
− | }}
| + | |
− | | + | |
− | {{ScriptFunction|SCollider|ClickableCollider|(get;set;);|Return the clickable collider.|5=
| + | |
− | local thisObject=Space.Host.ExecutingObject<br>
| + | |
− | local seat=thisObject.Children[0].Seat<br>
| + | |
− | function ClickableCollider()<br>
| + | |
− | local clickcoll=seat.ClickableCollider<br>
| + | |
− | Space.Log(clickcoll.Enabled)<br>
| + | |
− | end
| + | |
− | }}
| + | |
− | | + | |
− | {{ScriptFunction|SResource|Animation|(get;set;);|Return the animation clip.|5=
| + | |
− | local thisObject=Space.Host.ExecutingObject<br>
| + | |
− | local seat=thisObject.Children[0].Seat<br>
| + | |
− | local animation=seat.Animation<br>
| + | |
− | Space.Log(animation.Name)<br>
| + | |
− | ''--print the name of animation.''
| + | |
− | }}
| + | |
− | | + | |
− | {{ScriptFunction|SResource|AnimationMale|(get;set;);|Return the animation clip.|5=
| + | |
− | local thisObject=Space.Host.ExecutingObject<br>
| + | |
− | local seat=thisObject.Children[0].Seat<br>
| + | |
− | local animation=seat.AnimationMale<br>
| + | |
− | Space.Log(animation.Name)<br>
| + | |
− | ''--print the name of animation.''
| + | |
− | }}
| + | |
− | | + | |
− | {{ScriptFunction|SResource|AnimationFemale|(get;set;);|Return the animation clip.|5=
| + | |
− | local thisObject=Space.Host.ExecutingObject<br>
| + | |
− | local seat=thisObject.Children[0].Seat<br>
| + | |
− | local animation=seat.AnimationFemale<br>
| + | |
− | Space.Log(animation.Name)<br>
| + | |
− | ''--print the name of animation.''
| + | |
− | }}
| + | |
− | | + | |
− | {{Scripting Navbox}}
| + | |