Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / tricking tweenSpriteX and tweenSpriteY like Scale does

Author
Message
haliop_New
User Banned
Posted: 25th Jan 2019 16:00
is there a simple way? since I want to use percentages and not fixed max X or max Y same for minimum
not only this but if I change the sizes of x or y
I have to consider that while the tween is playing to reposition the offsets of these sprites as well... since its sizeX and sizeY and not scaleX and scaleY by offset like the normal commands.
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 25th Jan 2019 16:13
Hi haliop, your post is a little hard to understand which might be why nobody answered yet.
Have you tried using TweenSpriteXByOffset?
How does scale "trick" these commands?
Maybe give an example of what you are trying to do?
Using AppGameKit V2 Tier 1
haliop_New
User Banned
Posted: 26th Jan 2019 14:15
ooh, I did not know that command exists however it dose not what I meant.

what I meant is:

you know the sprites commands:

setSpriteSize(spriteId,width,height)

and setSpriteScale(spriteId,scaleX,scaleY)

I see that there is no command for sprite Scale inside Tweening functions. just sizeX and sizeY
so can I trick it to think I'm actually using Scale rather then Size obviously keeping the offset in the middle so it won't stretch to the side but instead from the center towards the values given just like setSpriteScaleByOffset ...

cause if I use the current tween SizeX and SizeY I must always keep setting the position of the sprite by offset at the same location as long as the tween is sizing X and Y
so I thought for my self maybe we should have a SetSpriteTweenScaleX and setSpriteTweenScaleY
and yeah I know I can just get the normal width and height of the sprite and increasing them by percentage but then again I will have to reposition the sprite in the middle as long as the tween plays.. and that's just another command I would disband if a tweenByScale command will exist.


BTW , thanks baxlash for your comment it is very important to me to write RIGHT and on point. I do find my self even in my native tongue not so understood by others... so thank you for your comment. (improving as I go.)
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 26th Jan 2019 21:03
if you combine tweensize and tween x/y then AppGameKit should take care of all that

Login to post a reply

Server time is: 2024-11-05 18:49:32
Your offset time is: 2024-11-05 18:49:32