Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Sensei on Sat 28/04/2012 11:50:54

Title: How to make work tween module in room scripts
Post by: Sensei on Sat 28/04/2012 11:50:54
Hallo. It´s me again with another newbie question.  ;)

I imported tween module to my game and i woud like to make it work in room scripts. But there is error: Undefined Token ´TweenRegionLightLevel´
Whole script looks:

function region1_WalksOnto()
{
  TweenRegionLightLevel (Region * 1, 0.5,  40, eLinearTween, eNoBlockTween); // Im not sure about this Region * 1
}

I´ve tried to figure it my self by studying Tween Demo game but unsuccesfully. (I accualy don´t know what to look for :P )
If there is some sort of tutorial about this please link it. It would help me with another custom functions i´m going to create later.


Title: Re: How to make work tween module in room scripts
Post by: Khris on Sun 29/04/2012 15:29:55
This should work:
  TweenRegionLightLevel (region[1], 0.5,  40, eLinearTween, eNoBlockTween);

You have to comment out a line in Tween.ash, too:

In line 93, it says:
#define AGS_2_COMPATIBLE_TWEENS_DISABLED

Change that to
// #define AGS_2_COMPATIBLE_TWEENS_DISABLED