Indie Dev

Hello Guest!. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, sell your games, upload content, as well as connect with other members through your own private inbox!

[Scripting]Picture Animations on moving screens

Manoma

Villager
Xy$
0.00
Hi! I'm trying to use the battlers of the monsters as the picture of a event. That is ok, i can do that, but the problem rises when i try to animate it. I don't want to make charsets because i'v much more options with pictures (like making it change collors, jumping, resize, etc...) and don't have much skills with it too. And when i try to make a simple breath animation on the picture it moves together with the screen while doing one of the steps of the animation. That is because i must set a value of x and y of the screen to make the animation and that value isn't updated until the end of the animation (even without the wait) :/

What i want to know is: How i change the scaleY of the picture without moving it?
the best i could do was find a function to find the value of the scaleY (i don't have much knowledge on javascript, i just see some plugins and figure some things out)

$gameScreen._pictures[1].scaleY(); // i wasn't able to change it because i don't know how (tried = 150; a number inside the (), setScale, scale.y and etc...)(aww)(sad)(tears)(cry)(shocked)(unsee)
 

eivl

Local Hero
Xy$
0.00
you should use it like this :

JavaScript:
$gameScreen.showPicture(pictureId, name, origin, x, y, scaleX, scaleY, opacity, blendMode)
 

Manoma

Villager
Xy$
0.00
you should use it like this :

JavaScript:
$gameScreen.showPicture(pictureId, name, origin, x, y, scaleX, scaleY, opacity, blendMode)
yeah, but the problem is if i use like that it will move the image to the coordenates x,y and when the animation is declared the value of x and y are saved as they were in the moment of the declaration, so if i try to animate a image that should be at the same place as an event it would move to the position x and y of the event in the screen at the moment of the declaration and if i move the screen the x and y will not be updated until the end of the animation. The image will follow the screen during the animation.

what i wanted was to either move the image to a map coordenate and not a screen one or use a command to just resize the Y.
the best i could find was the function to get the scaleY of a picture, but i wasn't able to change the scaleY only.

i guess the best solution for now is to use screen sized maps everytime :/
 

eivl

Local Hero
Xy$
0.00
Could you make me a demo that shows this for me? Or even better send me a sample project where this accures
 

Manoma

Villager
Xy$
0.00
a video with some balloons (because the idiom is different), i was going to do a video now so it was more fast to do it, but tell me if you still need a demo/project:
 
Top