Controlling self switches from common events

● ARCHIVED · READ-ONLY
Started by Llov11 10 posts View original ↗
  1. Hello friends! I didn't find any information about this in the forum. I guess my question is if it's possible to control the state of a self switch of an event via common events. Maybe it involves some scripting, if that is the case I would really appreciate if you could help me out!

    Thank you so much and sorry for my english.
  2. $game_self_switches[[mapid,eventid,switch]]

    so like of you want to modify the self switch A of event 1 in map 1

    Code:
    $game_self_switches[[1,1,"A"]]=true/false
  3. Engr. Adiktuzmiko said:
    $game_self_switches[[mapid,eventid,switch]]

    so like of you want to modify the self switch A of event 1 in map 1

    Code:
    $game_self_switches[[1,1,"A"]]=true/false

    Thank you so much for your answer! It's exactly what I needed!

    Kudos for you my friend.
  4. How are you calling your common event? If it is a parallel process or autorun event, conditioned by a switch, you will have to use the above method. You will also have to use that method if the common event is attached to an item or skill, and is run when the item or skill is used in battle or from the menu.

    However, if you are calling it directly from an event, using the Common Event command, it just becomes an extension to the event that calls it, and you can use the Control Self Switch command, and it will change the self switches on the event that did the calling.
  5. Shaz said:
    How are you calling your common event? If it is a parallel process or autorun event, conditioned by a switch, you will have to use the above method. You will also have to use that method if the common event is attached to an item or skill, and is run when the item or skill is used in battle or from the menu.

    However, if you are calling it directly from an event, using the Common Event command, it just becomes an extension to the event that calls it, and you can use the Control Self Switch command, and it will change the self switches on the event that did the calling.
    Hi! It's attached to an ítem. I'm trying to implement a portal gun, like the game Portal. Whenever the portal gun (which is associated with a button) is fired, it calls a common event. So this method works like a charm.

    Thank you for your help!
  6. Hello! Sorry to bother you again. I'm not sure this is the right place to ask something else. Maybe I should make another thread, but since it's related to the concept of the portal gun before mentioned I thought maybe it's not so off topic.

    Is there a way to make a conditional branch that checks wether or not THIS event is in a given region? I'm guessing there has to be a way to store the position of the event in a variable and check the region ID that such position has. I have the feeling that i'm missing a little script call to do so.

    I would really appreciate your help!

    [EDIT]: Don't worry I posted another thread. Thank you!
  7. yeah, it might be related to the portal gun, but it's not related to changing self switches, so another thread is the go :)
  8. Llov11 said:
    Hello! Sorry to bother you again. I'm not sure this is the right place to ask something else. Maybe I should make another thread, but since it's related to the concept of the portal gun before mentioned I thought maybe it's not so off topic.

    Is there a way to make a conditional branch that checks wether or not THIS event is in a given region? I'm guessing there has to be a way to store the position of the event in a variable and check the region ID that such position has. I have the feeling that i'm missing a little script call to do so.

    I would really appreciate your help!

    [EDIT]: Don't worry I posted another thread. Thank you!


    I just finished my own completely evented portal gun and wondered if you ever finished yours. I never thought to govern placement by region. I went with ◆If:Script:$gameMap.isPassable(x, y, d) && $gamePlayer.canPass(x, y, d)
  9. CynicSyndrome said:
    I just finished my own completely evented portal gun and wondered if you ever finished yours. I never thought to govern placement by region. I went with ◆If:Script:$gameMap.isPassable(x, y, d) && $gamePlayer.canPass(x, y, d)
    Yeah, but the solution you posted is for RMMV, not VXA. Besides, it's an old question.
  10. [necro]CynicSyndrome[/necro]


    [mod]Closing[/mod]