Exist an condition script for when event is on off screen?

JulioManeiiro

Villager
Member
Joined
Jul 19, 2017
Messages
20
Reaction score
3
First Language
Portuguese
Primarily Uses
RMMV
Hello Good morning / afternoon or night! I have an ambitious project that is demanding as much as I can take advantage of the MV and currently I have a huge "wall", I would like to make a condition in a parallel process that when an event is off the screen an action will happen that I wish.

That's basically it, I would like a script to use as a condition when the event is off the screen.

I looked inside the MV code itself but I didn't find anything that made sense to me (I have very little knowledge of JS however, I tried).

I will be waiting for an answer and in advance, thank you very much to everyone who tries to help me! <3

(Sorry if the post was not posted in the correct place)
 
Last edited:

Rugman

Veteran
Veteran
Joined
Jun 11, 2020
Messages
146
Reaction score
37
First Language
English
Primarily Uses
RMMV
You can set variables= to the players X and Y coordinates. Then check if an events coordinates are a certain amount greater or less than those variables.
 

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
1,707
Reaction score
1,123
First Language
Portuguese - Br
Primarily Uses
RMMZ
Hi!
I did not try, but maybe you can use this script call:
$gameMap.event(id).isNearTheScreen();

I think this will return true if the event is INSIDE the game screen. And false if it is outside.

So you can put this on your conditional branch script:
!$gameMap.event(id).isNearTheScreen();
Which means if he is outside, do your thing.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Frostorm wrote on Featherbrain's profile.
Hey, so what species are your raptors? Any of these?
... so here's my main characters running around inside "Headspace", a place people use as a safe place away from anxious/panic related thinking.
Stream will be live shortly! I will be doing some music tonight! Feel free to drop by!
Made transition effects for going inside or outside using zoom, pixi filter, and a shutter effect
I have gathered enough feedback from a few selected people. But it is still available if you want to sign up https://forums.rpgmakerweb.com/index.php?threads/looking-for-testers-a-closed-tech-demo.130774/

Forum statistics

Threads
105,992
Messages
1,018,196
Members
137,773
Latest member
Kirakirna
Top