Making events disappear without switches

BonnieLass

Veteran
Veteran
Joined
Mar 31, 2016
Messages
41
Reaction score
4
First Language
English
Primarily Uses
Hi everybody,


I'm making a game that allows you to sell items in a shop. I'm working on a system to allow for customer interactions. Basically I'm randomizing when customers will show up in the shop. I'm using orange custom events plugin to move an event from one map to another on a random region tile. This way the customer can pop up anywhere in the shop.


The trouble is when I advance the days variable, I want any customers events in the shop to go away so that new customers events can show up without this constant buildup of events. Making these events disappear while not making any newly placed events disappear is proving tricky. There is a "delete this event" plugin command that will erase an instance of a copied event. The trouble is getting the game to realize when I wan to use this command. Basically I want the game to run an end of day procedure where it erases all the current copied events and then generates new copied events.


Any suggestions? Let me know if you would like any pictures or need better descriptions.


Thank you!
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,674
First Language
German
Primarily Uses
RMMV
Store references to each days events when you clone them, then delete them at the end of the days (and reset the reference list at the same time).


Requires a bit of programming knowledge for handling an array, or you need to maximize and reserve variables for each cloned event (which limits the number of clones to be referenced)


But basically, the only reasonable way is to somehow store or mark those events you want erased, and then use script commands for the erase.


There might be another way using a reset page on all clone events - that can be done completely without script commands, but it works only in very specific circumstances. You would have to show us screenshots of the events themselves as well as the cloning control event, so that someone could check if such a reset page can function.
 

BonnieLass

Veteran
Veteran
Joined
Mar 31, 2016
Messages
41
Reaction score
4
First Language
English
Primarily Uses
Whoa, I had a bad feeling this was going to be a complicated affair. That being said, I've made it this far in developing this game so I'm not about to give up. I've used arrays in C++ many times in the past. Hopefully that helps me figure out what you're suggesting I do...


Now that I've finished typing up that long paragraph, I think I see how the array plays out. Say there's 50 events in a set to be randomly cloned to a tile of a region. (so 1 set out of the 4) Event number 1 could be a blank event that only changes a variable that keeps track of which of the events is cloned. The other 49 events would do the same but also have the actual customer event as well. Then the day change event can parse out which event has been copied erase it  and then let the cycle repeat.


I'm not sure if this idea is a correct interpretation of you suggestion. I'm also not sure if it'll work. I'll try it out if you can tell me the script command that can erase an event remotely. If this have nothing to do with what you're suggesting, let me know. Go into greater detail as I may consider myself pretty well versed in rpgmaker, but I'm far from an expert. Sorry this ended up long-winded as heck. Typing up my thoughts helps me keep them focused.


Thank you so much for responding to my question. I really appreciate you trying to get me unstuck!
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,674
First Language
German
Primarily Uses
RMMV
@BonnieLass I'm not sure I understand the way you're going - there are several possible ways to handle this and my post above was just a general overview to get you pointed into the correct direction. You'll need to post screenshots of what exactly you're doing, and post a link to the clone plugin you're using, for any more detailed help.


But if you're going the array and script command route, then this needs to be moved to javascript support


I've moved this thread to Javascript Support. Please be sure to post your threads in the correct forum next time. Thank you.
 

BonnieLass

Veteran
Veteran
Joined
Mar 31, 2016
Messages
41
Reaction score
4
First Language
English
Primarily Uses
Alright, clearly my idea had nothing to do with you're suggestion. That's fine, I'm just confused on the direction you're pointing me. I'd like to go the array and script command route you suggest. I'm just not sure how this is supposed to work? Would I b creating my own plugin or something? Please elaborate. Thanks.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,674
First Language
German
Primarily Uses
RMMV
That's why I said I need a link to whatever plugin you're using to clone the events, and possibly (but less important) screenshots of the pages from the events that you want to clone.


The exactl handling depends on how the clones are created, and you didn't give a link so far (sorry, I don't have time to hunt down scripts myself especially as that requires checking which version and more)
 

BonnieLass

Veteran
Veteran
Joined
Mar 31, 2016
Messages
41
Reaction score
4
First Language
English
Primarily Uses
Okay sorry.


Here's Orange Custom Events:


http://forums.rpgmakerweb.com/index.php?/topic/46527-orange-custom-events/&page=1


Here's a picture of the first tab of one of the events to be copied:


Event to clone.png


All the events to be cloned will be nearly identical. The other four tabs are action button activated chat sequences in which the customer asks for something and if you have it, you can sell it to them. These interactions are different with each tab linked to a self switch. That way each customer has several interactions possible. Is this enough info or do you need me to explain any other aspects of the events to be cloned. Don't hesitate to ask.
 

Ossra

Formerly Exhydra
Veteran
Joined
Aug 21, 2013
Messages
1,076
Reaction score
854
First Language
English
Primarily Uses
RMMV
The plugin comes with a function to delete copied or spawned custom events.

Code:
// Remove Custom Event
$gameSystem.removeCustomEvent(mapId, eventId);

// Remove Event from Map (to be run afterward for cleanup)
$gameMap.eraseEvent(eventId);


// Or ...
// Clear All Custom Events on a Map
$gameSystem.clearCustomEvents(mapId);
 
Last edited by a moderator:

BonnieLass

Veteran
Veteran
Joined
Mar 31, 2016
Messages
41
Reaction score
4
First Language
English
Primarily Uses
I hadn't noticed that! Thank you so much Exhydra, this should solve my problem. I'll just have the day change event clear all custom events on the map. That means problem solved,. Thank you for your support as well Andar. :)
 

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,862
Messages
1,017,049
Members
137,569
Latest member
Shtelsky
Top