1 event for 4 different locations.

Cqualt

Veteran
Veteran
Joined
Jul 15, 2019
Messages
65
Reaction score
5
First Language
English
Primarily Uses
RMMV
Hey! usually i dont ask for alot of help but im really stuck on this one guys... if you guys could come up with a solution that would be AWESOME, if im smart enough to follow what you say. lol

So basically... im using a parallel to locate 4 different events using map x and y for "boulder 1 2 3 and 4"
so that if boulder 1 fills hole 1 then hole 1 will dissappear, but incase the player pushes boulder 1 to fill hole 2 then hole 2 will dissappear the problem im having is incase boulder 1 does go in hole 2 i want hole 1 to remain open for boulder 2 3 and 4 .

i cant figure out how to do this....

basically... i want all 4 boulders to fit in any of the 4 hole locations but only close the hole that 1 boulder is on and leave the rest open for the other boulders, if u know what i mean?

so the player can push any boulder in any hole but only 1 hole at a time close up.
 

Attachments

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,528
Reaction score
14,261
First Language
English
Primarily Uses
RMVXA

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

 

Cqualt

Veteran
Veteran
Joined
Jul 15, 2019
Messages
65
Reaction score
5
First Language
English
Primarily Uses
RMMV
[MOVE]MV support[/MOVE]
Hey thanks very much, i seem to have trouble locating the support area, would you be able to show a photo of where the section is? cant seem to locate, thank you
 

Ritter

Veteran
Veteran
Joined
Jan 17, 2017
Messages
64
Reaction score
30
First Language
English
Primarily Uses
RMMV
if scripting isn't too scary this is how i would handle this.

◆Comment:events 4-7 are holes
◆If:Script:$gameMap.eventsXy($gameMap.event(4).x, $gameMap.event(4).y).length > 1 && !$gameMap.event(4)._erased
◆Play SE:Applause1 (90, 100, 0)
◆Wait:60 frames
◆Script:$gameMap.eraseEvent($gameMap.eventsXy($gameMap.event(4).x, $gameMap.event(4).y)[0]._eventId);
◆Script:$gameMap.eraseEvent($gameMap.eventsXy($gameMap.event(4).x, $gameMap.event(4).y)[1]._eventId);

:End
◆If:Script:$gameMap.eventsXy($gameMap.event(5).x, $gameMap.event(5).y).length > 1 && !$gameMap.event(5)._erased
◆Play SE:Applause1 (90, 100, 0)
◆Wait:60 frames
◆Script:$gameMap.eraseEvent($gameMap.eventsXy($gameMap.event(5).x, $gameMap.event(5).y)[0]._eventId);
◆Script:$gameMap.eraseEvent($gameMap.eventsXy($gameMap.event(5).x, $gameMap.event(5).y)[1]._eventId);

:End
◆If:Script:$gameMap.eventsXy($gameMap.event(6).x, $gameMap.event(6).y).length > 1 && !$gameMap.event(6)._erased
◆Play SE:Applause1 (90, 100, 0)
◆Wait:60 frames
◆Script:$gameMap.eraseEvent($gameMap.eventsXy($gameMap.event(6).x, $gameMap.event(6).y)[0]._eventId);
◆Script:$gameMap.eraseEvent($gameMap.eventsXy($gameMap.event(6).x, $gameMap.event(6).y)[1]._eventId);

:End
◆If:Script:$gameMap.eventsXy($gameMap.event(7).x, $gameMap.event(7).y).length > 1 && !$gameMap.event(7)._erased
◆Play SE:Applause1 (90, 100, 0)
◆Wait:60 frames
◆Script:$gameMap.eraseEvent($gameMap.eventsXy($gameMap.event(7).x, $gameMap.event(7).y)[0]._eventId);
◆Script:$gameMap.eraseEvent($gameMap.eventsXy($gameMap.event(7).x, $gameMap.event(7).y)[1]._eventId);

:End

Where the play SE line is you can do whatever else is needed change a variable or whatever, but essentially what this does is it'll check if there is more than 1 event located on the same tile as a hole, and if there is it will play a SE and wait 60 frames then erase both events it finds on that tile.

I'm sure theres a way to do it with pure eventing but I believe scripting it would be much easier.

if you go this route you would just need to replace every instance of $gameMap.event(number) you see there with your hole numbers, i used eventIds 4-7 for my holes in testing.

this does not have a catch for if you have other events that might wander into a hole, if that happens it would trigger and delete both, if you do have this i can edit the scripts to make sure its a boulder but i dont know why you'd have an event wander into a hole anyway :mrsatan:

mm just occurred to me you may only want to delete the hole and leave the boulder? if so this would need a slight edit xD
 
Last edited:

olddelo

Villager
Member
Joined
May 17, 2020
Messages
15
Reaction score
8
First Language
english
Primarily Uses
RMMV
So I just took the push boulders into holes and remove holes issue and did it how i would, heres a working solution, using some temporary variables and switches
boulder issue.png
this will work with any number of boulders just copy paste them, and any number of holes just add a switch for it
 

Cqualt

Veteran
Veteran
Joined
Jul 15, 2019
Messages
65
Reaction score
5
First Language
English
Primarily Uses
RMMV
if scripting isn't too scary this is how i would handle this.

◆Comment:events 4-7 are holes
◆If:Script:$gameMap.eventsXy($gameMap.event(4).x, $gameMap.event(4).y).length > 1 && !$gameMap.event(4)._erased
◆Play SE:Applause1 (90, 100, 0)
◆Wait:60 frames
◆Script:$gameMap.eraseEvent($gameMap.eventsXy($gameMap.event(4).x, $gameMap.event(4).y)[0]._eventId);
◆Script:$gameMap.eraseEvent($gameMap.eventsXy($gameMap.event(4).x, $gameMap.event(4).y)[1]._eventId);

:End
◆If:Script:$gameMap.eventsXy($gameMap.event(5).x, $gameMap.event(5).y).length > 1 && !$gameMap.event(5)._erased
◆Play SE:Applause1 (90, 100, 0)
◆Wait:60 frames
◆Script:$gameMap.eraseEvent($gameMap.eventsXy($gameMap.event(5).x, $gameMap.event(5).y)[0]._eventId);
◆Script:$gameMap.eraseEvent($gameMap.eventsXy($gameMap.event(5).x, $gameMap.event(5).y)[1]._eventId);

:End
◆If:Script:$gameMap.eventsXy($gameMap.event(6).x, $gameMap.event(6).y).length > 1 && !$gameMap.event(6)._erased
◆Play SE:Applause1 (90, 100, 0)
◆Wait:60 frames
◆Script:$gameMap.eraseEvent($gameMap.eventsXy($gameMap.event(6).x, $gameMap.event(6).y)[0]._eventId);
◆Script:$gameMap.eraseEvent($gameMap.eventsXy($gameMap.event(6).x, $gameMap.event(6).y)[1]._eventId);

:End
◆If:Script:$gameMap.eventsXy($gameMap.event(7).x, $gameMap.event(7).y).length > 1 && !$gameMap.event(7)._erased
◆Play SE:Applause1 (90, 100, 0)
◆Wait:60 frames
◆Script:$gameMap.eraseEvent($gameMap.eventsXy($gameMap.event(7).x, $gameMap.event(7).y)[0]._eventId);
◆Script:$gameMap.eraseEvent($gameMap.eventsXy($gameMap.event(7).x, $gameMap.event(7).y)[1]._eventId);

:End

Where the play SE line is you can do whatever else is needed change a variable or whatever, but essentially what this does is it'll check if there is more than 1 event located on the same tile as a hole, and if there is it will play a SE and wait 60 frames then erase both events it finds on that tile.

I'm sure theres a way to do it with pure eventing but I believe scripting it would be much easier.

if you go this route you would just need to replace every instance of $gameMap.event(number) you see there with your hole numbers, i used eventIds 4-7 for my holes in testing.

this does not have a catch for if you have other events that might wander into a hole, if that happens it would trigger and delete both, if you do have this i can edit the scripts to make sure its a boulder but i dont know why you'd have an event wander into a hole anyway :mrsatan:

mm just occurred to me you may only want to delete the hole and leave the boulder? if so this would need a slight edit xD
DAMN! i really appreciate your help! i was using boulders as an example its not an EXACT scenario. lol but would work the same..
 

Cqualt

Veteran
Veteran
Joined
Jul 15, 2019
Messages
65
Reaction score
5
First Language
English
Primarily Uses
RMMV
So I just took the push boulders into holes and remove holes issue and did it how i would, heres a working solution, using some temporary variables and switches this will work with any number of boulders just copy paste them, and any number of holes just add a switch for it
Thank you SOO much! im gonna try this method, i assume it will work.
i was using a seperate parallel to locate the spot. but i think using the actual event itself should do the trick!! im gonna try it
 

olddelo

Villager
Member
Joined
May 17, 2020
Messages
15
Reaction score
8
First Language
english
Primarily Uses
RMMV
i looked at my solution again, and the through on through off portion (meant to make it so the event can land on top of the hole event,) allows it to stack on top of the other boulder and other such things you dont want, instead it should be, set movement, hole 1,2,3,4 etc through on, then move this event away from player, then reset through off again

The adjustment (requires a bit more steps wise, but tested doublely, rammed boulders into eachother and over the old holes all works fine
boulder issue 2.png
sorry for the confusion, didnt think about boulders running into things that werent holes xD
 
Last edited:

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

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,050
Messages
1,018,548
Members
137,835
Latest member
yetisteven
Top