RPG Maker Forums

How to clear a Timeout in a var ??


I try many tricks, but no one work.


The timer , never reset correctly.


If i click fast, the timer doesn't reset and make some bad thing


Tank you guys

Code:
function AvatarAnim(WhatToDo,ID) { //when run this function do this
if (WhatToDo == 'SHOW') {
$gameScreen.showPicture(ID, 'H1-IDLE-talking-happy-6', 1, -280, GameReScreenY-250, 100, 100, 255, 0);
$gameScreen.picture(ID)._angle = -40;
new IAVRA.ANIMATE.Tween($gameScreen.picture(ID), {  _x: 160,_angle: 0, _scaleY: 100 }).easing(IAVRA.EASING.quad.out).duration(20).start();
  
// here clear timer inside the var timerAvatar if exist
clearTimeout(timerAvatar);
 // here add new timer to var timerAvatar with 500 MS
var timerAvatar = setTimeout(function() {$gameScreen.showPicture(ID, 'H1-IDLE-0', 1, $gameScreen.picture(ID)._x, $gameScreen.picture(ID)._y, 100, 100, 255, 0); }, 500);;
}
}

Latest Threads

Latest Posts

Latest Profile Posts

He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!

Forum statistics

Threads
106,036
Messages
1,018,461
Members
137,821
Latest member
Capterson
Top