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
OK so I fetch in this sense.
Thank you!

107
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"

108
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.

109
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.

110
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. ;)

111
Great news! 8)

112
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!  ;)

113
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?

114
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

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

116
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


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

118
Hello linky,

It works for me with Windows XP (Family) SP3 and DirectX 9.0c installed on an old PC.

Does your problem happen even if you unzipped "solarus-1.4.2-win32.zip" in a new folder and start the editor?
Is the problem occur when loading your project or when starting the editor? The project can be loaded automatically at startup by modifying the properties of a shortcut to the editor . This is why I ask this question.

EDIT: I didn't read your other topic Little bug in Editor 1.42 with door icon, so I guess it's not with the same PC or I do not understand.

119
Development / Re: Question: Is it possible to resize a surface?
« on: May 24, 2015, 06:57:07 pm »
Ok thank you for your advices. I managed to do what I wanted  :)
I opened a topic to share this little creation HUD: ZL Hearts
If someone finds some bugs , thank you to report it.

120
Development / HUD: ZL Hearts
« on: May 24, 2015, 06:35:56 pm »
----------------------------
HUD - "ZL HEARTS"
version 1.0


Attachment:  HUD - ZL Hearts.zip
----------------------------

- Explanation:
This stuff will help you to change the appearance of the health bar in your Solarus project.
The first heart represents the first four lives... OK stop! No further explanation!. A picture is worth a thousand words;

Example 1:
The original health bar (here, there are 15.5/20 hearts or 15.5 * 4 = 62 lives on 80) will be replaced by this smaller bar:


Example 2:
I played with the console to test "game:set_life()" and "game:set_max_life()"



- Tested with Solarus v1.4.2

- IMPORTANT !!! Save your files before replacing them!

- Copy these files in your Solarus project. The file path may differ from yours.

..\data\sprites\hud\empty_heart.dat    (There are 6 animations instead of 2 animations if you compare with the original data file.)

..\data\sprites\hud\hearts.png      (Some graphics are edited from a Zelda game. For copyright reasons, don't sell your project! )

..\data\scripts\hud\hearts.lua      (This file contains the main script edited from a original one by Christopho.)

..\data\scripts\hud\hud.lua      (It is not necessary to replace this file. The script contains a few more lines than the original created by Christopho. Keep yours and see below )
1st choice:
 Copy the "hud.lua" file or add/replace these lines if you want to align element to right  when the player wins a new  heart container.
Code: [Select]
(...)
local hearts = hearts_builder:new(game)
hearts:set_dst_position(- (game:get_max_life() + 16), 6)
hud.elements[#hud.elements + 1] = hearts
local nb_max_hearts_displayed = game:get_max_life() / 4
(...)
local nb_max_hearts = game:get_max_life() / 4

if nb_max_hearts ~= nb_max_hearts_displayed then
nb_max_hearts_displayed = nb_max_hearts
hearts:set_dst_position(- (game:get_max_life() + 16), 6)
 end
(...)

2nd choice:
Keep your "hud.lua" file if you want to align element to left when the player wins a new heart container.
Just adjust the x value of  hearts:set_dst_position(-104, 6)
Perhaps you should also change the value of x hearts.surface = sol.surface.create(116, 11) in the "hearts.lua" file.


EDIT:
- Erratum: For empty_heart.dat, I said there were "6 animations instead of 4 animations",  but it's "6 animations instead of 2 animations"
- Images were hosted at an ISP, so I attached them directly at the forum,  as I did with the .zip file.
You just have to be connected to see images.


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