Recent Posts

Pages: [1] 2 3 ... 10
1
Bugs & Feature requests / Re: Cut Vines
« Last post by Neovyse on March 20, 2019, 10:03:43 pm »
Quote
Syntax highlighting is actually broken on the forums right now...

We are working on the new website, so we cannot fix the forums right now. We'll see after the soon-to-come website release :) I hope you people will like it!
2
If all you want to do is show two dialogs back-to-back then all you have to do is use the "next" property of the dialog entry. For example:
Code: (lua) [Select]
dialog{
  id = "first_dialog",
  next = "second_dialog",
  text = [[
show this dialog first.
]]}

dialog{
  id = "second_dialog",
  text = [[
Then show this dialog.
]]}

Then all you have to do is start the first dialog and the second one automatically gets shown after. Note that there is also a "next2" property for when the player selects from between 2 choices, where next2 is the dialog to display next when the second choice is selected.
3
Wait, you can do that? I totally didn't think of that. I should probably start being more creative with the API reference info, huh? Anyways, thank you much.

--EDIT: It appears that when I put the second start_dialog command in the callback, it just skips the first dialog. Odd.
4
Bugs & Feature requests / Re: Children of Solarus Dialog Script, How Does it Work?
« Last post by Max on March 17, 2019, 03:00:14 pm »
You're not wasting anybody's time : )

So you just want to show two consecutive dialogs? Why not just show the second one in the first one's callback?
5
Hey again,

I've been playing around with the dialog scripts from Children of Solarus, in particular debug_dialog, dialog_box, and language_manager (I think that's right..?). However, upon inspection I can't figure out how to index the dialog ids I need to in order to start the loop, which I think is the function that'll let me rattle off multiple dialog boxes without generating the "dialog already active" exception. Maybe I've skimmed over some comment that gives instructions on that matter, but upon close inspection I don't think I have. I've also referenced back to the original tutorials, but those didn't help because all of the dialog boxes shown there are separated by input, whereas I just need to show two consecutive dialog boxes. Here's a link to each of those scripts, I was hoping I could reference the experience of someone who's already figured it out though.

dialog_box.lua: https://github.com/solarus-games/children-of-solarus/blob/dev/data/scripts/menus/dialog_box.lua
debug_dialog.lua: https://github.com/solarus-games/children-of-solarus/blob/dev/data/scripts/debug_dialogs.lua
language_manager.lua: https://github.com/solarus-games/children-of-solarus/blob/dev/data/scripts/language_manager.lua

Hope I don't waste anybody's time. Thanks much for reading.
6
Development / Object you can throw over and over
« Last post by Max on March 15, 2019, 04:41:51 pm »
Hey, so I coded this custom entity that's a lot like the iron ball from A Link to the Past's Eagle Tower- it's an object the hero can pick up and throw, and then pick up again and keep on throwing. You can even carry it to other maps and keep smashing it into enemies faces. I can it "toss_ball", haha.

You can set the properties "weight" and "damage" on the custom entity, which by default are 1 and 6. When this entity hits an enemy, it'll try to call enemy:hit_by_toss_ball() , so if you want certain enemies to exhibit different behavior on being hit by this than being damaged, define that function for those enemies (if, for example, you wanted an enemy to have its shield destroyed, or become vulnerable when hit with this or something.). Note: hit_by_toss_ball() will be called whether the hero throws the ball into the enemy, but also if the enemies runs into the entity while it's on the ground.

Code: [Select]
local entity = ...
local game = entity:get_game()
local map = entity:get_map()
local DEFAULT_DAMAGE = 6


function entity:on_created()
  entity:set_traversable_by(false)
  entity:set_drawn_in_y_order(true)
  entity:set_follow_streams(true)
  entity:set_traversable_by("enemy", true)
  entity:set_weight(1)
  if entity:get_property("weight") then
    entity:set_weight(entity:get_property("weight"))
  end
end

local enemies_touched = {}
entity:add_collision_test("sprite", function(entity, other)
  if other:get_type() == "enemy" then
    local enemy = other
    if not enemies_touched[enemy] and enemy:hit_by_toss_ball() then
      enemy:hit_by_toss_ball()
    end
    enemies_touched[enemy] = enemy
    sol.timer.start(map, 1000, function() enemies_touched[enemy] = false end)
  end
end)

function entity:on_lifting(carrier, carried_object)
  carried_object:set_damage_on_enemies(game:get_value(DEFAULT_DAMAGE)
  if entity:get_property("damage") then
    entity:set_weight(entity:get_property("damage"))
  end
  carried_object:set_destruction_sound("running_obstacle")

  --landing, and therefore needing to create a new toss_ball
  function carried_object:on_breaking()
    local x, y, layer = carried_object:get_position()
    local width, height = carried_object:get_size()
    local sprite = carried_object:get_sprite()
    local direction = sprite:get_direction()

    if carried_object:get_ground_below() == "wall" then y = y + 34 end
    carried_object:get_map():create_custom_entity({
      width = width, height = height, x = x, y = y, layer = layer,
      direction = direction, model = "toss_ball", sprite = sprite:get_animation_set()
    })


  end

end


If you see any errors or mistakes I've made, please let me know so I can fix them! Have fun using this, modifying it, whatever you want.
7
Your scripts / Re: Simple Leveling up system
« Last post by Miguelink 64 on March 12, 2019, 07:11:10 pm »
I haven't read the whole API for LUA, that's why I thought it only accepted intergers, thanks for the feedback  ;D
8
General discussion / [Request] Solarus RPG Maker Let's Play
« Last post by P-Tux7 on March 11, 2019, 09:36:10 pm »
Hello,

Even though I do not speak French I want to see the entirety of Zelda Mystery of Solarus the RPG Maker version which is not DX. Could someone please make a longplay video (no commentary) or let's play (with commentary) of it? There are only a few small videos of it currently. I want to see the cool things that were done in the RPG Maker 2003 engine.

Thank you,
P-Tux7
9
Your scripts / Re: Dialog Box script with Name Displayed
« Last post by alexgleason on March 11, 2019, 03:43:01 pm »
I'm considering including a 'photo' of the NPC in the dialog box (kinda like Golden Sun). This is making me question whether putting the NPC name directly in the dialog box is the best solution.

Rather than switching between speakers mid-dialog, there could be separate dialogs for each speaker in a conversation, each with their own properties.
10
Your scripts / Re: Simple Leveling up system
« Last post by Diarandor on March 09, 2019, 03:04:11 pm »
I correct myself. That growth was polynomial, not exponential.
Pages: [1] 2 3 ... 10