Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - jojo_f

Development / Re: get amount
February 19, 2018, 07:28:57 AM
Yes that works great thanks! Still going through the Lua API for ideas on the arrow code ..
Development / Re: get amount
February 19, 2018, 06:11:46 AM
Actually, I am wrong. (Or even more wrong.) With less than full hearts, the heart script still calls for dialog:"already_have" and won't sell a heart. Hmm...
Development / get amount
February 19, 2018, 04:16:29 AM
Hi guys! I am making a shop, with NPCs for the items. The map script for the small heart works great for now.

Code ( lua) Select

function shop_heart:on_interaction()

if        game:get_life(max)
then   game:start_dialog("already_have")

elseif   game:get_money() < 10 then

else     game:start_dialog("empty" , function()
           hero:start_treasure("heart" , 1)

but I am not sure how to properly use syntax to get the amount of the arrows item (the first "if" line).

Code ( lua) Select
function shop_arrows:on_interaction()
  if  item:get_amount("arrow" , 30)
    then game:start_dialog("already_have")

    elseif game:get_money() < 80 then

    else  game:start_dialog("empty" , function()
          hero:start_treasure("arrow" , 3)

Thanks so much.
Development / Re: NPC Dialogue
February 09, 2018, 04:04:24 AM
Thank you  :)
Development / NPC Dialogue
February 09, 2018, 02:47:08 AM
Hello, I am trying to replicate Solarus Tutorial [en] - Basics #18: Dialogs with a non-playing characteracter and for some reason, it is just not working. I am a real beginner so thanks for any help. Here is three screenshots.

  • The NPC Window
  • The Dialogue Window
  • The game running with the error message below

Development / World Location, & Separators
February 08, 2018, 04:48:17 AM

I am curious as to how important setting the world location is. For example if there were three standard screens in a world scrolling left to right, you may set them at 0, 320, and 640. Or not. When layering multiple floors (say, replicating the tower with the Moldorm) this seems very important. But otherwise?

Also, what are the advantages/hazards of using separators instead of multiple screens?

Thanks for any insight.