12 years ago

PuzzleScript Animation - Animated Tile


Here is my three frames road animation from #FunkyBird, ‘OBJECTS’ (named r, s & t for level map design):

Road1 r
green darkgreen darkgray
22222
11100
11001
10011
22222

Road2 s
green darkgreen darkgray
22222
10011
00111
01110
22222

Road3 t
green darkgreen darkgray
22222
00111
01110
11100
22222

And we need ‘temp’ tile:

temp
white

Now the ‘LEGEND’ entry:

Road = Road1 or Road2 or Road3

So, the ‘RULES’ for animation are:

(…)
[Road1 no temp] -> [Road2 temp]
[Road2 no temp] -> [Road3 temp]
[Road3 no temp] -> [Road1 temp]

(…)

late [Road temp] -> [Road]

(i.e. animation frames are changing this way: 1->2, 2->3, 3->1; it’s 1,2,3,1,2,3,1,2,3, and so on…)

The rules are executed every turn (every player move/every using of directional key).

If you want rules compatible with realtime (beta) feature of PuzzleScript you should prepend rules with ‘[stationery Player]’ and add ‘[stationery Player] after arrow (f.e. [stationary Player][Road1 no temp] -> [stationary Player][Road2 temp] )

Happy coding.

#PuzzleScript



0 comments

Loading...

Next up

"Thanks guys for endless hours of fun." 👍

(My first fan art. Read the article, please.)

#sonic #mario #photoshop

Heya there! I really wanted to show you all a little gameplay preview of the first boss fight i'm currently working on i hope you like it ^^

Quantum precognition is one of the most powerful cards. End game cards & equipment. Demo/alpha build boss is no match for this deck.

Werehog transformation process. #sonicunleashed

So here's the first of the zodiac signs i will make for the next weeks.

A house I've built a while ago. :)

It nicely separates the snowy biome from the grassy one.

It's built with painted Ebonstone.

Why walk when you can jump?

2d lighting experiment

I did this on my 3DS ^^ #Kirby

Explosive domino effect