Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hello Character example crashes in version 4.23 (More templates are crashing) #269

Open
Invius opened this issue Feb 28, 2020 · 0 comments
Open

Comments

@Invius
Copy link

@Invius Invius commented Feb 28, 2020

Trying to play the helloCharacter level, crashes the editor...
After a little bit of debugging the problem lives in this two functions, even spawning only one character, crashes the engine.

function createCharacter() {
        let pos = randomPoint()
        pos.Z += 100

        // All UObject has static function .C({UObject}), which just return its input arg.
        // But *.d.ts has proper type signature for those functions, so we can enjoy
        // auto-completion!
        let character = Character.C(new MyCharacter_C(GWorld,pos))
        character.SpawnDefaultController()

        let controller = AIController.C(character.Controller)

        function wander() {
            controller.MoveToLocation(randomPoint(),-1,true,true,false,false)
        }

        // Move completed?
        controller.ReceiveMoveCompleted.Add( (reqid,status) => {
            wander()
        })

        wander()

        return character
    }

    
    // spawn 20 characters
    let characters = _.range(0,1).map(()=>{
        while (true) {
            try {
                return createCharacter()
            }
            catch (e) {
            }
        }
    })

Edit : After trying this pluggin for 4 hours in the JavascriptPlayground, and testing other examples, i came to the conclusion that without a proper documentation, or functioning examples, its almost impossible to learn this pluggin. For instance, my last test, was to change game mode in the for a simple one in the helloInputbinding level and set the default pawn to custom one, with it i've placed the helloInputBinding script and removed from the level the actor came with it, and the engine crashed.

@Invius Invius changed the title Hello Character example crashes in version 4.23 Hello Character example crashes in version 4.23 (More templates are crashing) Feb 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.