Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11

Thread: help out with this script please

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Banned
    Join Date
    Nov 2016
    Location
    :noitacoL
    Posts
    968

    help out with this script please

    how do i make a NPC move forward and move back?

    i tried
    setcharani ("walk",NULL) ;

    aaand it doesnt walk but does the animation

  2. #2
    cat supremacist Lieutenant
    Join Date
    Jul 2016
    Location
    Melbourne
    Posts
    907
    temp.a = this.x
    temp.b = this.y
    Incrementing this.x makes it go horizontally sideways
    Incrementing this.y makes it go vertically upwards / downwards
    Put it in a loop that increments the x / y value.
    Don't forget to put the gani in the loop as well.
    For style points,make sure the npc is facing the right direction.
    Last edited by leaf me alone; 01-25-2017 at 01:58 AM.

  3. #3
    Banned
    Join Date
    Nov 2016
    Location
    :noitacoL
    Posts
    968
    Quote Originally Posted by Trav View Post
    temp.x = temp.a
    Put it in a loop that increments the x / y value.
    Don't forget to put the gani in the loop as well.
    thank you trav

  4. #4
    cat supremacist Lieutenant
    Join Date
    Jul 2016
    Location
    Melbourne
    Posts
    907
    Quote Originally Posted by Graal Pro View Post
    thank you trav

    Sorry I just realised I wrote it wrong, read it again please.

  5. #5
    Overlord Sottocapo N!chola$'s Avatar
    Join Date
    Jun 2015
    Location
    Canada
    Posts
    4,784
    How do people understand that language????????
    Ask me anything and ill try my best to answer

  6. #6
    Banned
    Join Date
    Nov 2016
    Location
    :noitacoL
    Posts
    968
    Quote Originally Posted by NicholasGraalOnlineEra View Post
    How do people understand that language????????
    It's easy.
    In real life, to say tell somebody to change their body you say "change your body" but in Graal, you say "this.body = "body_nicholas.png" ;

    I don't really recommend help from others, but ask when you need to.

    What I recommend is to become a admin on a Dev. Server on PW and Press F9 or type /NPC and then press on the NPC's and examine them, add a new NPC and script it. You will remember it.


    And trav, thank you. I haven't been able to check it out because my laptop screen is black but turns on eh..

  7. #7
    Overlord Sottocapo N!chola$'s Avatar
    Join Date
    Jun 2015
    Location
    Canada
    Posts
    4,784
    Quote Originally Posted by Graal Pro View Post
    It's easy.
    In real life, to say tell somebody to change their body you say "change your body" but in Graal, you say "this.body = "body_nicholas.png" ;

    I don't really recommend help from others, but ask when you need to.

    What I recommend is to become a admin on a Dev. Server on PW and Press F9 or type /NPC and then press on the NPC's and examine them, add a new NPC and script it. You will remember it.


    And trav, thank you. I haven't been able to check it out because my laptop screen is black but turns on eh..
    Oh, alright
    Ask me anything and ill try my best to answer

  8. #8
    Veteran Soma's Avatar
    Join Date
    Sep 2017
    Location
    Carlsbad
    Posts
    101
    So, does scripting take more of the Java side or C++ side? I want to learn but I want to learn one programming language at a time.

  9. #9
    Crow Greeze's Avatar
    Join Date
    Jul 2013
    Location
    Countryside
    Posts
    2,374
    Quote Originally Posted by Soma View Post
    So, does scripting take more of the Java side or C++ side? I want to learn but I want to learn one programming language at a time.
    GScript2 isn't the same as any of those, it's its own thing really.

    Click here for my Levels Thread

    Join the fun on Era-go.com today

  10. #10
    Not Actually Banned Yet Bulletzone's Avatar
    Join Date
    Apr 2015
    Location
    United Kingdom
    Posts
    2,849
    Quote Originally Posted by Soma View Post
    So, does scripting take more of the Java side or C++ side? I want to learn but I want to learn one programming language at a time.
    If you can do Python or Java (imo) You shouldn't find GS2 hard at all. Concept remains the same, just functions will change.

    Sent from my SM-A520F using Tapatalk
    "A fool thinks they know everything but a wise person knows there's something to learn from everyone"
    -
    "Great leaders don't complain about the tools they are given. They work to sharpen them"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •