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.


Topics - froggy77

Pages: 1 [2]
16
Your projects / Solarus - ZL project
« on: April 14, 2015, 11:03:36 pm »
Quelques graphiques qui sont en cours pour un projet Zelda-like. Si vous avez des critiques, je suis preneur! /
Some graphics that are in progress for a Zelda-like project. If you have critics, I'm interested!  ;)


ENEMY:

Sorcier Rouge / Red Wizard




NPCs:


Très inspiré par Hamlet le cochon dans Illusion of Time. / Very inspired by Hamlet the pig in Illusion of Gaia. image















17
Development / Create an output file to debug your script
« on: April 13, 2015, 08:23:49 pm »
I am a beginner in lua scripting , but I would like to share something that helped me to debug a problem in a lua script.
This will be useful only for newbies like me ;)
I simply redirected the outcome of variables into a new text file to better understand what was wrong with my script .
Just add these lines in the script by replacing, of course, the name of your variables.
For my part , I inserted these lines in a loop.

- Here an example with 3 variables: var1, var2 and booleanvar

Code: [Select]
file = io.output (io.open ("my_debug.txt", "a +"))
io.write ("variable1 =" ,var1 , "\tvariable2 =", var2, "\t", "\tboolean variable =")
if booleanvar then
io.write ("true")
else
io.write ("false")
end
io.write ("\n")
io.close (file)

- Info:
"\t" means tab
so "\t", "\tboolean variable =" will generate 2 tabs.

"\n" creates a new line in the file.

Further explanation here and here
(Sorry but it's in French)


- In "my_debug.txt" that will be created in your Solarus project, you will get lines like these:
(Of course DO NOT name your output file "error.txt")

Quote
variable1 =232   variable2 =277      boolean variable =false
variable1 =232   variable2 =277      boolean variable =false
variable1 =232   variable2 =277      boolean variable =false
variable1 =232   variable2 =277      boolean variable =false
variable1 =232   variable2 =277      boolean variable =false
variable1 =232   variable2 =277      boolean variable =false
variable1 =232   variable2 =277      boolean variable =true
variable1 =232   variable2 =277      boolean variable =false
variable1 =232   variable2 =277      boolean variable =false
variable1 =232   variable2 =277      boolean variable =false
variable1 =232   variable2 =277      boolean variable =false
variable1 =232   variable2 =277      boolean variable =false
variable1 =232   variable2 =277      boolean variable =false
variable1 =232   variable2 =277      boolean variable =true
variable1 =338   variable2 =413      boolean variable =false
variable1 =338   variable2 =413      boolean variable =false
variable1 =338   variable2 =413      boolean variable =false
variable1 =338   variable2 =413      boolean variable =false
(...)

18
Development / Help: Enemy throwing a projectile
« on: February 07, 2015, 08:25:24 pm »
Is there an explanation somewhere on the way to create an enemy that throws something like a fireball?
 The enemy would throw the projectile only if the hero is quite close and if the enemy  can see him.

19
Bugs & Feature requests / Opacity difference for static tiles
« on: December 10, 2014, 01:25:47 am »
Hello,

There is a small bug on tiles whose colors have an alpha channel (for example, on the semi-transparent tiles).
"Solarus Quest Editor" (map or tileset) complies with the transparency of the image editor (Gimp), but in-game it's a little more opaque.
By cons, if we pass this tile in "dynamic tile", it is OK.
So the problem is on static tiles of any layer (low, intermediate or high).

To test, just add a dark color and a little transparent tile in the tileset (example: opacity 30 with Gimp), take the white for the background in the tileset options,
than during the mapping, take the static tile and make another which is converted to dynamic tile.
In the game, we can see the difference in color. The static tile is darker.
I use Solarus Engine v1.3.

20
Development / Help: reactivate a switch without reloading the map
« on: December 07, 2014, 01:15:05 pm »
Hello,

I don't understand how to activate/reactivate a simple switch without reloading the map.
I works for crystal blocks, I would like the same behavior for a "light switch" to turn on / turn off the light and I would select my own sprites.

It's the same problem for the switch in the "test map" called Outside B2 (Village) of the tutorial. If I want to disappear again the ladder of the map, how should I do?
Once enabled, the switch (crystal) remains in yellow and can not be hit with the sword.

Code: [Select]
local map = ...
local game = map:get_game()

function light_switch:on_activated()

  light_tile:set_visible(false)
 end
 
function light_switch:on_inactivated()

  light_tile:set_visible(true)
end


21
Hi,

I wonder if it is possible to call a sprite, during the "enemy:on_dying()", other than this sprite "enemies/enemy_killed" , for example, for a specific type of enemy.
"enemies/enemy_killed" would be the default sprite when nothing specified.

If so, what is the way to get it?

Thank you in advance.

Pages: 1 [2]