Status
Not open for further replies.

gsuk

Veteran
Veteran
Joined
Jun 24, 2013
Messages
152
Reaction score
11
First Language
English
Primarily Uses
RMVXA
Hi all!

I'm trying to find a way to have swimming enemies on my maps that only swim in water. I'm using falcoa's ABS script, but I don't think that's particularly relevant (only for context of having enemy events on the maps).
One of my playable characters can swim – I use a swimming script that checks the player's XY coordinates and changes the sprite to a "swimming" sprite when it hits a certain terrain tag:

# * Determine if Actor can Swim
#--------------------------------------------------------------------------
def can_swim?(x,y)
# Actor ID Terrain Tag
$game_party.leader.class.id == 5 && $game_map.terrain_tag(x, y) == 7
end
end

Currently, any enemy 'events' on the map cannot pass over water tiles (unless they are above characters or have 'through' on), so my birds can fly over water, for example. I'd like to be able to have fish, etc, that can only swim in the water (despite the tiles not being passable).

I found Yanfly's Move Restrict Region v1.03, but it only allows for events to not move past certain boundaries – I need the events to be able to move within a certain region/terrain, which is not passable by other events.

Appreciate any help – thanks in advance!
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
44,200
Reaction score
15,547
First Language
English
Primarily Uses
RMMV
Can you not set those events to through so they can move in the water, and use the region script and draw with a region tag around the edges of the water so they can't move out?
 

gsuk

Veteran
Veteran
Joined
Jun 24, 2013
Messages
152
Reaction score
11
First Language
English
Primarily Uses
RMVXA
@Shaz No, because the through tag allows events to move through the region tag in Yanfly's script. :(
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
44,200
Reaction score
15,547
First Language
English
Primarily Uses
RMMV
What kind of water is it? If you use the water in the top right section of the tileset (the poison swamp), I think that's walkable.
 

gsuk

Veteran
Veteran
Joined
Jun 24, 2013
Messages
152
Reaction score
11
First Language
English
Primarily Uses
RMVXA
@Shaz I use all kinds of different water tiles. Like I said, I can make them walkable/swimmable for one of my characters, but I need to make them walkable/swimmable for certain enemies/events. I don't want them to be able to walk on any other tiles than the water tile, and I don't want any other enemies/events to be able to walk on the water (unless they are above chars or have through on – birds, bees etc.)

I'm beginning to think this might not be as simple as I'd hoped. Will probably need a script.
 

MushroomCake28

KAMO Studio
Global Mod
Joined
Nov 18, 2015
Messages
3,951
Reaction score
4,868
First Language
EN, FR
Primarily Uses
RMMZ

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

Latest Threads

Latest Posts

Latest Profile Posts

since all my maps are hand drawn... I admit, I super envy those who can make the tileset's work. I'm garbage at mapping, but slightly less bad at just drawing my own areas. plus it's easier to draw my own sprites than edit others to look like my characters.
Guys, I made a trailer! And, I also launched the Steam page! If you would like to support the game, please Wishlist it :ahappy: ->
working on some tilesets _ノ乙(、ン、)_

CIBl8xT.png


Oq8WKHX.png
aww man, color hex code #C4C4C4 doesn't work for the tint value in this scene I need something darker, which stinks just because I liked that one it was my favorite plastic explosive three times...#696969 (nice) should work better (WHY IS MY BRAIN LIKE THIS)
Tell it to me straight, doc. If I've been trying to piece together a "shorter" game to learn stuff outside of game jams... am I just running away from my WIP? :v

Forum statistics

Threads
117,284
Messages
1,106,133
Members
153,469
Latest member
CPGPPC
Top