How do i make this shark event to work

jedite1000

Veteran
Veteran
Joined
Nov 16, 2021
Messages
134
Reaction score
36
First Language
english
Primarily Uses
RMMZ
I know there is no event touch event to activate event the normal way, but is there a way to activate a certain event?

Here is the scenario, the player is on the boardwalk and there is a switch at the end of it, the player activates the switch which will then spawn the shark, the shark will slowly follow the player (i have the chase script all working so dont need to worry about the chase mechanic). so what i want is, the player needs to run back down the boardwalk while the shark is chasing player, the player would think that they are safe on the boardwalk but they are wrong, as soon as the shark event touches the boardwalk, the boardwalk starts to get destroyed, so the shark will continue moving forward while chasing the player down the boardwalk also while destroying the boardwalk in its process
 

VegaKotes

Veteran
Veteran
Joined
Jun 25, 2013
Messages
212
Reaction score
155
First Language
English
Primarily Uses
RMMV
If memory serves you can set a variable to an Event's (player included) X or Y position.
Might be possible to use a parallel event to check the Shark Event's Y position and then compare it with conditional branches to see if it's at the Boardwalk part of the map. Then if it is just do whatever destruction event to the Boardwalk events you were planning on doing.

Actually now that I think on it you might actually just be able to set each of the boardwalk events to have a variable condition for their destroyed condition with the variable being the Shark position on the map equal to their own?

Sorry if the explanation was a big scramble brained. >.>
 

jedite1000

Veteran
Veteran
Joined
Nov 16, 2021
Messages
134
Reaction score
36
First Language
english
Primarily Uses
RMMZ
yeah the whole thing is confusing, i have made a few variable conditions in my game but i was able to do that from tutorials, i cant figure it out myself, unless its step by step
 

VegaKotes

Veteran
Veteran
Joined
Jun 25, 2013
Messages
212
Reaction score
155
First Language
English
Primarily Uses
RMMV
I'm trying to think on how best to explain this....also full disclosure this only works if the shark is traveling a single straight line down, I have literally no idea how to make it function with X *and* Y at the same time.

So let me try and show some screen shots and hope that helps.


So first up is the Bridge event itself. Grab a tile from the tileset that's an intact bridge, or boardwalk. Something your player can stand on. Most of them will do nothing, the last one triggers your switch. In my example it triggers via player touch, do it however you need to in your own project.



In image example 2 we have the 2nd page of the bridge events which is dictated by the Variable "Shark Pos Y" being equal to or greater than the position of the event itself. It shouldn't really matter if this is possible for the player to stand on since if its in this state the player has likely not going to be able to stand on it anyway given the whole chasing shark situation.



Neeeext we have our first of 2 events relying on the Switch triggered by the last boardwalk event. This one is a very simple conditional branch that sets the variable "Shark Pos" to the event known as "Shark Pos" ...that's a bit confusing I guess. Sorry about that. Anyway the point is there is a Variable and an Event that need to be referenced. I just kind of named both of them Shark Pos. You don't have to do so. You can name them whatever you want.



And finally that brings us to our uh...shark bat. I didn't have a shark on hand, forgive me.
Now Shark bat is broken up into 3 event pages. The 1st is blank, could be a fin hiding away, doesn't really matter. It doesn't need to do anything unless you want it to.

The second page is where our bread and butter is at. It approaches the player (I also set it to above the player so that it could bypass the terrain issues if any existed. Not needed...probably.) and if it touches them the player gets a game over. Or whatever it is you're planning on doing in such an event.

Final page is if the Shark has reached the Y position of 10 or greater, which is where my bridge ended on the map I was testing on. It then swaps to a new shark bat page that does not chase the player therefore if the player gets off the boardwalk and onto the shore, they're safe.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
37,942
Reaction score
10,523
First Language
German
Primarily Uses
RMMV
it can't work with using position as a page condition.

variables are only updated on command, that means you'll have to set a parallel process for updating the shark position variables anyway - and then it is easier to have that parallel process handle the destruction of the events.

and that is in addition to several other problems with your idea like it being one coordinate only, requiring a specific path for the shark, and the fact that because the variable condition is "or above" you'll have to handle the triggering in very specific ways to prevent a re-appearing of the tiles.
 

VegaKotes

Veteran
Veteran
Joined
Jun 25, 2013
Messages
212
Reaction score
155
First Language
English
Primarily Uses
RMMV
Actually I had swapped from using the parallel process doing all the work to just doing the updating the variable but now that you mention it...it should be possible to handle both X and Y with conditional branches. Lot more work involved especially to prevent backtracking making bridges reappear. God what even would that take? Switches for each of the event pieces?

And while it did end up working as designed yeah...it's very limited. One direction from top to bottom only. Not ideal at all, haha.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
45,479
Reaction score
16,397
First Language
English
Primarily Uses
RMMV

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



Please note where you are when making a new post. You posted this in Activation issues, which is for activation of RPG Maker itself, and nothing to do with activating events.
 

jedite1000

Veteran
Veteran
Joined
Nov 16, 2021
Messages
134
Reaction score
36
First Language
english
Primarily Uses
RMMZ
hmm dont think its working, i could done something wrong

yeah the shark only needs to go in one direction, the activating the switch, in my case picking up a statue and putting it in my inventory triggers the shark to spawn

And the player will get game over if shark touches you.

I have region id restrictions plugin which allows my shark to walk over any terrain, not sure if that prevents the event from working
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
37,942
Reaction score
10,523
First Language
German
Primarily Uses
RMMV
i could done something wrong
then show us screenshots of your events.

we can't tell you what you did wrong if you don't show us what you did.
 

jedite1000

Veteran
Veteran
Joined
Nov 16, 2021
Messages
134
Reaction score
36
First Language
english
Primarily Uses
RMMZ
The statue is the trigger that starts the shark spawn
1638357189067.png
1638356410401.png1638356419193.png1638356434887.png1638356452259.png1638356458907.png1638356470956.png1638356477498.png
 
Last edited:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
37,942
Reaction score
10,523
First Language
German
Primarily Uses
RMMV
the trigger is about the content, nothing else. So a parallel process with zero content produces nothing but lag. plwase change all event pages without content to action button.
 

jedite1000

Veteran
Veteran
Joined
Nov 16, 2021
Messages
134
Reaction score
36
First Language
english
Primarily Uses
RMMZ
yeh but that wont fix my issue im currently having right?

any ideas how to fix my problem?

i cant figure it out
 
Last edited:

VegaKotes

Veteran
Veteran
Joined
Jun 25, 2013
Messages
212
Reaction score
155
First Language
English
Primarily Uses
RMMV
From what I can see, or rather what I can't see you don't have any event set up to mark where the Shark is at on the map. I had 1 Parallel event who's only purpose was to mark the "Shark" *Event*'s Y position on the map.

You can do so by going to Control Variables -> Game Data -> Character -> Find the event that refers to the Shark, that's why I named my shark events something memorable and set the Variable to that Event's Map Y position.

The other part of the issue may be that you've copied the values in my examples a little too closely. Keep in mind on the map I tested this one was smaller than the map you're using.

On your first screenshot look at the bottom right corner. Those numbers. 3, 12.

RPG maker games usually uh...index? Count? Whatever their maps starting from 0, 0. 0, 0 in this case being the top left most corner of the map. Go right one that becomes 1, 0.

Go right 1 and down 6 and that becomes 1, 5.

Get the gist?

In your own first screen shot you can see your highlighted tile is at 3, 12.
And your very first destroyed bridge event is triggering at Y position 4.

You need to set the variable to trigger at the Position of *your* events.
From what little of the map I can see your minimum Shark Position number would be 14 not 4.

As an aside clear up any Parallel events that don't need to be Parallel events. The only events that need to be Parallel are the ones that need to be constant updating something in the game (That isn't event movement) That's why in my own example the only Parallel event was the one that updated a Variable.

Apologies it was like 3 in the morning I don't think I adequately described how things were supposed to work. And now that I've had uh....5...ish? hours of sleep I'm pretty sure with some more complicated fandangling and a lot of conditional branches inside of a single Parralel event you could have that shark running left right and center and still destroy boardwalk pieces to your heart's content.

So my honest advice would be learn how to fandangle with this sort of thing. You can use a single Parallel event to set 2 different Variables. One to an Event's Map X position and one to an Event's Map Y position. Then with enough Conditional branches in that same Parallel Event you can see if the Shark is passing over any given Boardwalk tile and set its graphic to change to a destroyed version. It may seem complicated at first and it honestly is probably more complicated than I just described it out to be but you can accomplish quite a bit by becoming familiar with such systems.
 

jedite1000

Veteran
Veteran
Joined
Nov 16, 2021
Messages
134
Reaction score
36
First Language
english
Primarily Uses
RMMZ
I think i did everything correctly but still not working, here is the update images

1638403910719.png1638403922377.png1638403932775.png1638403941210.png1638403953415.png1638403988538.png
 

VegaKotes

Veteran
Veteran
Joined
Jun 25, 2013
Messages
212
Reaction score
155
First Language
English
Primarily Uses
RMMV
Just to be clear on some things.
Your shark is chasing the player?
What happens when the Shark reaches the first Boardwalk event? Does it stop moving, does it run backwards, does it don a top hat and do a dance? What actually happens?

Is each Boardwalk event set to trigger its destroyed version equal to its Y position? I.e. The Boardwalk event on Y 14 is set to 14 the Boardwalk event on Y 18 is set to 18, Boardwalk event on Y 33 is set to 33, etc etc.

Also is the Shark allowed to move onto the squares occupied by the Boardwalk events? Do the regions you have set to keep it in place allow it to actually move onto the squares occupied by the Boardwalk?

Edit: Also random aside why is one of the bridge events triggering a switch? I was under the impression you were wanting to trigger the shark by placing a statue? You don't need to copy what I've shown you piece for piece. Rather switch out things from my examples for how you do them instead. That was a similar issue with the Variable number.
 

jedite1000

Veteran
Veteran
Joined
Nov 16, 2021
Messages
134
Reaction score
36
First Language
english
Primarily Uses
RMMZ
The region allows the shark to move over the boardwalk without it, the shark wont be able to move due to the water not able to have events or players move on it, and the shark is set to chase the player, so if i move left the shark moves left, however the only option the player can go while in chase is to run downwards so the shark follows downwards

so when the shark reaches the first boardwalk, nothing happens to it

the only content on the boardwalk event is this

edit: i actually got it working now, thank goodness1638406720892.png
1638405579027.png
1638405379358.png1638405342697.png
 
Last edited:

VegaKotes

Veteran
Veteran
Joined
Jun 25, 2013
Messages
212
Reaction score
155
First Language
English
Primarily Uses
RMMV
Oh hey great!
Not entirely sure why it wasn't before but I had tested in a fresh project to make sure my plugins weren't making it work for some reason... haha...
Anyway I'm glad it works for you!

There is also a more advanced version that has you doing all this work within the singular Parallel Event using 2 variables and a butt load of Conditional branches which would allow you to let the shark chase you left right center back and forth, but I think I'll leave teaching that to someone who knows how to properly explain themselves....hahahahaha.......
 

Latest Threads

Latest Profile Posts

I genuinely like the default MZ actor sprites, and the character creator. I think I will draw new headshots for them, but part of me doesn't want to replace the default sprites. But should I? I want to eventually release my game.
Someday, I hope they make a game where 95% of the animation budget went to turning valves and opening door animations, leaving every other animation looking like a CDI zelda cutscene.
programming at 12 years old: "I love how it works!"
programming at 18: "I love that it works."
programming at 25: "I love why it works."
programming at 30: "I love when it works."
programming at 50: "How did this work?"
Why can't I insert picture in this profile post? Only insert image -> by URL. No option to upload from my pc?
Trying out a new Battle Ui.
BattleUI.png

Forum statistics

Threads
129,759
Messages
1,204,895
Members
170,849
Latest member
YujiHero
Top