Scripting: Difference between revisions

 
(5 intermediate revisions by the same user not shown)
Line 207: Line 207:
==Equipment==
==Equipment==
<code>eq</code> or <code>equip</code> lets you equip, unequip, and use equipment.
<code>eq</code> or <code>equip</code> lets you equip, unequip, and use equipment.
{{HeaderNoTOC|Equip item}}
{{HeaderNoTOC|Equip item}}
You can equip your fishing rod by simply <code>eq fishingpole</code> if you have the fishing rod.
<code>eq fishingpole</code> equips an item in to its respective slot.


Check the [[#Equipment List]] below for things you can equip.
{{HeaderNoTOC|Use item}}
<code>eq fishingpole use</code> uses an item, similar to pressing the left mouse button/using "V". The item has to have been equipped already.


{{HeaderNoTOC|Use item}}
{{HeaderNoTOC|Unequip item}}
You can use your fishing rod by simply <code>eq fishingpole use</code>.
<code>eq</code> unequips your primary item (typically, the one you're actively holding in your hand).


Check the [[#Equipment List]] below for things to use.
<code>eq all</code> unequips any of your equipped items (which includes accessories and other gear attached to parts of your body).


{{HeaderNoTOC|Unequip item}}
You can unequip your item by simply using <code>eq</code>.


{{HeaderNoTOC|Equipment list}}
{{HeaderNoTOC|Equipment list}}
Line 249: Line 249:
<code>fc</code> to stop facial expressions.
<code>fc</code> to stop facial expressions.


==Play Animation==
==Play emote==
<code>an</code> or <code>animate</code> to play an animation.
<code>em</code> or <code>emote</code> to play a specific emote.
 
{{HeaderNoTOC|Play animation}}
<code>an yes</code> will play an animation where you nod your head yes.
 
<code>an dance 3</code> will play the dance animation 3 times.
 
<code>an dance -1</code> will play the dance animation forever.
 
<code>an bow 3 0.5</code> plays the bow animation for 3 seconds, however, it starts the animation from the middle instead of the beginning.
 
{{HeaderNoTOC|List of animations}}
Social Animations:
<nowiki>
yes, no, shrug, clap, bow, yawn, wave</nowiki>
 
Emotive Animations:
<nowiki>
admire, giggle, angry, sada, scared, rave</nowiki>
 
Other Animations:
<nowiki>
poke, pose, think, type</nowiki>
 
Duo Animations:
<nowiki>
hug</nowiki>


Standing & Sitting & Laying Animations:
{{HeaderNoTOC|Play emote}}
<nowiki>
<code>em yes</code> will play the "yes" emote, the same one that plays with the chat command "/em yes" or when pressing "yes" in the emoter window.
groundstand, groundstand2, groundstand3, groundsit, groundsit2, groundlay, groundsleep</nowiki>


{{HeaderNoTOC|Stop animation}}
{{HeaderNoTOC|Cancel emote}}
<code>an</code>
<code>em</code> will cancel any currently playing emote.


==Wait/Delay==
==Wait/Delay==
Line 290: Line 263:
{{HeaderNoTOC|Wait for a certain amount of time}}
{{HeaderNoTOC|Wait for a certain amount of time}}


<code>. 5</code> waits for 5 seconds before running more of the code. Mind the space! (".5" without space doesn't mean anything)
<code>wait 5</code> waits for 5 seconds before running more of the code. Mind the space! (".5" without space doesn't mean anything)


{{HeaderNoTOC|Wait until action is finished}}
{{HeaderNoTOC|Wait until action is finished}}


<code>.</code> simply waits until an action like walking, fading, or other things are completed. This is a great way to ensure you finish moving to a location.
<code>wait</code> simply waits until an action like walking, fading, or other things are completed. This is a great way to ensure finishing moving to a location.
 
<code>wait:Target</code> can be used to target an action wait for a specific character.


==Repeat/For Loop==
==Repeat/For Loop==
Line 310: Line 285:
This allows the script runner to move forward and pause for 2 seconds for a total of 5 times.
This allows the script runner to move forward and pause for 2 seconds for a total of 5 times.


==Cutscene==
==Camera control==
<code>cm</code> or <code>camera</code> lets you control cutscenes, cameras, and have a few cinematic controls.
<code>cm</code> or <code>camera</code> lets you control cutscenes, cameras, and have a few cinematic controls.


{{HeaderNoTOC|Cutscene mode}}
{{HeaderNoTOC|Cutscene mode}}
Simply do <code>cm cs</code> and you will enable cutscene mode. Cutscene mode adds black borders and the top and bottom of your screen and hides your hud.
<code>cm cs</code> will enable cutscene mode. Cutscene mode adds black borders and the top and bottom of your screen and hides the interface.
 
<code>cm</code> will disable cutscene mode and resets the camera (ie. places it back at the player character)
 
{{HeaderNoTOC|Focus}}
<code>cm focus</code> returns camera focus on the player.
 
<code>cm focus sera_hammock</code> for example will allow you to focus on an object with the camera. The camera will rotate to look at the object.
 
{{HeaderNoTOC|Set position}}
<code>cm set (coordinates)</code> (for example, <code>cm set 60 21.51 2.90 -13.37 -0.29 2.43 0.00</code>) sets the camera position and aim.
 
This detaches from the focused item and serves as a "static" camera placement. You can get the camera coordinates by right clicking the scripting window and clicking "Paste camera".
 
{{HeaderNoTOC|Fading}}
<code>cm fade</code> creates a short black fade.
 
<code>cm fade 0</code> will make the screen black instantly.
 
<code>cm fade 2.5</code> will fade the screen from screen to black, over the course of 2.5 seconds.
 
<code>cm fade -1.5</code> will fade the screen from black to screen, over the course of 1.5 seconds.


Cutscene mode can be canceled by holding escape.
Remember to put <code>wait</code> to wait for the fade. (eg. <code>wait 1.0</code> to wait one second after doing <code>cm fade 1.0</code>)


{{HeaderNoTOC|Focus camera on object}}
{{HeaderNoTOC|Fading to player}}
<code>cm focus sera_hammock</code> for example will allow you to focus on an object with the camera. The camera will rotate to look at the object for your cutscenes or simply convenience.
<code>cm fadeplayer</code> is a shorthand to fade to black, reset camera to player, then fade out (with automatic waiting).


{{HeaderNoTOC|Fade out}}
{{HeaderNoTOC|Dissolving}}
Fading out allows you to make the current camera view fade out.
<code>cm dissolve</code> creates a short dissolve effect (a snapshot of the screen is faded out to a new shot).


Simply do <code>cm fade</code> to do a short fade. <code>cm fade 0</code> will permanently fade to black.
{{HeaderNoTOC|Blurring}}
<code>cm blur 2.0</code> toggles a blurry effect on the screen with 2.0x power.


To have a fade out that happens slowly for you can do <code>cm fade 5</code> to slowly fade out and after 5 seconds being completed faded to black. You can replace the number 5 with any length of time you want for this fade out.
<code>cm blur</code> toggles the blurry effect off.