kalfax

The aspiring one.
Veteran
Joined
Mar 2, 2016
Messages
77
Reaction score
6
First Language
Norwegian
Primarily Uses
RMMV
I've been testing with an event for a while, trying to get it to locate my player x and y location and then summon under me, but it only works out in one map because the event has to be created over in every map, its so annoying, so i was wondering if anyone know a better way of doing it? Thanks everyone.
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
8,750
Reaction score
5,767
First Language
Dutch
Primarily Uses
RMXP
Tutorials is where people post tutorials, not support questions.

I've moved this thread to MV Support. Thank you.

 

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,422
Reaction score
1,436
First Language
Spanish
Primarily Uses
RMVXA
common event.
that's the reason common events exist: to be available across the lot of maps.
 

kalfax

The aspiring one.
Veteran
Joined
Mar 2, 2016
Messages
77
Reaction score
6
First Language
Norwegian
Primarily Uses
RMMV
common event.
that's the reason common events exist: to be available across the lot of maps.
could you please tell me how to set it up? :) i'd like an item to be able to be summoned at an area, basically creating an event, and then have it be able to be picked up again.
the issue im having is making it get summoned on my players location on all maps.
 

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,422
Reaction score
1,436
First Language
Spanish
Primarily Uses
RMVXA
put the code for scanning for your player's coordinates in a common event, and call that event from the map.

I don't know what you're doing, so I can't be more specific.... but if you want to have an event be relative to the player, you put the routine in a common event.
that's what CE's are there for: to be available everywhere.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
33,383
Reaction score
8,397
First Language
German
Primarily Uses
RMMV
@gstv87 common events don't help here because he wants to place something on every map, and only map events can be placed on maps. common events run everywhere but they are never on a map position.

@kalfax you need a map event to be placed, and that means there are only two ways to create that:
either you have one map event reserved for this on every map (and it needs to have the same event ID on every map) to be used by the common event, or you need a plugin to clone events from another map.
no other way possible because the default engine does not support creation of events.
 

kalfax

The aspiring one.
Veteran
Joined
Mar 2, 2016
Messages
77
Reaction score
6
First Language
Norwegian
Primarily Uses
RMMV
i tried clone events, but when i copy paste em into other maps it doesn't work.
and i want the player to be able to put it down on the player, so i don't want set areas where its placed on a map.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
33,383
Reaction score
8,397
First Language
German
Primarily Uses
RMMV
i tried clone events, but when i copy paste em into other maps it doesn't work.
with clone events, you NEVER copy&paste. You give the command to clone the event to the position of your choice in the (common) event that is to place the cloned event into the current map.

And the original event exists only once, preferable on a map that the player never enters
 

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,422
Reaction score
1,436
First Language
Spanish
Primarily Uses
RMVXA
common events don't help here because he wants to place something on every map, and only map events can be placed on maps. common events run everywhere but they are never on a map position.

you make the common event relative to the player, and call the common event from that map event you place in every map.
hard to explain without looking at the actual thing, but I believe I did that before, QUITE more complex than that.

no other way possible because the default engine does not support creation of events.

*BUZZER!* False!
the engine's whole deal is creating logical objects (memory spaces, with defined values for their properties) from physical objects (the actual code defining the event and it's properties, in the game's files).
you can do that, if you ask the engine to run the same instructions, but in another context.
you don't even need a plugin for that (technically, you'd be creating your own plugin), because you'd be using the game's own code.

@kalfax, the question is this: can you describe the process of what needs to happen (what you expect to happen) and what's the intended result? specifically?
 

Bex

Veteran
Veteran
Joined
Aug 2, 2013
Messages
1,502
Reaction score
412
First Language
German
Primarily Uses
RMMV
1.
How many Objects to summon at once?
2.
If Item is not getting picked up, is it ok that it disapears when map is left or if some amount of time passes?
3.
How do we summon the Item? Do we use a Item in Inventory, a Skill, a Button press?
4.
Are there any other details/information which could be useful?
 

kalfax

The aspiring one.
Veteran
Joined
Mar 2, 2016
Messages
77
Reaction score
6
First Language
Norwegian
Primarily Uses
RMMV
one object is summoned at once, if its not picked up itll stay there until the player picks it up.
to summon it its an item in the inventory.
ill post pics of all i have right now.
upload_2019-3-13_21-2-58.png
upload_2019-3-13_21-3-24.pngupload_2019-3-13_21-3-58.pngupload_2019-3-13_21-4-52.png
edit: i also made a second event in case it works better:
upload_2019-3-13_21-5-55.png
 
  • Like
Reactions: Bex

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,422
Reaction score
1,436
First Language
Spanish
Primarily Uses
RMVXA
is the object dropped onto the map supposed to stay there even after the player leaves the map?
 

Bex

Veteran
Veteran
Joined
Aug 2, 2013
Messages
1,502
Reaction score
412
First Language
German
Primarily Uses
RMMV
I dont have much time at the moment, but i noted a few errors in the Pictures.

Item List Picture:
Occasion: Only from Menu, this would not work in Battle.

Calling Bank Chest Picture:
You dont need to remove the Item, the Item removed itself, because its consumable.
Edit: Found a possible theoretical solution which works on all maps. Delete Set Eventlocation also!

Also if several Eventpages meet there Conditions, only the highest pagenumber meeting conditions will be executed.
So your Event39 will always have its second Eventpage turned On, or non at all, so the 1st Page never runs.
It looks like you fixed that in your second attempt.

So if Event 42 is the Event for chest on every map, than the common event should not turn on a global switch, but the self switch of event42 on the current map, else it would be On on every Map. So remove the Switch in Common Event and in Event 42 change Page condition to Self SwitchA. (Sorry much text and my english isnt always good for explaining)
To turn Self Switch On in Common Event for Event42 on current Map, you need to insert this as Event Scriptcommand:
Code:
$gameSelfSwitches.setValue([$gameMap.mapId(), 42, 'A'], true)

If you wonder how we set the Chest Event on Position? Now comes the Magic =), we use the Autonomous Moveroute of Event42,
turn Frequency to Highest , than enter the moveroute: no repeat, and as scriptcode command you insert:
Code:
$gameMap.events()[ this._eventId - 1 ].setPosition( $gameVariables.value(35), $gameVariables.value(36) );

It uses the variable 35 and 36 for x and y, since those values dont change and since the moveroute reexecutes when map is reentered, this makes that the chest stays on place, even if you change the map.

I did not rebuild it, but it should work. Your Pictures were very Helpful.

Edit: Oh no Murphys Law, a theoretical bug appeared =).
The moveroute of the chest would have trouble setting the chest on position if its far outside of visible screen, when map is reentered.

To fix this we need one more Event on every map. It also needs the same id on every map.
1. Common Event Activates Self Switch A of new Event.

2. New Event lets call it "PositionLoader" is on paralell, it sets the Chest Event on Location with Eventcommand Moveroute. Than it turns the Self Switch A of Chest On. Than it uses Eventcommand Erase Event. Thatway its erased until map is reentered.

3.Chest Event, we delete the autonomous moveroute. When we pick up the chest, make sure to deactivate self switch A of "PositionLoader" and self switch A of Chest.

Sorry for this confusion but now it also works on very huge maps.
I often seem to run into errors after i completed something. My apologies.
 
Last edited:

kalfax

The aspiring one.
Veteran
Joined
Mar 2, 2016
Messages
77
Reaction score
6
First Language
Norwegian
Primarily Uses
RMMV
This would be a bit easier with pictures, hehe sorry. i'm a bit bad at figuring it all out. not used to scripts and location commands.
EDIT: i just figured i could make it way easier by simply opening up the bank window once, and making the cost that the item disappears, with no pick up option... then since its consumable, i'll just have to make a store that sells them... why didn't i think of this before? granted, it's not as cool... but maybe i should go for the easy option? what do you guys think?
 
Last edited:

Bex

Veteran
Veteran
Joined
Aug 2, 2013
Messages
1,502
Reaction score
412
First Language
German
Primarily Uses
RMMV
Thats a valid solution, what would happen if you left your chest in some area accross the world, you would need to travel very far,
also what if that area becomes inaccessable.
So yes your new solution might be more fitting.

Also what does this chest thingy do exactly and does it have a good reason for existing?
 

kalfax

The aspiring one.
Veteran
Joined
Mar 2, 2016
Messages
77
Reaction score
6
First Language
Norwegian
Primarily Uses
RMMV
Yes, its a storage container. :) it can keep up to 999 items in it. with stacked items like potions, ores or wood etc going up to 999 as well.
stuff like weapons (which have different stats and such) will take one space each, and won't stack.
I used yanfly's itemcore to limit the items, weapons and armor in the inventory, so that the storage system has a use. i didn't add a weight system though, cause i felt like that might be contradicting the inventory space, and would require a lot of balancing, so i think limiting items etc will be enough.
i've already got chests set up in cities, but i figured if a persons inventory is full they would want to deposit some on the go. :)
i recently added an option to buy the consumable chests for quest points. (i use quest points as currency for rare armor, weapons, skills, etc.)
a player will get a consumable chest for free at the beginning of the game, there will also be a storage chest in the first town so they won't have to use it right away. :) so yeah, now with the new system the consumable chest won't show up in game, but will instead just open a window for the storage i use in towns, so you can deposit or withdraw items while having it open, but after closing it you need a new consumable item :)
 

Latest Threads

Latest Posts

Latest Profile Posts

Tiamat-86 wrote on Andar's profile.
tfw just trying to help and get yelled at. /comfort
:LZSooo: Gotcha Gotcha Games... have launched an official discord server for RPG Maker. :LZSooo:

doodled a poring today :kaoluv:
uc
Fire-Emblem Style Level Up System, Boost on Class Change, And Animated Arrows | RPG Maker News #115

Why keyboards don't sleep? Because they have two shifts.

Forum statistics

Threads
113,945
Messages
1,078,583
Members
148,050
Latest member
dramacoolanetamak
Top