How to make Momentary switch in one block Without Script?

pangloy

Veteran
Veteran
Joined
Nov 13, 2018
Messages
30
Reaction score
0
First Language
Thai
Primarily Uses
RMMV
Hello.
How to make Momentary switch in one block Without Script?

Example :
when step on switch = +1 score (add score)
when step out switch = -1 score (Remove score)

I don't want to make 8 of (-1 score) blocks surround one middle (+1 score) block.

How to make Momentary switch in one block Without Script?
Thank you so much. :kaocry:
 

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,520
Reaction score
1,564
First Language
Spanish
Primarily Uses
RMVXA
on an event touch page, trigger a change to a second page in parallel process, with it checking a condition for not-in-coordinate.
in the not-in-coordinate case true, reset the page, in false, pass.

whatever your coordinate might be, and whatever your process for counting might be.
 

pangloy

Veteran
Veteran
Joined
Nov 13, 2018
Messages
30
Reaction score
0
First Language
Thai
Primarily Uses
RMMV
Sorry. :kaocry:
How to "checking a condition for not-in-coordinate".
My english not good. :kaocry:
Thank you.
 

pangloy

Veteran
Veteran
Joined
Nov 13, 2018
Messages
30
Reaction score
0
First Language
Thai
Primarily Uses
RMMV
I Got It. Make something happen when I face off button
Face off = Move out button
:kaohi:
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
34,273
Reaction score
8,727
First Language
German
Primarily Uses
RMMV
@pangloy the problem here is that you're using unknown nomenclature - there are no "momentary switches" in the RPG-Makers, so we can only guess what you're talking about.

Can you switch the editor to english and then make a screenshot of the event pages? That would show us what you're trying to do.
 

pangloy

Veteran
Veteran
Joined
Nov 13, 2018
Messages
30
Reaction score
0
First Language
Thai
Primarily Uses
RMMV
181120112904.jpg
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
34,273
Reaction score
8,727
First Language
German
Primarily Uses
RMMV
@pangloy
I asked for the screenshot of the event pages to see what the event should do, so that we can see what you want from there.
your partial screenshots don't explain anything - why would you want to set a variable to 0 or to 1 depending on the position, and what should that variable then do?
 

pangloy

Veteran
Veteran
Joined
Nov 13, 2018
Messages
30
Reaction score
0
First Language
Thai
Primarily Uses
RMMV
"set a variable to 0 or to 1 depending on the position"
Oh !!! I got it
Thank you. :)
 

cfmss

Warper
Member
Joined
Nov 22, 2018
Messages
2
Reaction score
0
First Language
Spanish
Primarily Uses
RMMV
Hello! I just created this account to ask for help, but since my question is pretty similar to what Pangloy is asking here I thought it would be better to reply to this thread if possible?

Basically what I want to do is to make it so only when a player is standing on a tile, a switch is turned on. The moment they move to another, it should turn off.

A way to do it, as Pangloy showed in the screenshots, is making all the tiles adjacent to the ON tile trigger the OFF state, but that's a little inconvenient. Do you think there is any way to make this possible? gstv87 seems to know but I couldn't understand the explanation.
 

pangloy

Veteran
Veteran
Joined
Nov 13, 2018
Messages
30
Reaction score
0
First Language
Thai
Primarily Uses
RMMV
OK! This is "Momentary switch"
Make 2 Events on map.

First event is

◆Comment:Make this program to keep an eye on on X and Y of Map.
◆Control Variables:#0001 switch X = 7
◆Control Variables:#0002 switch Y = 5

◆Comment:Make this program to keep an eye on on X and Y of Player.
◆Control Variables:#0003 player X = Map X of Player
◆Control Variables:#0004 player Y = Map Y of Player

Don't forget to set it "Parallel".

------------
Make Second event (Your BUTTON) and Don't forget to set it "Player Touch".

◆Comment:This is "First page".

◆If:player X = switch X
◆If:player Y = switch Y
◆Text:None, Window, Bottom
:Text:Something turn on.
◆Control Self Switch:A = ON

:End

:End
------------------------

◆Comment:This is "Self switch A" page. Don't forget to set it "Parallel"

◆If:player X ≠ switch X
◆Text:None, Window, Bottom
:Text:Something turn off.

◆Comment:Control Self switch A off = Back to "First page" for use this switch again.
◆Control Self Switch:A = OFF

:End

◆If:player Y ≠ switch Y
◆Text:None, Window, Bottom
:Text:Something turn off.

◆Comment:Control Self switch A off = Back to "First page" for use this switch again.
◆Control Self Switch:A = OFF

:End
 
Last edited:

cfmss

Warper
Member
Joined
Nov 22, 2018
Messages
2
Reaction score
0
First Language
Spanish
Primarily Uses
RMMV
Oh yeah that totally works!!
Another way I found is to only use one event. I will attach pictures:
b21c4f001e3e699faaecb80a587cff59.png


That script call at the beginning can automatically set the Player coordinates:
$gamePlayer.x == 9 && $gamePlayer.y == 6 && $gamePlayer._direction == 6 && $gameMap._mapId == 2

(I didn't include the direction since in this case it's irrelevant, but you have the option).

So that way, only when the Player is standing on that tile, whatever Variable/Switch will turn on. You then proceed to turn it off using a second page (triggered by self switch A), like this,
fe0de2cb66b393d96bab3d635381776b.png

Very important that the trigger is parallel, so the moment they move in any direction, it goes down!

I don't think it's as elegant as yours, but it also works :)
 

Latest Threads

Latest Posts

Latest Profile Posts

All new MZ Weather & Title updates are also RETRO'able for MV! Updated RETRO project will be released on same day I'll release updated MZ demo -project!

retro.png
Just lost about half a day's worth of work because rpg maker crashed during playtesting and corrupted my file :kaolivid:
Boku.gif
advanced_puzzling.PNG
Having a lot of fun making different poses for my character sets! Open to suggestions/critique!

CSKttqh.png

AABS laser beams features:
1,Shoot penetrating laser beams for player's normal attack
2,Beam's width/damage/comsumes/loot can be controlled by events/variables with great flexibility
3,Beam can rebound to walls or certain regionID
4,Can play SE when shooting beams
5,Beam's images can be solid images or animated ones.

Forum statistics

Threads
117,018
Messages
1,103,887
Members
152,923
Latest member
mistikal
Top