Author Topic: Zelda's Adventure: Solarus Edition  (Read 1128 times)

PhoenixII54

  • Newbie
  • *
  • Posts: 34
    • View Profile
Re: Zelda's Adventure: Solarus Edition
« Reply #60 on: June 14, 2018, 02:33:00 pm »
i think the final problem in your script is that you didn't add the parenthesis around the path data table, and as a consequence the movement:set_path function is not called, resulting in the movement path to not be set at all (note : each path direction is numbered from 0 (east) to 7 (south-east), using the trigonometric rotation (or if you prefer the anti-clockwise rotation))

PS : as max said, using
Code: [Select]
[code= lua]  at start of your code is helpful indeed
« Last Edit: June 14, 2018, 02:36:01 pm by PhoenixII54 »

CrookiNari

  • Newbie
  • *
  • Posts: 39
    • View Profile
Re: Zelda's Adventure: Solarus Edition
« Reply #61 on: June 14, 2018, 03:13:14 pm »
Nope, the origin is exactly the same on all of them and the guy is set to be a "somebody". And I tried using that path direction setting, it just resulted in the illegal direction error.

PhoenixII54

  • Newbie
  • *
  • Posts: 34
    • View Profile
Re: Zelda's Adventure: Solarus Edition
« Reply #62 on: June 14, 2018, 04:21:26 pm »
i tried using your script on my own test map, and it worked perfectly*. The only warning for you is that the movement will stop if your NPC reaches an obstacle. And i have to correct myself : the parenthesis are actually optionnal for a function call with a raw table data for only argument.

*using an already fully configured sprite (ALTTP Zelda)

PS, that means something is likely wrong on your sprite data, and of course your path is wrong : for a back-and-forth movement, you should use opposite directions, (0+4,1+5, 2+6 or 3+7).
« Last Edit: June 14, 2018, 04:39:46 pm by PhoenixII54 »

CrookiNari

  • Newbie
  • *
  • Posts: 39
    • View Profile
Re: Zelda's Adventure: Solarus Edition
« Reply #63 on: June 15, 2018, 12:36:03 am »
 Ok, I've finally got it working :) So I can put this issue to bed.