Script for fix tillmap during the game....

Script for fix tillmap during the game....

Postby Oliver_Buo » 12 Mar 2018, 21:51

Hello I have the following question: I have 2 tillmap.
One is fixed, the other is not.

See picture_:
script fest.JPG
Tux tillmap not fixed


Now I want to switch this with a scrip.
That is, what is fixed is no more fixed and and also for the other one (not fixed - > fixed)

Is this possible? If yes, how does it work ?
Otherwise I can only know the trick
tillmap 1.fade (1,0);
tillmap 2.fade (0,1);

---- ------ ------ (auf deutsch) ---- ---- ---- ;) ------ ;)
Hallo ich habe folgende Frage: Ich habe 2 tillmap.
Das eine ist fest, das andere nicht. Nun möchte ich mit einem Scrip dies umschalten.
Das heisst, was fest ist soll nicht mehr fest sein (= in den Vordergrund, und was im Vordergrund ist soll fest werden .
Ist so etwas möglich ? Wenn ja wie geht das ?
Mir fällt sonst nur der Trick mit
tillmap 1.fade (1,0);
tillmap 2.fade (0,1);
ein....
User avatar
Oliver_Buo
 
Posts: 286
Joined: 27 Nov 2016, 17:51

Re: Script for fix tillmap during the game....

Postby Tobbi » 12 Mar 2018, 22:08

It's not possible. You'd have to have a tilemap::set_solid script, but that's not implemented yet.

I've asked internally whether we could implement that.
SuperTux developer.
User avatar
Tobbi
SuperTux Moderator
 
Posts: 353
Joined: 12 Oct 2013, 13:08

Re: Script for fix tillmap during the game....

Postby Oliver_Buo » 13 Mar 2018, 18:32

ok thanks - will be cool if that is possible..... untill then i will make it with a workaround. :-)
User avatar
Oliver_Buo
 
Posts: 286
Joined: 27 Nov 2016, 17:51

Re: Script for fix tillmap during the game....

Postby mteufel » 13 Mar 2018, 19:03

I've implemented this: https://github.com/SuperTux/supertux/pull/785. Waiting for the review of the other developers.
SuperTux developer
mteufel
 
Posts: 139
Joined: 03 Jan 2016, 09:27

Re: Script for fix tillmap during the game....

Postby Oliver_Buo » 17 Mar 2018, 14:00

Thank u mteufel.

Now i try this one:

Script Problem
Tilemap sn 1 is alpha 1.0
Tilemap sn2 is alpha 0.24

script
sn1.fade (0,2);
sn2.fade(1,0);

Fade sn2 is working fade sn1 is not working ! why ? :?

Lock my test at :
https://www.youtube.com/watch?v=9jaDVoK ... e=youtu.be

who can help me....:

What is the script to make a tilempa wiht alpha 1.0 fade to 0,2 ??

even when i put fade to 0,9 it fade copletle to 0,0 (?!)
User avatar
Oliver_Buo
 
Posts: 286
Joined: 27 Nov 2016, 17:51

Re: Script for fix tillmap during the game....

Postby Oliver_Buo » 17 Mar 2018, 20:45

OK Problem Solved Thanks to brmbrmcar :)

Fade (0.24,0.5) mean alpha of 0.24 in 0.5 second. That was what im looking for. :)
User avatar
Oliver_Buo
 
Posts: 286
Joined: 27 Nov 2016, 17:51

Who is online

Users browsing this forum: No registered users and 1 guest