ZackNH

Veteran
Veteran
Joined
Mar 26, 2018
Messages
36
Reaction score
2
First Language
English
Primarily Uses
RMMV
I'm new to the forum, so I'm not sure if this is the right place to post this.

I've been trying to put stealth into an RPG Maker VX Ace game using this script by Jet10985, but I'm having trouble with it. For some odd reason, events won't detect anything directly in their line of sight. If I'm standing off to the side, it's fine, but if I'm dead-on right in it's face, nothing.

I know very little about scripting, so I don't have the faintest idea as to why this is happening.

This is the script:

I set up a test area with as few variables as possible to show what I'm talking about.

q4pqJDf.png

Hgwm304.png
qTT3wjF.png
V3pnutj.png
RlWuPqz.png
19Pbz9d.png

EDIT:
Further testing has revealed that having a wall behind you, even when in vision, SOMETIMES hides you.

dUG4ND3.png

RH0p38u.png

ScCDYb0.png

7OeuFo1.png

zXBWm8F.png

XAUIgw2.png

okzjkpV.png
 
Last edited:

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
14,242
Reaction score
15,318
First Language
English
Primarily Uses
RMVXA

I've moved this thread to RGSSx Script Support. Thank you.

 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
36,281
Reaction score
9,703
First Language
German
Primarily Uses
RMMV
Where do you setup the height numbers for Region IDs and Terrain Tags?
That is most probably where you made your mistake, because without that setup the script does not know which tiles should block sight and which not.
 

ZackNH

Veteran
Veteran
Joined
Mar 26, 2018
Messages
36
Reaction score
2
First Language
English
Primarily Uses
RMMV
Where do you setup the height numbers for Region IDs and Terrain Tags?
That is most probably where you made your mistake, because without that setup the script does not know which tiles should block sight and which not.

I have no regions or terrain tags set. I haven't modified anything at all. Terrains and Regions are 0 by default, so there shouldn't be any reason why I can't be seen in front of it, but can be to the side.

XBkVkoW.png

Even when I do set Terrain Tags, they don't change anything.
When I try to use the scripts set_terrain_height(terrain_id, number) or set_region_height(region_id, number), I always get this:
mZcIufJ.png

This happened when I put in: set_terrain_height(1, 1)
vm9WYft.png

o9on2ED.png

Setting a Terrain Tag without the script call does nothing.
The same with Regions
RWZtr4z.png

6YRQzKa.png

lLa3vnP.png

B0SRwNU.png
 
Last edited:

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,201
Reaction score
862
First Language
Hungarian
Primarily Uses
RMVXA
The terrain script call error happens because of a copy/paste line forgotten how it is in the script.
Line 453 is this:
Code:
def set_region_height(ter, height)
But it should be this instead:
Code:
def set_terrain_height(ter, height)
So change that and it should work.

The second error with the region script call also happens because of a typo in the script.
Line 482 looks like this originally:
Code:
$game_map.set_right_height(reg, height)
But it should be this:
Code:
$game_map.set_region_height(reg, height)

Change these lines and the crashes won't happen anymore.
 

ZackNH

Veteran
Veteran
Joined
Mar 26, 2018
Messages
36
Reaction score
2
First Language
English
Primarily Uses
RMMV
The terrain script call error happens because of a copy/paste line forgotten how it is in the script.
Line 453 is this:
Code:
def set_region_height(ter, height)
But it should be this instead:
Code:
def set_terrain_height(ter, height)
So change that and it should work.

The second error with the region script call also happens because of a typo in the script.
Line 482 looks like this originally:
Code:
$game_map.set_right_height(reg, height)
But it should be this:
Code:
$game_map.set_region_height(reg, height)

Change these lines and the crashes won't happen anymore.

Awesome, that fixed the crashes, and the terrain tags seem to be working normally. Thanks.

However, I still can't be seen when standing directly in front the event. Perhaps there's another error in the script?
 

ZackNH

Veteran
Veteran
Joined
Mar 26, 2018
Messages
36
Reaction score
2
First Language
English
Primarily Uses
RMMV
I'm sorry if bumps aren't allowed, but my main problem wasn't fixed.

I still can't be seen when standing in front of the event, even with no terrain tags or regions, and I don't understand why standing against a wall will sometimes make it so you can't be seen at all.
 

Latest Threads

Latest Posts

Latest Profile Posts

My hand hurts from holding the pen for so many hours none stop...:kaocry:
Froggo32 wrote on Soulrender's profile.
I have to ask, who's on your pfp? The character really reminds me of Edgeworth from Ace Attorney lol. I'm really curious.

I'm trying to port L10nMV.js into XP, may probably (because this is my toy project in hobby) coming to XP, VX, VXA.

Learn more about L10nMV.js : https://github.com/Creta5164/L10nMV.js
L10nMV.js forum post : https://forums.rpgmakerweb.com/inde...r-game-without-modifying-your-project.120813/
Here's a gif of the reflection. Ace has some pretty cool sprite effects.
cYtUgp8.gif

Forum statistics

Threads
123,169
Messages
1,154,569
Members
161,533
Latest member
Chaos_Prince87
Top