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

Messages - zutokaza

#31
Development / (Solved)Sword variants?
March 24, 2017, 11:54:20 PM
Can a sword have different variants? For example, variant 2 for a red sword graphic?

Code ( lua) Select
game:set_ability("sword", 2)
#32
Development / Re: Key save error message
March 06, 2017, 05:20:32 AM
Thank you. It works now.
#33
Development / Key save error message
March 06, 2017, 05:12:58 AM
I made a key item. I require the key for opening the door, but I get this error message. The door entity never shows.

Code ( lua) Select
2140] Error: In create_door: bad argument #1 to ? (Bad field 'opening_condition' (equipment item 'key' is not saved))
#34
Game art & music / Re: Original art
February 13, 2017, 06:28:26 AM
It is good for small maps. Are you gonna post it?
#35
General discussion / Re: Tutorial from scratch
January 19, 2017, 07:45:16 PM
Quote from: Christopho on January 19, 2017, 02:24:28 PM
Here is the exact list of filenames currently hardcoded in the engine: https://github.com/solarus-games/solarus/blob/dev/work/data_files.txt

Is there a list of hardcoded animation names?

I know "walking" and "stopped" are some hardcoded keywords.
#36
Development / Re: Hit box size?
January 10, 2017, 07:24:02 AM
@Diarandor
Oh, I have only seen it referred to as the hit box. A lot of people want the ability to resize it, but I wanted to just know the size. The bounding box is 16x16. Thank you Diarandor!
#37
Development / Hit box size?
January 10, 2017, 01:26:15 AM
What is the size of the hit box?
#38
Development / Re: How do I overwrite array strings?
November 28, 2016, 03:09:20 PM
Thank you Zefk! It works now.
#39
Development / Re: How do I overwrite array strings?
November 28, 2016, 02:51:26 PM
bump
#40
Development / (Solved)How do I overwrite array strings?
November 28, 2016, 06:44:30 AM
Basically the sol.surface font text is equal to test for displaying words test1,2,3,4, etc. I am trying to overwrite the first 0-7 tests.

Code ( lua) Select
local test = {}
local testing

test[0] = "test1"
test[1] = "test2"
test[2] = "test3"
test[3] = "test4"
test[4] = "test5"
test[5] = "test6"
test[6] = "test7"
test[7] = "test8"

for i = 0,7 do
     show_test[rep] = sol.text_surface.create({
      text = test[i],
    })
end

function sol.main:on_draw(screen)

--clear and overwrite
test = {}

if testing == true then
test[0] = "test_overwrite1"
test[1] = "test_overwrite2"
test[2] = "test_overwrite3"
test[3] = "test_overwrite4"
test[4] = "test_overwrite5"
test[5] = "test_overwrite6"
test[6] = "test_overwrite7"
test[7] = "test_overwrite8"
end

for i = 0,7 do
    show_text[i]:draw(screen,x_test_pos,y_test_pos[i])
  end
end

end
#41
Development / Re: How do I print a string to txt file?
November 25, 2016, 05:53:18 AM
Quotefile:write("Hello World")
Can I write the value of a variable?

For example,
Code ( lua) Select
local coordinate_x = 50
local coordinate_y = 40
file:write("x:",coordinate_x, "y:", coordinate_y)
#42
Hello,

I want to print a string to a text file.

For example,

Code ( lua) Select
print("hello world")

txt file:
1 hello world
#43
Development / Re: for loop question
November 11, 2016, 02:41:59 AM
Quote from: MetalZelda on November 10, 2016, 12:54:30 PM
You can do shorter

Code (lua) Select

for i = 1, whatever_you_want do
  if i < 15 then
   -- calculation
  elseif i < 30 then
    -- other calculation
  elseif i < 45
   -- Again
  end
end



This works. Thank you MetalZelda.  :D
#44
Development / (Solved) For loop embedding question
November 10, 2016, 08:21:59 AM
Is it possible to do this in a shorter way?
Code ( lua) Select
for rep = 1, 15 do
--blah different coordinate calculations
for rep = 15, 30 do
   --blah different different coordinates calculations
  for rep = 30,45 do
   --blah different coordinates calculations
   for rep = etc....... do
    --blah different coordinates calculations
   end
  end
end
end


My first thought was to use arrays. Will this work? If yes, how would I have starter begin 0 and ender begin at 15?

Code ( lua) Select
for 1,15 do

it would end up being:
15,30
30,45
45,60
etc

Code ( lua) Select

local starter={}
local ender ={}

for rep 1,15 do
starter[rep] = 0
ender[rep] = 0
end

for reprep = 1,15 do
starter[reprep]=starter[reprep] +15
ending[reprep] = starter[reprep] +15
for rep = starter[reprep], ending[reprep] do
--blah different coordinates calculations arrays
end
end
#45
General discussion / Secret of Mana?
October 30, 2016, 12:38:03 PM
This is unrelated to Solarus. Has anyone got a gb(secret of mana currency) glitch in the game? I noticed it does not add up correctly and the same glitch happens during item purchase.