How to make work tween module in room scripts

Started by Sensei, Sat 28/04/2012 11:50:54

Previous topic - Next topic

Sensei

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.



Khris

This should work:
Code: ags
  TweenRegionLightLevel (region[1], 0.5,  40, eLinearTween, eNoBlockTween);


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

In line 93, it says:
Code: ags
#define AGS_2_COMPATIBLE_TWEENS_DISABLED


Change that to
Code: ags
// #define AGS_2_COMPATIBLE_TWEENS_DISABLED

SMF spam blocked by CleanTalk