I've seen a few threads on here about implementing roguelike movement in MV. (Specifically, events dont move if the player stands still. think Etrian Odyssey or Legend of Grimrock). So I installed mv3d, figured out how to put things in first person view, and then started working on on-map enemies
I'm having some difficulties dealing with making enemies move in routes or patrol. Currently, I'm using a parallel event has all this mess in it.
basically, it just means that when im moving it turns on a switch. (though it doesnt work if im strafing with the q and e keys but thats a plugin problem that ill need to tackle later).
in addition, enemy events have two pages to them, the first one is just the static enemy/idle sprite animation and the second page has "if control switch #0001 = ON" and a movement scheme to it. both just have the call battle function with the standard "if win delete this event" on it.
so far so good. so long as I have the autonomous movement set to "go to player" or "random" it works fine, and I can use some yanfly plugins to designate tileset numbers as no-go-zones. Any single-line movement pattern seems to work. yanfly's movement options plugin has "hug right/left wall" as an option and that works fine.
now my issues are in making the enemies try to follow a pattern of movement that would require more than one line entry in the autonomous movement section. for example: patrol back and forth or go in a circle. normally, a standard custom route would solve this problem. however, any custom route I try to designate can only go through one, maybe two of it's commands before the switch turns off, the event reverts to the first event page and it stops moving. when the switch is activated again it essentially starts the commands from the top, meaning it cant get through the queued movement commands. I don't think theres an easy way to "save the spot" of the route. Im also aware that when turning the switch on, checking for a "button press" does not mean "did player move?" (and i think there's a script call to check for that?? im not sure how to use that. i should check basics of script calling).
so i guess my questions are this-
a) how do i set the "is the player moving?/has player moved?" check to make the control switch thing more elegant because i know theres a function for that and i just dont know how to use it
b) What are some ways to get the affected events to move in a route? i dont know how to allow the event to do something like "move right until you hit a wall, then turn on self switch A once you can't move" in the autonomous movement editor so i can do the opposite in a separate page.
Currently the only relevant plugins I have installed are mv3d, and some of the free Yanfly plugins namely Move Route Core, Extended Move Parameters, and Enemy Pursuit.
im also aware that Arisu wrote a "synchronized event movement" plugin that would solve all my problems with it's custom route functionality but that costs 8 bucks and i wanna see what i can do first
Thank you!
edit: i forgot to tag this as RMMV and i dont know how to edit the tags. im using MV version 1.6.2
edit edit: figured out how to tag lol
I'm having some difficulties dealing with making enemies move in routes or patrol. Currently, I'm using a parallel event has all this mess in it.
JavaScript:
◆Control Switches:#0001 hero moving = OFF
◆If:Button [Up] is pressed down
◆Control Switches:#0001 hero moving = ON
◆Set Movement Route:Player (Skip, Wait)
: :◇1 Step Forward
: :◇Switch OFF:0001
◆
:Else
◆Control Switches:#0001 hero moving = OFF
◆
:End
◆If:Button [Down] is pressed down
◆Control Switches:#0001 hero moving = ON
◆Set Movement Route:Player (Skip, Wait)
: :◇1 Step Backward
: :◇Switch OFF:0001
◆
:Else
◆Control Switches:#0001 hero moving = OFF
◆
:End
basically, it just means that when im moving it turns on a switch. (though it doesnt work if im strafing with the q and e keys but thats a plugin problem that ill need to tackle later).
in addition, enemy events have two pages to them, the first one is just the static enemy/idle sprite animation and the second page has "if control switch #0001 = ON" and a movement scheme to it. both just have the call battle function with the standard "if win delete this event" on it.
so far so good. so long as I have the autonomous movement set to "go to player" or "random" it works fine, and I can use some yanfly plugins to designate tileset numbers as no-go-zones. Any single-line movement pattern seems to work. yanfly's movement options plugin has "hug right/left wall" as an option and that works fine.
now my issues are in making the enemies try to follow a pattern of movement that would require more than one line entry in the autonomous movement section. for example: patrol back and forth or go in a circle. normally, a standard custom route would solve this problem. however, any custom route I try to designate can only go through one, maybe two of it's commands before the switch turns off, the event reverts to the first event page and it stops moving. when the switch is activated again it essentially starts the commands from the top, meaning it cant get through the queued movement commands. I don't think theres an easy way to "save the spot" of the route. Im also aware that when turning the switch on, checking for a "button press" does not mean "did player move?" (and i think there's a script call to check for that?? im not sure how to use that. i should check basics of script calling).
so i guess my questions are this-
a) how do i set the "is the player moving?/has player moved?" check to make the control switch thing more elegant because i know theres a function for that and i just dont know how to use it
b) What are some ways to get the affected events to move in a route? i dont know how to allow the event to do something like "move right until you hit a wall, then turn on self switch A once you can't move" in the autonomous movement editor so i can do the opposite in a separate page.
Currently the only relevant plugins I have installed are mv3d, and some of the free Yanfly plugins namely Move Route Core, Extended Move Parameters, and Enemy Pursuit.
im also aware that Arisu wrote a "synchronized event movement" plugin that would solve all my problems with it's custom route functionality but that costs 8 bucks and i wanna see what i can do first
Thank you!
edit: i forgot to tag this as RMMV and i dont know how to edit the tags. im using MV version 1.6.2
edit edit: figured out how to tag lol