Matombo

Veteran
Veteran
Joined
Jun 4, 2014
Messages
377
Reaction score
105
First Language
German
Primarily Uses
so i have a random moving npc but i want to block him off from blocking a entrance

in ace i just did a empty event in front of the entrance and the npc wasn't walink over it

in mv this dosn't work anymore ...

other suggestions?
 

Matombo

Veteran
Veteran
Joined
Jun 4, 2014
Messages
377
Reaction score
105
First Language
German
Primarily Uses
no other way? i allready use regions for stepping sounds xD

(well the workaround is to make 2 regions with the same stepping sounds and mix them)

edit: damn since you only have 1 reagion to restrict this dosn't really work
 
Last edited by a moderator:

TheJamesWhitman

Villager
Member
Joined
Oct 25, 2015
Messages
6
Reaction score
1
First Language
English
Okay, this worked for me, to keep an NPC in the left half of a map:

1) First event page of the NPC, set Autonomous Movement to 'fixed' and Trigger to 'parallel'.

2) First line of Contents, select Control Variables and set a variable to 'character', 'this event', 'map x'. This tracks the x-position of this NPC on the map.

3) Second line is a conditional branch, with an 'Else'. If the variable you set in step (2) = the x coordinate of your 'you shall not pass' line on the map, 'Move Left'. This will force the NPC to turn left each time it wanders too far to the right. Else, 'Move Random'.

That's it! Obviously, this just keeps your NPC in the left side of your map.

Note: There might be a more elegant way to do this, using switches, but this works for me.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,855
Reaction score
12,391
First Language
English
Primarily Uses
RMMZ
I'm not sure that I would advocate using parallel processes unnecessarily.  They can so easily turn into lag.

Another option - Galv has ported his nifty Move Route Extras.  One of the options is to allow NPCs to wander around randomly within designated regions.
 

Matombo

Veteran
Veteran
Joined
Jun 4, 2014
Messages
377
Reaction score
105
First Language
German
Primarily Uses
ok i edited yanflys scripted and hacked in that i can define multiple region id's as blocking

with this i can build a workaround. (1 non blocking region if with stepping spund and one blocking region ad with stepping sound per different stepping soundfile)

Would share it with you but atm it's some ugly frankenscripting and i don't know how to make proper script addons (i will look into it if i have time)
 

Latest Threads

Latest Profile Posts

I know I'll put one of my game's sprites here to give the illusion that I am a productive member of game society.
handelspriteanim.gif
Preparing untested English localization for DOWNFALLEN.

unknown-43.png
Sometimes I wonder if I feature creep... 225 magic spells is a lot lol.

Forum statistics

Threads
124,499
Messages
1,164,059
Members
163,328
Latest member
Baticles
Top