Quantcast
Channel: General - Epic Developer Community Forums
Viewing all articles
Browse latest Browse all 7390

Verse Internal Error - Sentry - Race

$
0
0

Please select what you are reporting on:

Verse

What Type of Bug are you experiencing?

Stability

Summary

EliminatedEvent.Await() from sentry_device is causing a “VerseRuntimeErrors: Internal error”

Steps to Reproduce

Create a blank map
Add a volume_device
Add a sentry_device and three collectible_object_device inside the volume
Create a new “device” and use the code in the additional comments
Configure the “editables” necessary for the device to function correctly
Start a new game, enter the volume, collect the coins, kill the sentry

Expected Result

The “Completed” variable should be changed to true and so after the race is completed, the check to see if the loop should be stopped occurs, thus ending the game.

Observed Result

When i kill the sentry the VerseRuntimeErrors: Internal error occurs and the rest of the code stops working

Platform(s)

Windows PC

Additional Notes

using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }

CoinsCaptureV3 := class(creative_device):
@editable
Coins:collectible_object_device=array{}
@editable
Sentrys:sentry_device=array{}
@editable
Volumes:volume_device=array{}

var Completed<public>:logic=false

OnBegin<override>()<suspends>:void=    
    loop:      
        race:
            block:
                AwaitVolumeEnter()                                                               
                AwaitEventCoins()  
                AwaitSentrySpawnAndKill()                                                                                                              
            block:
                AwaitVolumeExits()   
        block:
            if(Completed=true):
                Print("Break")
                break
            else:
                Print("Restart")                         
AwaitVolumeEnter()<suspends>:void=      
    if(F_Volume:=Volumes[0]):
        InAgent:=F_Volume.AgentEntersEvent.Await()                 
        if:
            Coin0:=Coins[0]
            Coin1:=Coins[1]
            Coin2:=Coins[2]
        then:
            Coin0.Show()
            Coin1.Show()
            Coin2.Show()      
AwaitEventCoins()<suspends>:void=        
    block:    
        sync:                       
            block:
                if(Coin:=Coins[0]):
                    Coin.CollectedEvent.Await()     
                    Print("Coin 0")                
            block:                                  
                if(Coin1:=Coins[1]):
                    Coin1.CollectedEvent.Await()  
                    Print("Coin 1")  
            block:
                if(Coin2:=Coins[2]):                
                    Coin2.CollectedEvent.Await()  
                    Print("Coin 2")   
AwaitSentrySpawnAndKill()<suspends>:void=
    block:
        block:
            if(Sentry:=Sentrys[0]):            
                Sentry.Spawn()              
                Print("Execution Before EliminatedEvent")  
        block:
            if(Sentry:=Sentrys[0]):                                                           
                Sentry.EliminatedEvent.Await()   #Error
                set Completed=true 
                Print("Completed")                                                                                                                             
AwaitVolumeExits()<suspends>:void=
    if(F_Volume:=Volumes[0]):
        Agent:=F_Volume.AgentExitsEvent.Await()                                                         
            if:
                Coin0:=Coins[0]
                Coin1:=Coins[1]
                Coin2:=Coins[2]
                Sentry:=Sentrys[0]
            then:
                Coin0.Hide()
                Coin1.Hide()                               
                Coin2.Hide()           
                Coin0.Respawn(Agent)   
                Coin1.Respawn(Agent) 
                Coin2.Respawn(Agent)  
                Sentry.DestroySentry()

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 7390

Trending Articles