Solved Set variable from within the script editor

Jephed

Trainer
Member
Posts
98
#1
Hello!

I stumbled upon a small thing that I can't seem to find the solution for.

Basically, I want to set a variable from within the script editor. After that specific variable is set, it needs to trigger an event in my intro map.
I'm doing my intro (with gender and name decision) partially inside the script editor.

I'm trying to set variable 0038 (Gender 1=B/2=G) from within my script, but I can't seem to make it work. I've looked on the Essentials Wiki and searched through already existing scripts, but I can't seem to find the proper way to set the variable and trigger the event.

I hope somebody can help me out with this!
 

leilou

A wild Minun appeared!
Member
Posts
205
#2
use the following line:
Code:
$game_variables[38] = 1
but if you want another event to be triggered you''ll need to reload the map ...

sorry about the switches ... that just seems to work if you set them through an event not through the script ($game_switches[x]=true) won't work to trigger events without map reload
 
Last edited:
Top