Dungeon (functions): Difference between revisions
| (8 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
{{Hat Note|More functions: [[Script Reference]]''}} | |||
The dungeon functions involve actions that are performed within [[dungeon|dungeons]]. | The dungeon functions involve actions that are performed within [[dungeon|dungeons]]. | ||
== CharTurnToChar== | == CharTurnToChar== | ||
| Line 61: | Line 63: | ||
Set a character's animation. Argument order is <code>DUNGEON:CharStartAnim(chara, emoteID, doLoop)</code> | Set a character's animation. Argument order is <code>DUNGEON:CharStartAnim(chara, emoteID, doLoop)</code> | ||
=== Arguments === | |||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
| Line 81: | Line 85: | ||
</pre> | </pre> | ||
== | == CharEndAnim == | ||
Stops a character's current animation, reverting them to default idle. Usage is <code>DUNGEON:CharEndAnim(chara)</code>. | Stops a character's current animation, reverting them to default idle. Usage is <code>DUNGEON:CharEndAnim(chara)</code>. | ||
=== Arguments === | === Arguments === | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
| Line 117: | Line 118: | ||
|techt=- | |techt=- | ||
|purp=The character to animate. | |purp=The character to animate. | ||
}} | |||
{{ArgRow | |||
|name=anim | |name=anim | ||
|type=String | |type=String | ||
| Line 131: | Line 132: | ||
DUNGEON:CharStartAnim(player, anim) | DUNGEON:CharStartAnim(player, anim) | ||
</pre> | </pre> | ||
| Line 203: | Line 205: | ||
|purp=End X position in pixels | |purp=End X position in pixels | ||
}} | }} | ||
{{ArgRow | |||
|name=yTo | |name=yTo | ||
|type=Integer | |type=Integer | ||
| Line 218: | Line 220: | ||
{| class="wikitable" | {| class="wikitable" | ||
{{ArgHeader}} | {{ArgHeader}} | ||
{{ArgRow | |||
|name=anim | |name=anim | ||
|type=Animation | |type=Animation | ||
|techt=RogueEssence.Content.BaseAnim | |techt=RogueEssence.Content.BaseAnim | ||
|purp=The animation to play. | |purp=The animation to play. | ||
}} | |||
{{ArgRow | |||
|name=layer | |name=layer | ||
|type=Layer | |type=Layer | ||
|techt=RogueEssence.Content.DrawLayer | |techt=RogueEssence.Content.DrawLayer | ||
|purp=The layer to draw. | |purp=The layer to draw. | ||
}} | |||
|} | |} | ||
| Line 240: | Line 242: | ||
{| class="wikitable" | {| class="wikitable" | ||
{{ArgHeader}} | {{ArgHeader}} | ||
{{ArgRow | |||
|name=mover | |name=mover | ||
|type=Screen Mover | |type=Screen Mover | ||
|techt=DUNGEON:MoveScreen(RogueEssence.Content.ScreenMover) | |techt=DUNGEON:MoveScreen(RogueEssence.Content.ScreenMover) | ||
|purp=The screen mover. | |purp=The screen mover. | ||
}} | |||
|} | |} | ||
Latest revision as of 19:56, 18 January 2026
The dungeon functions involve actions that are performed within dungeons.
CharTurnToChar
Makes a character turn to face another.
Arguments
Argument order is DUNGEON:CharTurnToChar(curch, turnto).
| Name | Type | Technical Type | Purpose |
|---|---|---|---|
| curch | Dungeon Character | RogueEssence.Dungeon.Character | The character that will turn. |
| turnto | Dungeon Character | RogueEssence.Dungeon.Character | The character being turned to. |
LastDungeonResult
Gets the result of the last dungeon adventure. Takes no arguments.
Usage
DungeonCurrentFloor
Returns the floor number of the current dungeon. Takes no arguments.
Usage
DungeonAssetName
Returns the internal name for the current dungeon. Takes no arguments.
Usage
DungeonDisplayName
Returns the localized name of the current dungeon. Takes no arguments.
Usage
CharSetEmote
Set a character's emote in a dungeon map. Argument order is DUNGEON:CharSetEmote(chara, emoteID, cycles).
Arguments
| Name | Type | Technical Type | Purpose |
|---|---|---|---|
| chara | Dungeon Character | RogueEssence.Dungeon.Character | Character to emote |
| emoteID | String | System.String | ID of the emote |
| emoteID | Integer | System.Int32 | The number of times to play the emote. |
CharStartAnim
Set a character's animation. Argument order is DUNGEON:CharStartAnim(chara, emoteID, doLoop)
Arguments
| Name | Type | Technical Type | Purpose |
|---|---|---|---|
| chara | Dungeon Character | RogueEssence.Dungeon.Character | Character to animate |
| emoteID | String | System.String | Name of the animation |
| doLoop | Boolean | System.Bool | Whether to loop the animation |
Example
DUNGEON:CharStartAnim(player, anim, false)
CharEndAnim
Stops a character's current animation, reverting them to default idle. Usage is DUNGEON:CharEndAnim(chara).
Arguments
| Name | Type | Technical Type | Purpose |
|---|---|---|---|
| chara | Dungeon Character | RogueEssence.Dungeon.Character | Character to stop animating |
Example
DUNGEON:CharEndAnim(player)
CharWaitAnim
Set a character's animation, and waits until it completed before continue. Usage is CharWaitAnim(chara, anim).
Arguments
| Name | Type | Technical Type | Purpose |
|---|---|---|---|
| chara | Character | -
|
The character to animate. |
| anim | String | -
|
The string name of the animation. |
Example
DUNGEON:CharStartAnim(player, anim)
PlayVFX
Plays a VFX in the dungeon map. Usage is DUNGEON:PlayVFX(emitter, x, y, dir).
Arguments
| Name | Type | Technical Type | Purpose |
|---|---|---|---|
| emitter | Emitter | RogueEssence.Content.FiniteEmitter
|
The VFX emitter |
| X | Integer | System.Int32
|
X Position in pixels |
| Y | Integer | System.Int32
|
Y Position in pixels |
| dir | Direction | RogueElements.Dir8
|
Direction to orient the VFX, defaults to Down |
PlayVFX
Plays a VFX that has a start position and an end position. It uses a finite emitter that generates BaseAnims. Argument order is DUNGEON:PlayVFX(emitter, x, y, dir, xTo, yTo).
Arguments
| Name | Type | Technical Type | Purpose |
|---|---|---|---|
| emitter | Emitter | RogueEssence.Content.FiniteEmitter
|
The VFX emitter |
| x | Integer | System.Int32
|
Start X position in pixels |
| y | Integer | System.Int32
|
Start Y Position in pixels |
| dir | Direction | RogueElements.Dir8
|
Direction to orient the VFX, defaults to Down. |
| xTo | Integer | System.Int32
|
End X position in pixels |
| yTo | Integer | System.Int32
|
End Y Position in pixels |
PlayVFXAnim
Plays a VFX using just a BaseAnim. Argument order is DUNGEON:PlayVFXAnim(anim, layer).
Arguments
| Name | Type | Technical Type | Purpose |
|---|---|---|---|
| anim | Animation | RogueEssence.Content.BaseAnim
|
The animation to play. |
| layer | Layer | RogueEssence.Content.DrawLayer
|
The layer to draw. |
MoveScreen
Plays a screen-moving effect. Argument order is DUNGEON:MoveScreen(mover).
Arguments
| Name | Type | Technical Type | Purpose |
|---|---|---|---|
| mover | Screen Mover | DUNGEON:MoveScreen(RogueEssence.Content.ScreenMover)
|
The screen mover. |
