-
Notifications
You must be signed in to change notification settings - Fork 8
Home
- for core Yarn and YarnSpinner commands, consult YarnSpinner documentation
- this wiki just covers the extra Yarn commands implemented by Ropework
- Ropework Yarn commands follows syntax
<<(command) @ (parameters)>>
(the RopeworkManager is a GameObject named "@")
- for reference, the example character sprites are about 600 x 1200 pixels... its import settings look like:
- Texture Type: Sprite
- Pixels Per Unit: 165 (you should try different numbers to see what works)
- Pivot: Bottom
is in Assets/Ropework/examples/yarnScripts/RopeworkSimpleExample.yarn.txt
HOW TO READ THIS: for example, with <<Show @ (spriteName), (x=0.5), (y=0.5)>>
, the "=0.5"
is a default value used if you don't specify a number yourself
set background image to (spriteName)
show (spriteName) at (x,y) in normalized screenspace (0.0-1.0)
- 0.0 is like 0% left / bottom of screen, 1.0 is like 100% right / top of screen
- for x or y, you can also use keywords like "right", "upper", "top" (0.75) or "middle", "center" (0.5) or "left", "lower", "bottom" (0.25)
- when x and/or y are omitted (e.g.
<<Show @ TreeSprite>>
) then they default to values of 0.5... thus, omitting both x and y would set the position to (0.5, 0.5) in normalized screenspace (center of the screen)
hide any actor called (actorOrSpriteName), or any sprites called (actorOrSpriteName)
hides all sprites and actors, takes no parameters
very useful... kind of like <<Show>>
except it also has (actorName), which links the sprite to that actorName
- anytime a character named (actorName) talks in a Yarn script, this sprite will automatically highlight
- also good for changing expressions, e.g. calling
<<Act @ Dog,dog_happy,left>>
and then<<Act @ Dog,dog_sad>>
will change the Dog's sprite and preserve its positioning... this is better than tediously calling<<Show @ dog_happy>>
and then<<Hide @ dog_happy>>
and then<<Show @ dog_sad>>
- (HTMLcolor) is a web hex color (like "#ffffff") or a common color keyword (like "white")... here, it affects the color of the name label in Ropework's ClassicDialogueUI, but I suppose you could use it for anything
horizontally flips an actor or sprite, in case you need to make your characters look around or whatever
animates / slides an actor or sprite toward a new position, good for animating walking or running
- (moveTime) is how long it will take to move from current position to new position, in seconds
- for notes on (xPosition) and (yPosition), see entry for
<<Show>>
above - KNOWN BUG: not recommended to use this at the same time as a
<<Shake>>
call... let the previous call finish, first
shakes an actor or a sprite, good for when someone is surprised or angry or laughing
- if shakeTime isn't specified, the default value 0.5 means "shake this object at 50% strength for 0.5 seconds"
- a shakeTime=1.0 means "shake this object at 100% for 1.0 seconds", and so on
- KNOWN BUG: not recommended to use this at the same time as a
<<Move>>
call... let the previous call finish, first
fades the screen to a certain color, could be a fade in or a fade out depending on how you use it
- startOpacity and endOpacity are numbers 0.0-1.0 (like 0%-100%)
- by default with no parameters (
<<Fade @>>
) will fade to black over 1.0 seconds - (HTMLcolor) is a web hex color (like "#ffffff") or a common color keyword (like "white")
useful shortcut for fading in, no matter what the previous fade settings were... equivalent to calling something like <<Fade @ black, -1, 0.0, 1.0>>
(where startOpacity=-1 means it will reuse the last fade command's colors and opacity)
plays an audio clip named (audioClipName) at volume (0.0-1.0)
- if "loop" is present, it will loop the audio repeatedly until stopped; otherwise, the sound will end automatically
stop playing any active audio clip named (audioClipName)
stops playing all sounds, no parameters