MV Change event's transparency via Script Call

I haven't found any so I decided to "guess" one... None of them works :C
Any suggestions?
And no, I can't use an event command for it.
1623395361827.png
you can do it probably in 2 ways it's best:

either use .opacity = 0 (or .opacity = false😉 or (.opacity = null😉
or the easier way of moveroute (this event or target the event to change
opacity to 0.

the 2nd one throught moveroute is the one I would use because easier
to control and targetting the events 🙂
Nothing seems to be working.

P.S. Please, don't suggest using event commands. I need a script call
1623396902785.png
use 1 = $gameMap.event(7).opacity = 0;
otherwise you need a tiny setup before hand

let ev = 7;
let opacity = 0
$gameMap.event(ev) = opacity;

it might return true in any way though.
you can use the console log to test things out.
I'm getting "... is not a function" or "YEP Core(or movement" script errors. I found a workaround which has nothing to do with opacity, but I still would like to know how come it didn't work for me.
this might work for scriptcall:

$gameMap.event(this._eventId).setOpacity(0);
$gameMap.event(x).setOpacity(0)

if you want it to control it by variable:
$gameMap.event(this._eventId).setOpacity($gameVariables.value(y), 0);

if those dont work, than I dont know anymore, but x = ID of the event,
and y for variableID if used if you want to change it in a different way.
It works! Thank you for your time! 🙂
Just as a bit of help, so you don't waste your time trying to "guess" code:

1 - Google. I typed "RPG Maker MV event script transparency" and immediately got posts on this forum with pertinent commands.

2 - The RPG Maker MV Library has all of MV's data types and their members. So you can click into the Game_Event type and see a list of member variables and functions you can use.
@ATT_Turan
I use Ecosia as my search engine plus often have to change my regions from the US to Spain depending on what I'm looking for and by guessing I mean that I used different forms the same script call in case some of them won't work.
I know about the library but I waste more time searching for what I need and trying to understand how to use what I got.
I'm not a Scripter and trying my best before posting here.
Additionally, rpgmakerweb's forum's search function isn't well optimized and whether you can or can't find something becomes a question of luck.
When a person says "Google," they refer to any search engine - if they properly index Web pages, typing a given combination of words should pull up roughly the same results. I know if I type Spanish words into something I'll get results from Spain-based sites. ¯\_(ツ)_/¯ Additionally, I'm not familiar specifically with Ecosia, but you ought to be able to specify a specific domain (e.g. rpgmakerweb.com) to search within.
rpgmakerweb's forum's search function isn't well optimized
This is why I get results from it using a regular search engine.
@ATT_Turan true I don't often use these technics, but you can't expect some "rando" from the internet to know about this or even learn it in case they're overwhelmed with life stuff, so "search better" advice is still ty. I'm not forcing anyone to respond to my threads and I hope they'll help some people in the future encountering the same problems.

Original thread: https://forums.rpgmakerweb.com/threads/change-events-transparency-via-script-call.137363/