Dungeon Tools Help

IAmVianca

Veteran
Veteran
Joined
Nov 4, 2015
Messages
99
Reaction score
4
First Language
English
Okay, so I have been tinkering with the variables and stuff after Andar was kind enough to explain some of it to me and I have managed to create 3 dungeon tools (things the player can use on the map to interact with other events on the map...sorta like the ones from Wild Arms) even with the lack of plugins for this kinda thing.


I've managed to make a bomb that can break rocks, a sword to smash objects, and a fairy-helper-person who can reach otherwise unreachable chests and items (including switches on the map). They are all working as they should (based solely on what they should/could do), except for the last one.


1. First point: I can get Solene (the fairy-helper-person) to appear, and interact with objects and such, but there are some areas in the map that I do not wish for her to be able to move to.


I have this test map:





As you can see there are dead trees on the lower right of the map, and a chest. Those trees can only be cut down by Actor 2's sword (which is working perfectly). And that is the only way that the chest can be obtained. Now, Actor 3 has Solene. Solene can--as I have said--move to places the Player otherwise couldn't and open chests (such as the one on the left of the test map. She can open that chest just fine. And I didn't set the treasure being surrounded by the trees to be opened up by her. What I am trying to do, however, is to keep Selene from getting within the space around those trees and even atop the trees themselves.


To make it clear, what I am trying to do is that when the Player presses the "Q" key on the keyboard, there are some places even Solene can't get to and at such places, instead of materializing where she would normally go upon pressing that key, she would be a step behind whatever event/tileset is blocking her.


What I have so far, is this event for the player pressing the button and the event tied to that which makes Solene appear:





Selene herself has an event on the map (she's that event on the left hand side of the map)...so do the other "tools".


Now, my question is:


In this setup since I am not using the move route to move Selene, how can I go about keeping her from getting to those places. Like hinder her by those trees, a wall, the fences and stuff like that?


2. Second point: As I have stated above, the Player can call up these "tools" by pressing the 'Q' key. My second question is: how do I keep the player from using a tool immediately after using a first one?


What I mean to say is, the Player will be able to rotate who the leader is (as these "tools" can only be used if a specific actor is the Leader of the party) by pressing the "W" key. I want to keep the player from quickly changing leaders to use a different tool. Or making Selene appear too much just for the heck of it even when she isn't particularly needed. Without limiting the tools themselves.


3. Third point: As I have mentioned above as well, the Player can change the Party Leader by using the "W" key. I have, upon research, found this script call for that purpose:


$gameParty._actors.push($gameParty._actors.shift());
$gamePlayer.refresh();
$gameMap.requestRefresh();


And created a common event called "Leader Change" that checks whether "W" is pressed and then runs the code above.


The problem is that there are instances when all the code does is flicker and not change the positioning/formation of the actors as it would have.


So, is there any other way to do this whole Leader-change thing without the Player having to go into the Menu and change formation there?


Thank you again in advance for the help anyone will be able to provide me with this.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
1) If you aren't using move routes for the event, then you need to check each coordinate yourself until you find an allowed one.


That is a lot of mathematical calculations (control variable on coordinates and numbers) combined with a get location info to check for region ID and/or events.


Sorry, I don't have time to go into details or read your event code at the moment


2) The event that checks for the key presses should disable itself for a number of frames before enabling itself.


Details depend on how you check for the key presses.


3) yes, it should be doable exactly as you planned - but I suspect the flickering is due to changing leaders several times and ending back at the original.


If that is the case, then 1) solves this as well - if it is not, please post a screenshot of that event as well to check.
 

IAmVianca

Veteran
Veteran
Joined
Nov 4, 2015
Messages
99
Reaction score
4
First Language
English
1) If you aren't using move routes for the event, then you need to check each coordinate yourself until you find an allowed one.


That is a lot of mathematical calculations (control variable on coordinates and numbers) combined with a get location info to check for region ID and/or events.


I tried using move routes for the Solene event, but it wouldn't go towards the direction that the player was facing, so I ended up with getting the X and Y coordinates, placing them in a variable, and then adding or subtracting 4 to them to get it to work. Base from your reply, does it mean that this "Solene Tool" is a difficult one to make the way I envisioned her to function?

2) The event that checks for the key presses should disable itself for a number of frames before enabling itself.


Details depend on how you check for the key presses.


3) yes, it should be doable exactly as you planned - but I suspect the flickering is due to changing leaders several times and ending back at the original.


If that is the case, then 1) solves this as well - if it is not, please post a screenshot of that event as well to check.


How would I go about doing that? By adding a "Wait" command into it? Is that correct? Or do I need to make use of something else?


Right now, I make use of the same kind of check for key presses as I do with the Tools (which is through a conditional branch--the only way I know how to check for this thing):


 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
How do you trigger that event?


If called by a skill the chance to press the pagedown button in the correct frame is very low, and it has no trigger on its own...
 

IAmVianca

Veteran
Veteran
Joined
Nov 4, 2015
Messages
99
Reaction score
4
First Language
English
How do you trigger that event?


If called by a skill the chance to press the pagedown button in the correct frame is very low, and it has no trigger on its own...


Not a skill.


I have a Parallel Event on the map that calls on the common event called "Leader Change". 
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
Then why don't you make the common event the parallel process and don't use a map event?


That is a bit backwards how you're doing it...


And if that is really needed, we would have to see the event that calls this - but it is probably the reason why the wait doesn't work for you - the next call of the map event calls a new instance of the common event, completely ignoring that the first instance is still on wait.
 

IAmVianca

Veteran
Veteran
Joined
Nov 4, 2015
Messages
99
Reaction score
4
First Language
English
Then why don't you make the common event the parallel process and don't use a map event?


That is a bit backwards how you're doing it...


And if that is really needed, we would have to see the event that calls this - but it is probably the reason why the wait doesn't work for you - the next call of the map event calls a new instance of the common event, completely ignoring that the first instance is still on wait.


Well, when I was eventing it, I thought of using just the Common Event's parallel event, but then it asked me what switch goes with it. Considering I wasn't using any switches for it, I didn't think of going down that direction any more.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
The switch is there to activate or deactivate the parallel process - it needs to be activated once at start if you're using it on every map, and you can use the switch to switch off that option on maps where you don't want the player to change the order. That's all.


Instead of that, you now have to make a map event calling it on every map in your game...
 

IAmVianca

Veteran
Veteran
Joined
Nov 4, 2015
Messages
99
Reaction score
4
First Language
English
The switch is there to activate or deactivate the parallel process - it needs to be activated once at start if you're using it on every map, and you can use the switch to switch off that option on maps where you don't want the player to change the order. That's all.


Instead of that, you now have to make a map event calling it on every map in your game...


Ah, now I see it. I didn't think that far ahead since I was just messing around with it (before putting it into my project) in another test project with just one map. Your suggestion makes far more sense and less hassle.


Alright, I'll change it so that it would use a switch.


I am still stuck with the Solene "tool", though, as I still cannot get it to work the way I want it to.


Will using the "step away from the actor" move route four times give the desire effect of moving Solene 4 tiles away from the actor and towards the direction the actor is facing? I tried doing it with a "step forward" move route, but all it did was get Solene--once she appeared--to move down 4 tiles on the map.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
I'm not sure - problem is that I don't have the concentration at the moment to read through your code to learn what it really does, so I can only point out to some basic facts.
 

IAmVianca

Veteran
Veteran
Joined
Nov 4, 2015
Messages
99
Reaction score
4
First Language
English
Oh, well, I tested it out and Move Away From Player does work.


I just don't know how I could make it possible now to allow Solene to cross impassable tiles while barring her from some tiles (ex. she can get to the island to the left of my first screenshot in this thread but can't get past anything else on the map).


Is there a way to make use of Region IDs for this? Because so far all I've read are the uses of the Region IDs for the Player Character and not on events.


Okay, so I got it to work as intended (with Solene not being able to go some places), but I am not sure if the way I evented it is efficient or if there is a cleaner way to event it.



This is what I did:





I made use of the code I found:


$gameMap.regionId($gameMap.event(EventID#).x, $gameMap.event(EventID#).y) === REGIONID


Then to keep the player from moving while Solene is present in the map, I utilized a switch that turns on upon button press and calls for an Auto-Run Event as shown in the picture above.



Then, I dotted the map with Region 2s where Solene wasn't allowed to pass through.





So, yeah...is this an efficient way of doing this?
 
Last edited by a moderator:

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

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,865
Messages
1,017,059
Members
137,574
Latest member
nikisknight
Top