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.


Messages - Dokk

Pages: [1]
1
Development / Re: Disable brandish for all items in chests
« on: August 20, 2018, 08:45:25 pm »


Christopho, I tried to do so:

Code: [Select]

function bomb_chest:on_opened()
game:get_item("bomb"):set_variant(1)
hero:unfreeze()
  game:start_dialog("found.bombs", function()
    sol.audio.play_sound("bombs")
  end)
end


But it doesn't work and game isn't giving bombs to hero. Yes, I see the dialog, I hear my hero says "Bombs!", but slot is empty. I just want to put some things in chests, but without brandish. Tomorrow will try to experiment with custom entities :D

2
Development / Re: Disable brandish for all items in chests
« on: August 20, 2018, 04:10:11 pm »
Yes, I used chest:on_opened() event:

Code: [Select]

function bomb_chest:on_opened()
hero:start_treasure("bomb")
  game:start_dialog("found.bombs", function()
    sol.audio.play_sound("bombs")
  end)
end


But all treasures in chests are always brandished. What to do?

3
Development / Disable brandish for all items in chests
« on: August 20, 2018, 12:19:11 pm »
Hello. Can I disable brandish for all items in chests? I tried to write self:set_brandish_when_picked(false) in item script:

Code: [Select]
function item:on_created()
  self:set_savegame_variable("bomb")
  self:set_assignable(true)
  self:set_brandish_when_picked(false)
end

 But it works only for pickable treasures, and it doesn't work in chests. Why?

4
General discussion / Re: Text position on top...
« on: August 05, 2018, 12:20:43 pm »
In a grow of work, I didn't read comments for script. Shame on me! Thank you , Christopho. My progress is saved  ;D

5
General discussion / Text position on top...
« on: August 04, 2018, 07:22:03 pm »
Hello. I have a problem with some specific text position. I made a map titles (kinda "Level 1: The Beginning") as a dialogs. And I want to start this map name then game is starting on the top of the screen for 2-3 seconds.

Code: ( lua) [Select]
function map:on_started()

--Starting a map title
game:start_dialog("level.1")

 I tried to change the position directly in alttp_dialog_box and surely all my dialogs became to the top ;D

So, how to change the text position only for some specific text as mine?

6
General discussion / Re: Some small problem with sound & code
« on: June 30, 2018, 01:11:23 pm »
Christopho, yes, it works! I'm noob. Thank you so much :D

7
General discussion / Some small problem with sound & code
« on: June 30, 2018, 11:23:47 am »
Hello. I have a problem with voice in my quest. In this code speech comes together with dialog:

Code: [Select]
function board_1:on_interaction()
game:start_dialog("board.hello")
sol.audio.play_sound("ok")
end

But I need to start "ok" speech only after "board.hello" dialog will end. What I must to do with this code?

Pages: [1]