# Verse

**URL:** https://forums.unrealengine.com/c/development-discussion/programming-scripting/verse/196.md?page=42

[Latest](https://forums.unrealengine.com/latest.md) · [Categories](https://forums.unrealengine.com/categories.md) · [Tags](https://forums.unrealengine.com/tags.md)

**Page:** 43

---

## [Bug: Code compilation not equivalent](https://forums.unrealengine.com/t/bug-code-compilation-not-equivalent/1193541)

<div class="topic-metadata">

**Author:** [@Sanx42](https://forums.unrealengine.com/u/Sanx42)\
**Replies:** 1\
**Last updated:** [June 9, 2023, 1:15pm UTC](https://forums.unrealengine.com/t/bug-code-compilation-not-equivalent/1193541 "2023-06-09T13:15:23Z")

</div>

This compiles and behaves properly LongPause := logic{GetRandomInt(0, 2) = 0}; var Delay:float = DelayBetweenRounds; var Message:message = EndMessage(RoundCount); if (LongPause?): set Message = En…

---

## [using more than one spawner](https://forums.unrealengine.com/t/using-more-than-one-spawner/1192618)

<div class="topic-metadata">

**Author:** [@Redex](https://forums.unrealengine.com/u/Redex)\
**Replies:** 2\
**Last updated:** [June 8, 2023, 1:06pm UTC](https://forums.unrealengine.com/t/using-more-than-one-spawner/1192618 "2023-06-08T13:06:02Z")

</div>

I’m new to map creating and Verse. I saw a video to get the code to make character invisible when they crouch. My issue is I can only do one spawning pad. I’d like to be able to use multiple spawning pads. What would be …

---

## [When to use \<transacts\> specifier?](https://forums.unrealengine.com/t/when-to-use-transacts-specifier/1155825)

<div class="topic-metadata">

**Author:** [@poltrr](https://forums.unrealengine.com/u/poltrr)\
**Replies:** 6\
**Last updated:** [June 7, 2023, 4:25pm UTC](https://forums.unrealengine.com/t/when-to-use-transacts-specifier/1155825 "2023-06-07T16:25:59Z")

</div>

Hi, I have a problem understanding when the specifier should be used. How do I know if the behavior inside a function can be rolled back or not? For example, according to the docs: The transacts effect is required an…

---

## [How can you store update the player list if a player joins the game?](https://forums.unrealengine.com/t/how-can-you-store-update-the-player-list-if-a-player-joins-the-game/1115889)

<div class="topic-metadata">

**Author:** [@davidpkami](https://forums.unrealengine.com/u/davidpkami)\
**Replies:** 5\
**Last updated:** [June 6, 2023, 7:23pm UTC](https://forums.unrealengine.com/t/how-can-you-store-update-the-player-list-if-a-player-joins-the-game/1115889 "2023-06-06T19:23:48Z")

</div>

Hi! I have this code for a Gun Game: InitPlayers\<public\>(Agent : ?agent) : void = AllPlayers := GetPlayspace().GetPlayers() for (Player : AllPlayers, FortCharacter := Player.GetFortCharacter\[\]): …

---

## [How to create and use a module in Verse?](https://forums.unrealengine.com/t/how-to-create-and-use-a-module-in-verse/1154823)

<div class="topic-metadata">

**Author:** [@poltrr](https://forums.unrealengine.com/u/poltrr)\
**Replies:** 10\
**Last updated:** [June 6, 2023, 2:14am UTC](https://forums.unrealengine.com/t/how-to-create-and-use-a-module-in-verse/1154823 "2023-06-06T02:14:09Z")

</div>

Hi, I’d love to use modules to structure and logically group my scripts/classes. But I can’t seem to understand how to reference modules. According to the docs, I can create a module by: Creating a folder. Creating a…

---

## [How to change pickaxe damage to environment?](https://forums.unrealengine.com/t/how-to-change-pickaxe-damage-to-environment/1188042)

<div class="topic-metadata">

**Author:** [@Em\_Ce92](https://forums.unrealengine.com/u/Em_Ce92)\
**Replies:** 2\
**Last updated:** [June 5, 2023, 8:18pm UTC](https://forums.unrealengine.com/t/how-to-change-pickaxe-damage-to-environment/1188042 "2023-06-05T20:18:53Z")

</div>

How can I change my pickaxe damage? We are talking about damage dealt to elements of the environment. I looked through all available options in IslandSettings and found nothing that would help me. Or maybe it will be ea…

---

## [Verse - Bug about "false type"](https://forums.unrealengine.com/t/verse-bug-about-false-type/1182988)

<div class="topic-metadata">

**Author:** [@t.tutiya](https://forums.unrealengine.com/u/t.tutiya)\
**Replies:** 5\
**Last updated:** [June 2, 2023, 9:45pm UTC](https://forums.unrealengine.com/t/verse-bug-about-false-type/1182988 "2023-06-02T21:45:56Z")

</div>

The following code will result in a compile error func(:any) : false = false This function returns a value of type false, but the function body's result is an incompatible value of type logic.(3510) Possible bugs a…

---

## [How to add unit tests for verse code](https://forums.unrealengine.com/t/how-to-add-unit-tests-for-verse-code/1187146)

<div class="topic-metadata">

**Author:** [@latundaPC](https://forums.unrealengine.com/u/latundaPC)\
**Replies:** 1\
**Last updated:** [June 2, 2023, 11:03pm UTC](https://forums.unrealengine.com/t/how-to-add-unit-tests-for-verse-code/1187146 "2023-06-02T23:03:41Z")

</div>

How can we cover code in our devices with unit-tests? How can we run tests?

---

## [Is there an equivalent of the "this" pointer in Verse?](https://forums.unrealengine.com/t/is-there-an-equivalent-of-the-this-pointer-in-verse/1186200)

<div class="topic-metadata">

**Author:** [@alk3ovation](https://forums.unrealengine.com/u/alk3ovation)\
**Replies:** 2\
**Last updated:** [June 2, 2023, 7:23pm UTC](https://forums.unrealengine.com/t/is-there-an-equivalent-of-the-this-pointer-in-verse/1186200 "2023-06-02T19:23:31Z")

</div>

I have a device that I want to subscribe to another classes’ callback. In order to be able to unsubscribe that class later, I’d like to pass it as a comparable to the class on subscription. I tried using “this” and “self…

---

## [How do I make a monster like in the survive the wassermann (its attacks and its movement).](https://forums.unrealengine.com/t/how-do-i-make-a-monster-like-in-the-survive-the-wassermann-its-attacks-and-its-movement/1186341)

<div class="topic-metadata">

**Author:** [@NovaStudios23](https://forums.unrealengine.com/u/NovaStudios23)\
**Replies:** 1\
**Last updated:** [June 2, 2023, 7:11am UTC](https://forums.unrealengine.com/t/how-do-i-make-a-monster-like-in-the-survive-the-wassermann-its-attacks-and-its-movement/1186341 "2023-06-02T07:11:12Z")

</div>

How can I create a smooth walk, dash, and attacking animation like Axel did in his game (maybe a bit better too :disguised\_face:)

---

## [Why is this "for" loop returning \[ \]void?](https://forums.unrealengine.com/t/why-is-this-for-loop-returning-void/1184922)

<div class="topic-metadata">

**Author:** [@OB1\_canbeno](https://forums.unrealengine.com/u/OB1_canbeno)\
**Replies:** 8\
**Last updated:** [June 2, 2023, 12:21am UTC](https://forums.unrealengine.com/t/why-is-this-for-loop-returning-void/1184922 "2023-06-02T00:21:48Z")

</div>

I wanted a \[ \]creative\_prop, but somehow I made a \[ \]void from the following snippet # Let's try to get an array of 4 creative\_props (from 4 spawns) PropsList: \[\]creative\_prop = for (N:=0..3): MaybeProp := S…

---

## [Types prefixed by a ?](https://forums.unrealengine.com/t/types-prefixed-by-a/1184659)

<div class="topic-metadata">

**Author:** [@OB1\_canbeno](https://forums.unrealengine.com/u/OB1_canbeno)\
**Replies:** 1\
**Last updated:** [May 31, 2023, 3:13pm UTC](https://forums.unrealengine.com/t/types-prefixed-by-a/1184659 "2023-05-31T15:13:57Z")

</div>

In various snippets of Verse code I’ve seen formal argument and return value types prefixed with a question mark. E.g. ?creative\_prop in SpawnProp. I cannot find out what it means. Firstly please tell me, and secondly ca…

---

## [Random dungeon generation occasionally has rooms missing](https://forums.unrealengine.com/t/random-dungeon-generation-occasionally-has-rooms-missing/1172087)

<div class="topic-metadata">

**Author:** [@limes](https://forums.unrealengine.com/u/limes)\
**Replies:** 8\
**Last updated:** [May 27, 2023, 5:54pm UTC](https://forums.unrealengine.com/t/random-dungeon-generation-occasionally-has-rooms-missing/1172087 "2023-05-27T17:54:36Z")

</div>

I am making a device that generates a dungeon, and every few generations, one or more rooms will not be teleported to the locations even though the output log says what room is supposed to be there. The red line repr…

---

## [Retain Cycles in Verse](https://forums.unrealengine.com/t/retain-cycles-in-verse/1178264)

<div class="topic-metadata">

**Author:** [@spentak](https://forums.unrealengine.com/u/spentak)\
**Replies:** 4\
**Last updated:** [May 26, 2023, 4:22am UTC](https://forums.unrealengine.com/t/retain-cycles-in-verse/1178264 "2023-05-26T04:22:18Z")

</div>

Do we need to worry about retain cycles in Verse? ie (weak vs strong) ie Each custom player class manages its own events, but sometimes the “game manager” device needs to know about those events. Easy enough to throw …

---

## [\[BUG\] Multiline operator concatenation is being ignored](https://forums.unrealengine.com/t/bug-multiline-operator-concatenation-is-being-ignored/1162194)

<div class="topic-metadata">

**Author:** [@Knight\_Breaker](https://forums.unrealengine.com/u/Knight_Breaker)\
**Replies:** 2\
**Last updated:** [May 25, 2023, 6:16am UTC](https://forums.unrealengine.com/t/bug-multiline-operator-concatenation-is-being-ignored/1162194 "2023-05-25T06:16:48Z")

</div>

I’m writing the code snippet from memory, so I apologize if it does not properly compile. As far as I remember I run multiple times into this odd issue. In my codebases I set a fixed line width of 100 characters and star…

---

## [Verse: How the get the team of the eliminating player ?](https://forums.unrealengine.com/t/verse-how-the-get-the-team-of-the-eliminating-player/1173650)

<div class="topic-metadata">

**Author:** [@\_MMB](https://forums.unrealengine.com/u/_MMB)\
**Replies:** 5\
**Last updated:** [May 24, 2023, 3:40pm UTC](https://forums.unrealengine.com/t/verse-how-the-get-the-team-of-the-eliminating-player/1173650 "2023-05-24T15:40:57Z")

</div>

Hello, i tried really hard and watched tutorial for hours but am still a beginner and I don’t find a way to get the team of the eliminating player. Can you please help me? This is my code so far: AllPlayers := GetPlay…

---

## [Iterate through custom map does not work](https://forums.unrealengine.com/t/iterate-through-custom-map-does-not-work/1170524)

<div class="topic-metadata">

**Author:** [@CascadeSolutions](https://forums.unrealengine.com/u/CascadeSolutions)\
**Replies:** 2\
**Last updated:** [May 23, 2023, 12:22pm UTC](https://forums.unrealengine.com/t/iterate-through-custom-map-does-not-work/1170524 "2023-05-23T12:22:55Z")

</div>

I have a class called “gungame\_player” This class has an Attribute “Name” gungame\_player\<public\> := class(): var Score : int = 0 var Setbacks : int = 0 var Kills : int = 0 var Killstreak : int = 0 v…

---

## [Is it possible to add DYNAMIC messages in the status line (where eliminations are logged during the game and messages like player landed a bottle flip)](https://forums.unrealengine.com/t/is-it-possible-to-add-dynamic-messages-in-the-status-line-where-eliminations-are-logged-during-the-game-and-messages-like-player-landed-a-bottle-flip/1173284)

<div class="topic-metadata">

**Author:** [@latundaPC](https://forums.unrealengine.com/u/latundaPC)\
**Replies:** 1\
**Last updated:** [May 22, 2023, 8:15pm UTC](https://forums.unrealengine.com/t/is-it-possible-to-add-dynamic-messages-in-the-status-line-where-eliminations-are-logged-during-the-game-and-messages-like-player-landed-a-bottle-flip/1173284 "2023-05-22T20:15:43Z")

</div>

It seems if I use elimination feed device, I can only substitute {PlayerName} is dynamic custom message on the roadmap? Use case: Player only has 10 uses for a weapon Each time the weapon is used, the feed should hav…

---

## [Any way to slice a string by index?](https://forums.unrealengine.com/t/any-way-to-slice-a-string-by-index/1169221)

<div class="topic-metadata">

**Author:** [@rootVIII](https://forums.unrealengine.com/u/rootVIII)\
**Replies:** 2\
**Last updated:** [May 22, 2023, 12:13pm UTC](https://forums.unrealengine.com/t/any-way-to-slice-a-string-by-index/1169221 "2023-05-22T12:13:21Z")

</div>

Does Verse support any way to slice a string? For example in Python and Javascript \>\>\> item = 'string here' \>\>\> item\[2:\] 'ring here' \> const item = 'string here' \> item.slice(2) 'ring here' I am able to do something …

---

## [Question on Copying Variables](https://forums.unrealengine.com/t/question-on-copying-variables/1170452)

<div class="topic-metadata">

**Author:** [@PiEqualsThree3](https://forums.unrealengine.com/u/PiEqualsThree3)\
**Replies:** 2\
**Last updated:** [May 21, 2023, 10:35am UTC](https://forums.unrealengine.com/t/question-on-copying-variables/1170452 "2023-05-21T10:35:24Z")

</div>

Do variables create shallow, or deep copies when assigning one to another? Moreover, what is the behavior with arrays when assigning an array to another array. Lastly, is there any way to modify this behavior? (Create sh…

---

## [The array of user devices is working with an error.](https://forums.unrealengine.com/t/the-array-of-user-devices-is-working-with-an-error/1171070)

<div class="topic-metadata">

**Author:** [@sovestfn](https://forums.unrealengine.com/u/sovestfn)\
**Replies:** 3\
**Last updated:** [May 20, 2023, 1:47pm UTC](https://forums.unrealengine.com/t/the-array-of-user-devices-is-working-with-an-error/1171070 "2023-05-20T13:47:00Z")

</div>

There is a user device (right\_coord\_4\_switch), when placing it, we can specify a sequence of numbers (in the form of an array): We place several such devices on the map and indicate different sequences of numbers: …

---

## [Verse code that causes the editor to crash](https://forums.unrealengine.com/t/verse-code-that-causes-the-editor-to-crash/1158461)

<div class="topic-metadata">

**Author:** [@t.tutiya](https://forums.unrealengine.com/u/t.tutiya)\
**Replies:** 2\
**Last updated:** [May 18, 2023, 1:56am UTC](https://forums.unrealengine.com/t/verse-code-that-causes-the-editor-to-crash/1158461 "2023-05-18T01:56:13Z")

</div>

Hi. I encountered the following bug while writing the code for Verse. I would appreciate it if you could tell me which is the best place to submit a bug report about Verse, “Issues and Bug Reporting” or here.

---

## [Events in Verse Pattern](https://forums.unrealengine.com/t/events-in-verse-pattern/1166748)

<div class="topic-metadata">

**Author:** [@alk3ovation](https://forums.unrealengine.com/u/alk3ovation)\
**Replies:** 3\
**Last updated:** [May 17, 2023, 7:19am UTC](https://forums.unrealengine.com/t/events-in-verse-pattern/1166748 "2023-05-17T07:19:13Z")

</div>

Hello! I wanted to confirm that this pattern I’m using in Verse is the expected pattern to use for events and to see if there are any other people using events differently. I’m used to be able to create events more simi…

---

## [Has anyone successfully written a failable function in Verse?](https://forums.unrealengine.com/t/has-anyone-successfully-written-a-failable-function-in-verse/1160379)

<div class="topic-metadata">

**Author:** [@alk3ovation](https://forums.unrealengine.com/u/alk3ovation)\
**Replies:** 8\
**Last updated:** [May 15, 2023, 10:02am UTC](https://forums.unrealengine.com/t/has-anyone-successfully-written-a-failable-function-in-verse/1160379 "2023-05-15T10:02:06Z")

</div>

I copy and pasted the example code from the functions doc: Find(X:\[\]int, F(:int)\<decides\>:void)\<decides\>:int = for (Y:X, F(Y)): return Y false? This doesn’t compile because it complains about returning …

---

## [Access device components in verse script](https://forums.unrealengine.com/t/access-device-components-in-verse-script/1163347)

<div class="topic-metadata">

**Author:** [@Mapshot\_Agency](https://forums.unrealengine.com/u/Mapshot_Agency)\
**Replies:** 3\
**Last updated:** [May 15, 2023, 7:38am UTC](https://forums.unrealengine.com/t/access-device-components-in-verse-script/1163347 "2023-05-15T07:38:39Z")

</div>

Hi, I’m trying to spawn given meshes and have them move towards an endpoint. I have the spawning and moving logic working but I wanted to define the startpoint and endpoint by adding simple cube staticmeshes onto the de…

---

## [I want to set the player's attack power to 0.](https://forums.unrealengine.com/t/i-want-to-set-the-players-attack-power-to-0/1158321)

<div class="topic-metadata">

**Author:** [@\_SAPO](https://forums.unrealengine.com/u/_SAPO)\
**Replies:** 6\
**Last updated:** [May 15, 2023, 2:15am UTC](https://forums.unrealengine.com/t/i-want-to-set-the-players-attack-power-to-0/1158321 "2023-05-15T02:15:07Z")

</div>

I want to set the attack power of players within a certain area to 0. Since using the “Damage Amplifier Powerup” causes a glowing effect on the player and there doesn’t seem to be a way to remove that effect at the momen…

---

## [UEFN: Verse: Epic tutorial uses 'race' but results in error (search\_and\_destroy example)](https://forums.unrealengine.com/t/uefn-verse-epic-tutorial-uses-race-but-results-in-error-search-and-destroy-example/1165792)

<div class="topic-metadata">

**Author:** [@BenjaminYde](https://forums.unrealengine.com/u/BenjaminYde)\
**Replies:** 1\
**Last updated:** [May 14, 2023, 11:53pm UTC](https://forums.unrealengine.com/t/uefn-verse-epic-tutorial-uses-race-but-results-in-error-search-and-destroy-example/1165792 "2023-05-14T23:53:01Z")

</div>

Im following the UEFN tutorial on how to make the search\_and\_destroy example. When I get to the part of using the race concepts I keep getting errors. I don’t know what I am doing wrong? Im using UEFN 5.1.1 Error 1: …

---

## [How to choose rotation between imported library](https://forums.unrealengine.com/t/how-to-choose-rotation-between-imported-library/1164626)

<div class="topic-metadata">

**Author:** [@AddisonV](https://forums.unrealengine.com/u/AddisonV)\
**Replies:** 2\
**Last updated:** [May 14, 2023, 9:59pm UTC](https://forums.unrealengine.com/t/how-to-choose-rotation-between-imported-library/1164626 "2023-05-14T21:59:51Z")

</div>

Apparently I have two options for Rotation available since I imported the ‘/UnrealEngine.com/Temporary/SpatialMath’ library, and I need it for something else in my code, but now I can’t use the normal rotation that I …

---

## [UEFN Incomplete code](https://forums.unrealengine.com/t/uefn-incomplete-code/1165570)

<div class="topic-metadata">

**Author:** [@Ampharel](https://forums.unrealengine.com/u/Ampharel)\
**Replies:** 0\
**Last updated:** [May 14, 2023, 4:36pm UTC](https://forums.unrealengine.com/t/uefn-incomplete-code/1165570 "2023-05-14T16:36:03Z")

</div>

I’ve noticed that a lot of the devices available using Verse are missing a bunch of features in their code, compared with their behaviour in the editor. An example of this is the Guard spawner, which will have a multitu…

---

## [\[FEATURE REQUEST\] \`guard\` statement](https://forums.unrealengine.com/t/feature-request-guard-statement/1162211)

<div class="topic-metadata">

**Author:** [@Knight\_Breaker](https://forums.unrealengine.com/u/Knight_Breaker)\
**Replies:** 3\
**Last updated:** [May 13, 2023, 9:37pm UTC](https://forums.unrealengine.com/t/feature-request-guard-statement/1162211 "2023-05-13T21:37:41Z")

</div>

Verse shipped with an if statement / expression, but it’s quickly becomes apparent that the languages often times suffers from the great pyramid of doom phenomenon. if (...) { if (...) { if(...) { ... } …

[Previous page](https://forums.unrealengine.com/c/development-discussion/programming-scripting/verse/196.md?page=41)

[Next page](https://forums.unrealengine.com/c/development-discussion/programming-scripting/verse/196.md?page=43)
