Solarus-Games English Forum

Solarus => Bugs & Feature requests => Topic started by: Yruama on November 19, 2014, 08:54:12 PM

Title: [1.3] Bug set_transparency
Post by: Yruama on November 19, 2014, 08:54:12 PM
Hello,

I try to make my HUD, i watch your video on Youtube https://www.youtube.com/watch?v=uhIowwFzd3Q&index=26&list=PLzJ4jb-Y0ufySXw9_E-hJzmzSh-PYCyG2
I take your code, but when i start my game i have an error :
Error: In on_started: [string "scripts/dialog_box.lua"]:64: attempt to call method 'set_transparency_color' (a nil value)


How can i fixe it ?

Merci :D
Title: Re: [1.3] Bug set_transparency
Post by: Christopho on November 19, 2014, 09:17:26 PM
Hi,
Since Solarus 1.2, surface:set_transparency_color() no longer exists. More information here: http://wiki.solarus-games.org/doku.php?id=upgrade_from_1.1_to_1.2
So the tutorial is slightly outdated. You have to edit the HUD script and replace calls to surface:set_transparency_color() + surface:fill_color() by simply surface:clear(). I can help you if you have any trouble.
Title: Re: [1.3] Bug set_transparency
Post by: Yruama on November 19, 2014, 10:28:39 PM
Thanks, now it works !