Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Cloud_thunder SOUND & ANIMATION

A topic by Atilaste created Jun 24, 2023 Views: 151 Replies: 2
Viewing posts 1 to 3
(2 edits)

Please, can you show me a screen of how to animate cloud_thunder...? i can't do it... i don't know how to make it animated...


Developer(+1)

It's the german version. You can use different timings. 

I used moving route

Left turn, wait 6 frames, right turn, wait 6 frames, top turn, wait 6 frames, down turn, wait 60 frames, repeat. 

(1 edit) (+2)

ok nice... thank you ! i did even more ! ;) there is sound with it... and if you are far you can't hear it :) (a friend helped me)

1st Script : Display the lightning randomly

var randomFrames = Math.floor(Math.random() * 241) + 60;

this.wait(randomFrames);

2nd Script : Allows you to hear the thunder from a distance; the closer you get, the louder the sound becomes

var playerX = $gamePlayer.x;

var playerY = $gamePlayer.y;

var eventX = $gameMap.event(75).x;

var eventY = $gameMap.event(75).y;

var distance = $gameMap.distance(playerX, playerY, eventX, eventY);

var maxDistance = 30; // La distance maximale à partir de laquelle le volume sera réduit à zéro

var volume = 90 - (distance * (90 / maxDistance));

if (volume > 0) {

AudioManager.playSe({ name: 'thunder9', volume: volume, pitch: 100, pan: 0 });

}