Menu

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

Topics - jojo_f

#1
Hello, I have a made a transporter with a block on top of it. When pushing the block you automatically walk into the transporter. (I would like someway of not having this happen so you choose to walk into it, but whatever for now.) However the hero does not arrive at the destination properly, but arriving somewhere else entirely on the destination map, even sometimes behind walls.
#2
Development / Using chest to open a door
March 06, 2018, 08:42:12 AM
Here is the next question in my Solarus quest! Thanks for all of the help so far. Hopefully the more help one receives, the less one will need (maybe) but at the very least these questions will be logged for the needs of future users.

So today I am making a chest to open a door. This will be the very first room of the game, where possession of the tunic will be set to 0 and you receive the first tunic variant before you can exit the room. This will of course require some custom non-tunic Link sprites but that is not the purpose of this post. I am using the basics tutorial #32 ("doors") as a guide.

So if I have the chest in "clothes_chest" and the exit door is "exit_door" with the clothing savegame variable in "green_tunic", then use this script:

Code ( lua) Select
function clothes_chest:on_opened(tunic, 1, green_tunic)

map:open_doors("exit_door")
sol.audio.play_sound("door_open")
end


The tunic is given but the door does not open. However if I make a slight alteration by deleting the variant in the first line:

Code ( lua) Select
function clothes_chest:on_opened(tunic, green_tunic)

map:open_doors("exit_door")
sol.audio.play_sound("door_open")
end


The door will open, but the hero gets paused permanently at the chest, and the tunic is not given.
#3
Development / Animated Tiles in Quest Editor
February 21, 2018, 04:48:17 AM
Hello! I am making some animated tiles in the Quest Editor. Is there a way to change the timing of animated tiles, the way there is to change for character animations?

Thanks!
#4
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")
           sol.audio.play_sound("bounce")

elseif   game:get_money() < 10 then
           game:start_dialog("cant_buy")
           sol.audio.play_sound("bounce")

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


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
      game:start_dialog("cant_buy")
      sol.audio.play_sound("bounce")

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


Thanks so much.
#5
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 https://www.youtube.com/watch?v=KyF4LB1YOSY&list=PLzJ4jb-Y0ufxwkj7IlfURcvCxaDCSecJY&index=18 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



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

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.