Hime Custom Event Triggers is Only Working on Occasion

HexMozart88

The Master of Random Garbage
Veteran
Joined
May 15, 2016
Messages
1,840
Reaction score
3,272
First Language
English
Primarily Uses
RMVXA
So I have Hime's Custom Event Trigger Script working in my battle system for projectiles. I set it to an Event_to_Event trigger and it works... sometimes. Basically, it only hits like 2/3 times. There's no wait command or anything, so I'm pretty sure it's the script. Perhaps a patch can be made or something so that it hits every time? Thanks
http://himeworks.com/2013/04/custom-event-triggers/

Edit: It's occurred to me that showing the event would probably help.
 
Last edited:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
30,251
Reaction score
7,138
First Language
German
Primarily Uses
RMMV
there is no random effect in the computer at all - even if you program in something that looks random it's just a mathematic that is too complex for humans to follow.
And in this case there is nothing that would contain such a random function.

I think what happens is something else. Collision in the RMs is NOT determined by graphics, it's determined by grid position. So the event-to-event triggers would require the events to be adjacent on the grid and move into each other.
But the position of the sprite is not always what the grid says, and that can cause a player to believe it should have hit even if the grid did not connect.

I suggest you make a test with replacing the sprites of the events temporarily. Use either a tile or a sprite that covers the 32x32 pixel of the grid in full, both for the shot and the target.
Make some dozens or hundreds shots to test and see how the hit looks with the full sprite cover.

If my guess is right it will always connect if those full sprites connect, and the cases where it didn't were cases where the sprite was just displaced a bit.
In that case give a better description of when exactly the hit happens or not, and we might be able to point you to a solution how to change the sprite to make it look better.
 

HexMozart88

The Master of Random Garbage
Veteran
Joined
May 15, 2016
Messages
1,840
Reaction score
3,272
First Language
English
Primarily Uses
RMVXA
It works every time, even with movement. So, what does that mean? Do I simply need to make my sprite bigger?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
30,251
Reaction score
7,138
First Language
German
Primarily Uses
RMMV
there isn't much else you can do if the shoots now hit every time.

You might still have a displacement when shooting horizontally because some sprites are displaced up by 4 pixels. You can disable that by placing a ! in front of the filename of the sprite (that is intended to make regular sprites look as if they're walking inside the grid instead of on its lines, but needs to be disable for object sprites like doors that need to fit inside the grid).
 

HexMozart88

The Master of Random Garbage
Veteran
Joined
May 15, 2016
Messages
1,840
Reaction score
3,272
First Language
English
Primarily Uses
RMVXA
Ah, that could be the reason. Especially since the enemy sprites are flying sprites.
 

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

Latest Threads

Latest Profile Posts

Is it strange that dropping acid is improving my game development?
I'm starting to wonder if I should go the Half Minute Hero route with my game. The character's main weapon is logistically way too strong. So I can't really let the player continuously grow it.... But if they had to build it up each time like HMH, that could work. Also it lets me take advantage of my randomly generated maps so much more. Hmm... This could work! :LZSexcite:
std::vector, std::map and std::string. Three reasons why I'd take C++ over C. :D
Today, 1,932 RPG Maker fans died from being too wow'ed. May they rest in peace.

Forum statistics

Threads
99,199
Messages
962,943
Members
130,782
Latest member
rafane
Top