Good news, the Self Variables mod of Eli works for storing the value of the last event spawned.
Now, I have to figured out how to remotely change a self var.
EDIT : "$gameVariables.selfValue(mapid, eventid, selfvarid);" and "$gameVariables.setSelfValue([mapid, eventid, selfvarid], value);" return an error "$gameVariables.selfValue/$gameVariables.setSelfValue is not a fonction"...
EDIT2 : It's not written inside the description of the plugin, but it seems the Eli's Book is need for using these fonctions. So, now I dont have errors, but I tried with and without [], but I cant address a distant selfvar.
EDIT3 : In fact, I made a mistake, the mod of Eli is not replacing a global var by a local var, this ADD a local var ON a global var, this mean in my first test, I did set the global var, not the local var...
EDIT4 : Let's resume :
Code:
$gameVariables.setValue(33, $gameMap.event(this.eventId()).event().note);
I take a data (Here, the notetag), and I store it into the Global Var 33. It works.
Code:
this.setSv(32, $gameVariables.value(33));
Now, I store the content of the global var 33 into the local var 32. I dont know if it works at this step.
To check if the previous code was working, I create a text box where I show the local var 32 with the help of the Escape Codes of
@Eliaquim. This return... 0...
To control that's not related to the content of the Global Var 33, I set the local var 32 to 1. Dont work...
EDIT5 : Return to the starting case. I take again the first ID of the topic : taking the note tag from an event and puting it in an other event. Using global variable, this work for one event, but if I do it for 2 events, this fail. Maybe it's because it's a parallele event, I will set it in automatic.
EDIT6 : Okay, I'm making progress, but I have a strange behavior :
Autorun must FREEZE all other event, right ?
So, where is the issue :
Code:
Yanfly.SpawnEventAt(5, 63, $gameMap.event(this.eventId()).x, $gameMap.event(this.eventId()).y +1, true);
Step 1 : Creating an event.
Code:
$gameVariables.setValue(33, $gameMap.event(this.eventId()).event().note);
Step 2 : puting note of this event into the global var 33.
Code:
$gameVariables.setValue(32, $gameMap.LastSpawnedEventID());
Step 3 : puting the number of the event we created in the step 1 onto the global var 32.
Code:
$gameMap.event($gameVariables.value(32)).event().note = $gameVariables.value(33)
Step 4 : puting the data inside the glob var 33 into the note of the event number "stored in the glob. var. 32".
Until now, it works.
Step 5, doing everthing previously from an other event spawner.
Step 1, 2, 3, seems okay.
Step 4 : it is applying the note to EVERY PREVIOUS SPAWNED EVENTS !!!!!!!!!!!!!!!!!!!!!!!!!!!!! WHAT DA FAK !?????????
EDIT6 : I'm 100% sure the lastspawnedeventID return to me the right data, I did draw 2 text boxes, the results about their ID are correct.
I did write the previous steps into one line to avoid any perturbation on variables (32 & 33) :
Code:
$gameMap.event($gameMap.LastSpawnedEventID()).event().note = $gameMap.event(this.eventId()).event().note
<= this should not write on multiple event, only on one........ WHY does it do that !!§????