Is lesson 5 code example still works?

Pretty much my question is above. Im working my way to learn how to code with verse from fresh start but when I try to run the example code on Lesson 5 practice Time!. My character is not taking the 50 damage. Is there is any sort of update that the code no longer work or what I am missing?

I made sure to respect the places (Tab button) where the code sould be so it can run like the example, and also I made few adjustments like some youtube videos that seems that it went successful, but still Im not getting the results so I am stuck with the Lesson 5 example:

using { /Fortnite.com/Devices }
using { /Fortnite.com/Characters }
using { /Fortnite.com/Playspaces }
using { /Verse.org/Simulation }
using { /Verse.org/Verse }

hello_world_device := class(creative_device):

# Runs when the device is started in a running game
OnBegin<override>()<suspends>:void=

    Playspace: fort_playspace = GetPlayspace()
    AllPlayers: []player = Playspace.GetPlayers()
    if (FirstPlayer : player = AllPlayers[0]):
        if (FortniteCharacter : fort_character = FirstPlayer.GetFortCharacter[]):
            FortniteCharacter.Damage(50.0)

Im using Visual Studio for this as offered to install by the UEFN platform. If the example is confusing you can refer to the lesson 5 practice time page. I dont know how to clip a picture in the computer Im using right now since is too old (this is not the one Im using for Visual studio nor UEFN, this is and old 2017 Pc windows 7, the one Im using it actually a gaming PC so its really up to date)

2 Likes

I was able to get this code to work within a new project - not sure if something else I had done in that file OR if the initial “My first device” template was blocking the damage effect. But I would open a new blank map and try it there.

I am having the same issue, I followed the instructions exactly and when that didn’t work even replaced it with the finished code provided in the tutorial and still nothing. A lot of these tutorials seem to be out-of-date or the code provided just straight up does not work, I experienced a similar issue when going through the pizza delivery game tutorial.

Had the same problem. As @Tonu_chi suggested, I made a new level dragged my device in and the code ran fine.

1 Like

Thanks a lot that actually worked!. @Mezcalamari Follow @JackWilMPG and Tonu_chi steps. It actually worked :+1: . It seems like a glitch.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.