Can I use wander?

SLOCM3ZSLOCM3Z Member Posts: 797
edited December 2014 in Working with GS (PC)

I was building my game the other day and was wondering if there is a way to make a npc(non-playing character) wander around and throw things like grenades. Anything to the effect of wander would be great. Thanks

Comments

  • AlchimiaStudiosAlchimiaStudios Member Posts: 1,069

    Sure you can B)

    Wander is just a word though... When you go to approach the system you'll want to think more about the specifics. Such as does it wander on just x or x+y. Is it 100% random, or does it need to be within certain positions or constraints, how often does it change directions, how often does it throw grenades, is there a follow like state, or just wander, etc.

    Follow us: Twitter - Website

  • SLOCM3ZSLOCM3Z Member Posts: 797

    Thanks for the help :D

  • SLOCM3ZSLOCM3Z Member Posts: 797

    I can use a timer for the grenades(hopefully)

  • SocksSocks London, UK.Member Posts: 12,822
    edited December 2014

    @jdlcrater said:

    Like @AlchimiaStudios says it's not clear what you want, 'wander around' could mean anything.

  • SLOCM3ZSLOCM3Z Member Posts: 797

    Okay. So, I could use timers that change linear.velocity.x. But I understand that it NEEDS to be thought through thoroughly.

  • SLOCM3ZSLOCM3Z Member Posts: 797
    edited December 2014

    And I understand that 'wander' can mean anything

  • SLOCM3ZSLOCM3Z Member Posts: 797

    Thanks for the help :smiley:

  • AlchimiaStudiosAlchimiaStudios Member Posts: 1,069

    @jdlcrater said:
    Okay. So, I could use timers that change linear.velocity.x. But I understand that it NEEDS to be thought through thoroughly.

    Yes that's a start, you're on the right track I think. Timers and the various "movement" methods (interpolate, move to, move, accelerate, etc) are probably the simplest implementation for this.

    Follow us: Twitter - Website

  • SLOCM3ZSLOCM3Z Member Posts: 797

    Sweet. I never thought making a video game would be this "easy"(it is not "easy", just a lot easier than writing and learning the actual code).

  • SLOCM3ZSLOCM3Z Member Posts: 797

    Thanks a bunch :wink:

Sign In or Register to comment.