Forum rules - please read before posting.

Request: "Is Random" path doesn't start on 0?

Hey there,
This is a pretty mundane request but I was wondering if it were possible for the "Is Random" option on Paths to get NPCs to start at a random point instead of node 0? At the moment if all the NPCs are set to that path, everyone goes to point 0 which causes clutterups and then they all go off to the random points like wanted. I could make several different paths and change the node 0 to different places and randomize which NPC uses which path but that's just more work for the computer and for me lol...it would be easier if they just automatically went off in different places on start.

Let me know what you think!
Thank you! :)

Comments

  • A fair request, I'll look into it.

    Incidentally, a custom "NPC wander" Action can be found on the wiki here.
  • edited April 2018
    Hi Chris,
    Thanks so much for that, I had no idea it existed lol.
    One issue I'm having is the fact it's rerouting itself every 4 seconds exactly. After about 10-15 seconds of gameplay it freezes while rereouting to the point where the whole game stops and I have to close Unity and start again.
    https://imgur.com/5jOAgvo

    Basically after everyone is added and spawned to their markers, the 3 characters in the scene use that custom walking action, but stop after their first route so I have to use the Engine: Wait for 3 seconds (so it looks like they've stopped to think).
    Then after the 3 seconds are up, it's repeated from 'Run in parallel' so they all walk off somewhere else again (so they are endlessly walking then pausing and walking again).

    I've tried the actionlist both with run in background and pause gameplay but it's still rerouting 4 seconds after beginning their new route. I think it's an overload of rerouting of some kind.

  • The ActionList: Run in parallel Action causes all Action chains it connects with to run at the same time - so your character is being commanded to move to three random points simultaneously.

    Replace the Action with a Variable: Check random number.  Also, I managed to sneak in the above request into the latest bugfix release.
  • edited April 2018
    Hey Chris. I'm having this weird problem with Object reference not set to an instance of an object:
    https://imgur.com/a/2ORil
    It worked again when starting the game once out of my many tries, then I stopped and started it and the error is being thrown with all the characters stuck after their first route again. Then I stopped and started it and it works again. It's very temperamental but 90% of the time it throws the error and stops routing. What's going on? :/

    and thanks so much for adding the request to the bugfix. You're awesome! :)

    Edit: It seems to work fine if I build/compile the game and play it standalone which is odd lol
  • I've updated the wiki script, see if it works now.
  • Ahhh you're amazing Chris, thanks so much, honestly.
  • Hey, I didn't want to make another thread to clog up the forum so soon after this thread was made, but for the wandering script, is it possible to get them to...stop wandering? Like how 'move along path' has a stop walking method? When I approach them and do a talking interaction they just kinda wander off lol
  • Use the Character: Move along path Action, and set the Method to Stop Moving.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.