Trying to know how to do this or find a similar script.

Roded

Villager
Member
Joined
Jul 8, 2020
Messages
6
Reaction score
0
First Language
Spanish
Primarily Uses
RMVXA
Im trying to implement a simple shooting system where the players hits a key and they would be in an aiming positions where they can rotate on the 4 directions with differents sprites, and then the next key would be firing the weapon that would trigger an animation. Im not sure if its possible to make it so that this mechanic could aim at 8 directions, but if it can only be done with 4 thats perfect.

Im not skilled at all at coding but I would appreciate any help to try to understand it and hopefully come around this mechanic.
 

Mhin Ra

Veteran
Veteran
Joined
Aug 17, 2015
Messages
65
Reaction score
19
First Language
English
Primarily Uses
RMVXA
Something like this gives you a basic notion of how you might do this (it's using the 'fireball' event, which is marked as 'through' as a 'missile' and shooting it from 17,8 - which is were the player is standing in the example, but you could replace that with running an animation on the character or whatever else you'd like):

1594167019513.png

The above is assuming you're standing on an island or something, so the character won't move when you press Left or Right. If you want the character to be stationary, I'm not quite sure what you'd do in the base engine... I have a state system that has an :immobile state I can apply; but it's too much code to paste in here.

You probably also want a mechanism to detect if the player's shots actually hit what they're aiming at, but I can't offer much in the way of recommendations on that unless I know more about what you are building.

Aiming in 8 directions is a little harder, but mostly just because the way the game UI is designed. The characters only have 4 facing directions, so you would need to invent some other mechanism to help players understand which of the 8 directions they were facing. But, the above example is pretty easy to extend to diagonal movements if you want.

Maybe that gets you started? If you've got more questions, let me know :)
 

Roded

Villager
Member
Joined
Jul 8, 2020
Messages
6
Reaction score
0
First Language
Spanish
Primarily Uses
RMVXA

Roded

Villager
Member
Joined
Jul 8, 2020
Messages
6
Reaction score
0
First Language
Spanish
Primarily Uses
RMVXA
Something like this gives you a basic notion of how you might do this (it's using the 'fireball' event, which is marked as 'through' as a 'missile' and shooting it from 17,8 - which is were the player is standing in the example, but you could replace that with running an animation on the character or whatever else you'd like):

View attachment 150506

The above is assuming you're standing on an island or something, so the character won't move when you press Left or Right. If you want the character to be stationary, I'm not quite sure what you'd do in the base engine... I have a state system that has an :immobile state I can apply; but it's too much code to paste in here.

You probably also want a mechanism to detect if the player's shots actually hit what they're aiming at, but I can't offer much in the way of recommendations on that unless I know more about what you are building.

Aiming in 8 directions is a little harder, but mostly just because the way the game UI is designed. The characters only have 4 facing directions, so you would need to invent some other mechanism to help players understand which of the 8 directions they were facing. But, the above example is pretty easy to extend to diagonal movements if you want.

Maybe that gets you started? If you've got more questions, let me know :)

Thanks a lot! Im having some problems trying to figure out where exactly is that tab so I can test that coding, can you please tell me where it is?

About the other stuff, not sure if Ill look into an 8 directional aiming, thats gonna come down to how it would play if the 4 directions stuff fits then Ill stick with that.

Also about what you say the detection to see if the player's shots hit, I have in mind just a normal zombie NPC enemy that chases the player, thats it.

Again sorry if I sound too clueless, Im still trying to learn how RPG maker works but I think its the only engine that I can get my hands on without being too complex.
 

Mhin Ra

Veteran
Veteran
Joined
Aug 17, 2015
Messages
65
Reaction score
19
First Language
English
Primarily Uses
RMVXA
haha ;) Sure. If you just click on the event view in the editor:

1594168245523.png

Then double click on a square (the green ones in the right, bottom of my screen shot) it should pop up the event editor dialog - which is what I was showing you a screen shot of. Play around with that, and you should get an idea of how it works. There's also some good tutorials under the Help menu item that might be worth reading. To start, maybe just make a few NPCs that wander around and you can talk to them; making a missile firing system is not the most 'basic' way to get started with the engine ;)

For simple detection on hit, you could set to variables to be the player's X \ Y using the Set Variable command. You could similarly set two more variables to be the fireball's X \ Y using the same command. Then, do a conditional that compares the values of the variables and if both are equal, you could consider that a hit. It'll not be smooth as, like, Nier Automata, but for a fairly scoped mini-game, it would work okay.

But, like I said, I would recommend you start by making a town. Maybe a fetch quest or something like that, just to get an idea how the engine works. Doing a minigame is a pretty tall order for your first attempt!
 

Roded

Villager
Member
Joined
Jul 8, 2020
Messages
6
Reaction score
0
First Language
Spanish
Primarily Uses
RMVXA
haha ;) Sure. If you just click on the event view in the editor:

View attachment 150508

Then double click on a square (the green ones in the right, bottom of my screen shot) it should pop up the event editor dialog - which is what I was showing you a screen shot of. Play around with that, and you should get an idea of how it works. There's also some good tutorials under the Help menu item that might be worth reading. To start, maybe just make a few NPCs that wander around and you can talk to them; making a missile firing system is not the most 'basic' way to get started with the engine ;)

For simple detection on hit, you could set to variables to be the player's X \ Y using the Set Variable command. You could similarly set two more variables to be the fireball's X \ Y using the same command. Then, do a conditional that compares the values of the variables and if both are equal, you could consider that a hit. It'll not be smooth as, like, Nier Automata, but for a fairly scoped mini-game, it would work okay.

But, like I said, I would recommend you start by making a town. Maybe a fetch quest or something like that, just to get an idea how the engine works. Doing a minigame is a pretty tall order for your first attempt!
I see, thanks for clarifying and giving me those tips! Do you mind if I keep in touch with you through here if I find a problem or something along the way? Ill probably post my progress for any person that is searching for a similar style of gameplay to their games.

Again, thank you for your time.
 

Roded

Villager
Member
Joined
Jul 8, 2020
Messages
6
Reaction score
0
First Language
Spanish
Primarily Uses
RMVXA
Okay, so I tried your event, but is not what Im looking for because the projectile itself works like as an entity itself.

Instead of a projectile how could I make the player go into a standing aiming pose depending on where they are looking and then triggering a shooting animation that now that I think about it doesnt need projectile and its more of a direct attack to an NPC with the bang and such.

Sorry if I didnt express myself well that much, but I hope I made it more clear.
 

MushroomCake28

KAMO Studio
Global Mod
Joined
Nov 18, 2015
Messages
3,729
Reaction score
4,682
First Language
English
Primarily Uses
RMMZ

@Roded , please avoid double posting, as it is against the forum rules. You can use the "Edit" function on your posts to add additional information you've forgotten or respond to multiple people. You can review our forum rules here. Thank you.

 

Mhin Ra

Veteran
Veteran
Joined
Aug 17, 2015
Messages
65
Reaction score
19
First Language
English
Primarily Uses
RMVXA
I don't mind at all if you want to keep in touch. You can message me directly or just use this thread. I've got an email in my signature that you can use too; I check that more frequently.

For turning the player, you can use Set Move Route (like in the above example) except Turn Right \ Left \ etc. But, I didn't include it in the above because pressing Left or Right will already turn the player. However, it won't put the player into a pose; it will just turn them in that direction. RPGMaker doesn't have great facility for setting specific character poses via script, but you could use something like Galv's Movement Commands to get a reasonable facsimile. He has a set_char function that lets you force an event to have a specific graphic (and a restore_char that'll clear it).

But, for an initial prototype, I would not worry too much about aiming animations. Just having the character face in the correct direction seems like it should be sufficient to communicate the state to the player - unless the transition into the 'aiming' state is a specific mechanic. I would then iterate on the basic gameplay, rather than polishing the graphics.
 

Roded

Villager
Member
Joined
Jul 8, 2020
Messages
6
Reaction score
0
First Language
Spanish
Primarily Uses
RMVXA
Thanks! Ill try messing with it to see if I can get this thing to work with the stuff you just told me.
 

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

Latest Threads

Latest Profile Posts

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'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:

Forum statistics

Threads
105,854
Messages
1,017,004
Members
137,562
Latest member
tamedeathman
Top