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 - froggy77

Pages: 1 ... 6 7 [8] 9 10
106
Development / Problem with fade_in and fade_out methods
« on: October 04, 2015, 06:53:51 pm »
Hello,

I don't know if there is a bug with the following methods:
drawable:fade_in([delay], [callback])
 and
drawable:fade_out([delay], [callback])

I make maybe some mistakes in the use of these methods. :-[
These methods work, but at the end, the chosen colors are not exactly the same.
When I picked the color in an image editor (e.g. Gimp), I can see it's darker.
It is as if the surface kept a little transparency at the end of my fade_in() . Even when I used surface:clear()

So instead of writing this,
self.bg_surface:fade_in()

I write this:
self.bg_surface:fade_in(20, function () self.bg_surface:set_opacity(255) end)

This workaround may not work with text_surface, because there is no text_surface:set_opacity(opacity)
Is there a solution?

107
Development / Re: Problems with dialog and HUD
« on: September 09, 2015, 12:19:28 am »
In game_manager.lua, I would replace

Code: ( lua) [Select]
  -- Function called when the player goes to another map.
   game.on_map_changed = function(game, map)
     
  -- Notify the HUD (some HUD elements need to know that).
hud:on_map_changed(map)
   end

by this:

Code: ( lua) [Select]
  -- Function called when the player goes to another map.
   function game:on_map_changed(map)
     
  -- Notify the HUD (some HUD elements need to know that).
hud:on_map_changed(map)
   end

108
Quote
If I were you , I would start with the basic menu of Zelda Mystery of Solarus DX, then I would adapt it to my needs. In fact, this is how I proceed. ;)

Just minor changes for the moment :-[
- A new hud for the hearts (link).
- Added an icon next to the caption text when the item is selected.
- Changed the size of icons in the dialog box. 16 pixels wide , it was too small for face sprites.
- The title of sub-menus is a text surface and not a picture. I also found a way to get a gradation of colors playing with several text surfaces.

109
OK so I fetch in this sense.
Thank you!

110
Development / Re: Trouble with movement (moving a dynamic tile)
« on: July 26, 2015, 10:30:45 pm »
Shorter

Code: [Select]
local map = ...

function map:on_started()

  local function restartMovement()
MovingFloor:set_position(0,96)
local m = sol.movement.create("straight")
m:set_speed(64)
m:set_angle(math.pi)
m:set_ignore_obstacles()
m:set_max_distance(64)
m:start(MovingFloor,restartMovement)
  end
  restartMovement()

end

DementedKirby, I like your idea!

Edit: oops,  Frenglish! function "restartMouvement" renamed "restartMovement" without "u"

111
I see this method  'pickable:get_followed_entity()' exists so I guess it is possible to attach a pickable heart to a custom entity  would return together to the hero.
Perhaps with movements? But how then appoint an unnamed pickable heart created automaticcally by the engine?I can get the sprite with a table, but not the entity.

112
Development / Re: Have entities be fully intraversable (walls)
« on: July 26, 2015, 08:11:37 pm »
I would create four enemies to make a 32x32 rock and not a dynamic tile .
Each enemy (16x16) have their own lives. Furthermore it is more interesting to play with animations and you can have several layers of sprite that could disappear gradually as the enemy " rock_16x16" loses its life points.

113
If I were you , I would start with the basic menu of Zelda Mystery of Solarus DX, then I would adapt it to my needs. In fact, this is how I proceed. ;)

114
Great news! 8)

115
I think there is the same problem with these methods:
custom_entity:set_traversable_by([entity_type], traversable)
custom_entity:set_can_traverse([entity_type], traversable)


I tried with a door; the custom entity cannot traverse the door even with a "true" in parameters.
The problem is maybe already corrected for the next version .

I would also like to add that I love Solarus! Thank you!  ;)

116
Hello,

Unless I am mistaken, only surfaces have the following method in drawable objects (surfaces, text surfaces and sprites):
surface:set_opacity(opacity)

drawable:set_opacity(opacity) would be a good  feature, isn't it?

117
Development / Re: Door system does not work (engine bug?)
« on: June 27, 2015, 05:45:03 pm »
- It works with entities.
- Create two doors: "yourmapid_auto_door_a_1" (not "yourmapid_auto_door_a", you have to add "_1") and "yourmapid_auto_door_a_2"
Create one sensor: "yourmapid_sensor_a" under your two doors (like in the image)
"yourmapid" is your map ID (e.g. "library", "house", "dungeon" or what you like)

e.g.: "house_auto_door_a_1" and "house_auto_door_a_2" and the opening sensor "house_sensor_a"
e.g.: "house_auto_door_b_1" and "house_auto_door_b_2" and the opening sensor "house_sensor_b" for a 'second pair of doors'
e.g.: "house_auto_door_b_3" and "house_auto_door_b_4" but these doors will be opened with the same sensor  "house_sensor_b"
It's a, b, c or object, lol, what you like,  it should work:
e.g.: "house_auto_door_lol_1" and "house_auto_door_lol_2" and the opening sensor "house_sensor_lol".

Code: [Select]
local map = ...

function map:on_started()

  self:auto_doors()
end

function map:auto_doors()

  for door in map:get_entities(map:get_id() .. "_auto_door") do
    local door = string.sub(door:get_name(), 0, -3)
    local sensor = map:get_entity(string.gsub(door, "auto_door", "sensor"))
    function sensor:on_activated()
  map:open_doors(door)
    end
    function sensor:on_left()
  map:close_doors(door)
    end
  end
end

118
I though this was a problem of drivers. I was wrong. Bravo fosamax .
So it's worse: No more making for linky? ;)

119
Quote
they works sufficiently well for some other development tools like visual studio express 2010
Packages redistribuable Microsoft Visual C++ :
In " Add or Remove Programs.", I have several packages for Microsoft Visual C++ 2005, 2008 and even one in 2010.
Maybe you still need to update the Packages redistribuable Microsoft Visual C++ .

Quote
The event viewer of windows shows this error message, but says nothing more about its origin.
There is also:
msinfo32
Click Start, click Run, type msinfo32 and check the different topics:
Hardware resources (I/O), Software Environnement (Drivers, Windows Error Reporting) ...

DirectX Diagnostic
Click Start, click Run, type dxdiag and check the different tabs


120
Your projects / Re: Solarus - ZL project
« on: May 24, 2015, 11:19:56 pm »
Merci. Some NPCs more.

Pages: 1 ... 6 7 [8] 9 10