Hello to all agser.
Today I was trying to make an effect for a room (640x400) to make it move slightly to the left and right side (as if the room was moving/floating) to accomplish this I have done something like this by using the tween module:
DynamicSprite* sprite; //outside function
//...
sprite = DynamicSprite.CreateFromBackground();
gScreenEffect.BackgroundGraphic = sprite.Graphic;
gScreenEffect.TweenX(2.5, gScreenEffect.X+5, eEaseLinearTween, eReverseRepeatTween);
This is working like I had it in mind, the problem now is to make the same effect for a scrolling room (1280x400) how I accomplish something like this? Cause I am facing few issues like moving the gui with same camera position and to keep the 'floating' effect at the same time, how do you achieve something like this?
Any reason for using a gui instead of a room object? The room object, would make the camera stuff something that takes care itself.
Same as eri0o. You have to place an object (check the baseline and the clickeable variable) in the left bottom corner of your room and, following your previous script, only:
DynamicSprite* sprite; //outside function too
//...
{
sprite = DynamicSprite.CreateFromBackground();
oBackground.Graphic = sprite.Graphic;
oBackground.TweenX(2.5, oBackground.X+5, eEaseLinearTween, eReverseRepeatTween);
}
That will work with scrolling rooms too
Thanks guys only after few minutes of doing the post I had the same thought in fact using an object I solved the problem, thanks again for replying