Whats the script call to change the Opacity of a Sprite?

Just as the title asks, what is the script call to change the opacity of sprite? Not the player... an event.

Also, can you make it so that the Opacity can be changed by a variable? And called from the Move event command?
You can do this without a script.

I assume you're using RMMV.

Go into your choices for the event and select 'Set Movement Route' (Second Tab). From there, you pick the event from the drop down menu (it usually defaults to Player) and then you can either make it invisible (Transparent ON) or set the Opacity like you want with 'Change Opacity' 0 is invisible, 255 is 100% there.

Hope that helps
I know how to do that... what I want to do is make the events opacity change over time using a variable....
Code:
$gameMap.event(this._eventId).setOpacity(insert value here);
Code:
$gameMap.event(this._eventId).setOpacity($gameVariables.value(insert variable id here));
I know how to do that... what I want to do is make the events opacity change over time using a variable....

Ah. You never mentioned anything about doing it over time. My mistake.

Original thread: https://forums.rpgmakerweb.com/threads/whats-the-script-call-to-change-the-opacity-of-a-sprite.83866/