MODULE: Tween 1.5.1

Started by edmundito, Sun 14/06/2009 04:42:24

Previous topic - Next topic

Sughly

I'd just like to let you know Edmundito that I've finally got a chance to play around with this and... I would like to marry you. To say this is saving me time/ giving me so much more creativity with my game is an understatement. *bows down before you*

Grim

I have a question that's been bothering me for a while (I think I saw it explained once, but can't seem to find it again). In my game I often use objects that are set to tween transparency in reverse-repeat (useful for shadows overlaying the whole room). So I've got something like this in room_load: object[1].TweenTransparency(2.0, 50, eLinear,eReverseRepeatTween), yeah? But as player re-enters the room that object's transparency won't be tweened from 0, as it was initially, but from whatever value it was at the time of leaving the room. I don't think setting object's transparency at room load just before tween command will make any difference- I believe it might get ignored unless I reset the tween. How do I do that?...

selmiak

I'm struggeling with the audio tweens.
I'm using AGS 3.2.1
When I'm setting enforce new style audio scripting to true in general setting, which I suppose is the mentioned strict audio settings, TweenVolume is not compiling. If strict audio settings is something different this might be solved already if someone could explain what strict audio setting is.
When I'm setting enforce new style audio scripting to false I can use TweenChannelVolume, but when I tween/mix a channel in, and tween it to volume 100 it is still stuck at something like 70 or 80. There is no VolumeReduction While Speech is playing active, and the strange thing is, to check on this I put in a GUI where 3 buttons check every channel volume with channel.Volume but the value only stays on values I set at the start of the room and doesn't even change with tweening the value, though the volume actually goes up, but not all the way to 100.

tzachs

Well, tweening for the new audio system was never developed (as far as I know).
As for the old audio, yeah, there are some known issues with the audio tweens.

Unfortunately the audio system in AGS (at least the old one, not sure about the new one) is a bit shaky and buggy...
I've mentioned it back then in this thread, and also reported the issues I've encountered here.

Basically if you play too much with the audio it might not work as expected...
Sorry I can't help you further.   :(



TheBitPriest

I found a small bug in the module.  Others may have seen this problem too.

float GetDistance(int fromX, int fromY, int toX, int toY) {
  return Maths.Sqrt(
    Maths.RaiseToPower(IntToFloat(toX - fromX), 2.0) +
    Maths.RaiseToPower(IntToFloat(toY - fromX), 2.0) // *** this should be fromY
  );
}


edmundito

Quote from: TheBitPriest on Thu 29/08/2013 03:07:00
I found a small bug in the module.  Others may have seen this problem too.

float GetDistance(int fromX, int fromY, int toX, int toY) {
  return Maths.Sqrt(
    Maths.RaiseToPower(IntToFloat(toX - fromX), 2.0) +
    Maths.RaiseToPower(IntToFloat(toY - fromX), 2.0) // *** this should be fromY
  );
}



Nice finding! I even added it to the bug tracker: https://code.google.com/p/ags-tween/issues/detail?id=8
I got someone else contact me over private messaging with a different issue, so I will find some time to fix it and release a new versions.
The Tween Module now supports AGS 3.6.0!

GlaDOSik

This Tween module is very useful. But is it possible to use tweens (for ex. on GUI) elsewhere than in room script? Like in my function in my own script and then call that function from room? I'm writing custom GUI and I don't want to copy GUI function in every single room.

Dualnames

Sure of course it's doable provided the script order of the modules is proper.
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

Ghost

Quote from: Dualnames on Wed 25/12/2013 01:55:36
Sure of course it's doable provided the script order of the modules is proper.

To elaborate: Each script can use functions from any other scipt ABOVE it in the project tree- the order of the scripts is important and you can move them around in the editor by right-clicking and selecting move up/down. If you want to access functions from a script on a regular basis, just move it all the way to the top.

GlaDOSik

So that's why it doesn't work. I need to move Tween script up in project tree. Thanks Ghost for clarification.

Monsieur OUXX

Hi!

Is it possible to pause some tweens?
I've seen StopAllTweens(ePauseTween) (I suppose using ePauseTween pauses them) but I can't seem to find the reverse function to unpause everything.
 

edmundito

Quote from: selmiak on Mon 03/12/2012 20:51:58
I'm struggeling with the audio tweens.
I'm using AGS 3.2.1
When I'm setting enforce new style audio scripting to true in general setting, which I suppose is the mentioned strict audio settings, TweenVolume is not compiling. If strict audio settings is something different this might be solved already if someone could explain what strict audio setting is.
When I'm setting enforce new style audio scripting to false I can use TweenChannelVolume, but when I tween/mix a channel in, and tween it to volume 100 it is still stuck at something like 70 or 80. There is no VolumeReduction While Speech is playing active, and the strange thing is, to check on this I put in a GUI where 3 buttons check every channel volume with channel.Volume but the value only stays on values I set at the start of the room and doesn't even change with tweening the value, though the volume actually goes up, but not all the way to 100.

Sorry I released the last module and disappeared from the forum, but I'm trying to fix issues about it. Did you ever get this resolved? We did add the new audio support in 1.5 but let me know if you found any bugs.
The Tween Module now supports AGS 3.6.0!

Baron

I'm updating from a previous version, since I've updated to AGS 3.3 in the last year.  But when I download the module, I'm not seeing the .scm file I need to install/import the module.  Is there a new method to do this?

edmundito

Quote from: Baron on Fri 02/01/2015 18:11:08
I'm updating from a previous version, since I've updated to AGS 3.3 in the last year.  But when I download the module, I'm not seeing the .scm file I need to install/import the module.  Is there a new method to do this?

Very strange. I just downloaded the module from github and my mirror and both contain the .scm file. Did you download the ags-tween-1.5.1.zip file or the source code?
The Tween Module now supports AGS 3.6.0!

Baron

Ah....  I guess I had the demo game by mistake.  Thanks!

SMF spam blocked by CleanTalk