Scene Graph, GetPlayspace.GetPlayers()

Is there something like GetPlayspace.GetPlayers() available in SceneGraph? Using the previous code generates this error:

This function parameter expects a value of type tuple(creative_object_interface,tuple(),tuple()), but this argument is an incompatible value of type tuple(YLookAt,tuple(),tuple()).

Cheers!

I haven’t tested it yet but i saw a GetPlayspaceForEntity function that returns a playspace in the digest so maybe you could try that

1 Like

Thanks for the response! It’s not working yet, I’ll dig into this some more. Really appreciate the help!

Cheers!

Thanks for putting me onto a solution!

var Players : []player = array{}
    var Playspace :? fort_playspace = false

    OnBeginSimulation<override>():void =
        #Use this to set up TickEvent callbacks or other setup that must be guaranteed to complete immediately. 
        (super:)OnBeginSimulation()

        set Playspace = option { Entity.GetPlayspaceForEntity[] }
        if(PS := Playspace?):
            set Players = PS.GetPlayers()
1 Like

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