Status
Not open for further replies.

Zettabon

Villager
Member
Joined
Apr 29, 2020
Messages
21
Reaction score
0
First Language
English
Primarily Uses
RMMV
Hello, folks.
I was wondering if there's a way to make automatic firearms on Chrono Engine ABS Mode, sort of like holding down the button (Z in this case) and the weapon keeps shooting. I know this would make it unable to use charged skills, but I don't mind.
This is for a ranger sort of hero, she uses a Tommy Gun, just in case.
Have a nice day, thanks in advance.
Edit: Forgot to mention, in the case that this is a thing I can do, to put a sound effect every time it shoots do I need to put it on the skill, the tool event or the weapon?
 

Restart

Veteran
Veteran
Joined
Mar 15, 2019
Messages
694
Reaction score
574
First Language
English
Primarily Uses
RMMV
It's been a while since I did something similar. In base chrono engine I believe the easiest method is using two tools.

The first one (toolA) is an invisible machinegun, which has a move route full of "
Code:
if ($gamePlayer.battler().isCharging()) {this.act(toolB)}else{this.erase()}
commands.
toolB is your machine gun bullet

So the player holds down the button and is 'charging', which means they shoot a steady stream of bullets out. If they let up off the button, they stop firing.

Like I said it's been a while but I'm PRETTY sure multistage tools just inherit the owner out of the box.
 

Zettabon

Villager
Member
Joined
Apr 29, 2020
Messages
21
Reaction score
0
First Language
English
Primarily Uses
RMMV
Thank you, will try this at once.
 

Zettabon

Villager
Member
Joined
Apr 29, 2020
Messages
21
Reaction score
0
First Language
English
Primarily Uses
RMMV
It's been a while since I did something similar. In base chrono engine I believe the easiest method is using two tools.

The first one (toolA) is an invisible machinegun, which has a move route full of "
Code:
if ($gamePlayer.battler().isCharging()) {this.act(toolB)}else{this.erase()}
commands.
toolB is your machine gun bullet

So the player holds down the button and is 'charging', which means they shoot a steady stream of bullets out. If they let up off the button, they stop firing.

Like I said it's been a while but I'm PRETTY sure multistage tools just inherit the owner out of the box.
Excuse me, do I replace (toolB ) as:
tool_item_id : x
tool_skill_id: x
(event name)

(I have everything set up, the weapon, the skill and the two tools, one for the weapon and the other for the bullets) I can provide image or video if need be.
 

Restart

Veteran
Veteran
Joined
Mar 15, 2019
Messages
694
Reaction score
574
First Language
English
Primarily Uses
RMMV
the toolb is the event id of your machine gun bullet on your tool map
 

Zettabon

Villager
Member
Joined
Apr 29, 2020
Messages
21
Reaction score
0
First Language
English
Primarily Uses
RMMV
the toolb is the event id of your machine gun bullet on your tool map
I did everything as I "suppose" it's done, I have no idea what the problem is.
Could you elaborate a bit more on the steps? Will upload video soon.
Edit:
 
Last edited:

Restart

Veteran
Veteran
Joined
Mar 15, 2019
Messages
694
Reaction score
574
First Language
English
Primarily Uses
RMMV
EDIT: Charging had an annoying sound so I just poll the button directly.
launcher:
O5qXPJM.png


5BAwloR.png


Code:
if(Input.isPressed(Moghunter.ras_buttonWeapon)){$gamePlayer.act(71)}else{this.erase()}

bullet (just a copypasted arrow)
jYB3uu1.png
 
Last edited:

Zettabon

Villager
Member
Joined
Apr 29, 2020
Messages
21
Reaction score
0
First Language
English
Primarily Uses
RMMV
EDIT: Charging had an annoying sound so I just poll the button directly.
launcher:
O5qXPJM.png


5BAwloR.png


Code:
if(Input.isPressed(Moghunter.ras_buttonWeapon)){$gamePlayer.act(71)}else{this.erase()}

bullet (just a copypasted arrow)
jYB3uu1.png
Is the arrow route the same as the machine gun?
Edit: Also, in "if(Input.isPressed(Moghunter.ras_buttonWeapon)){$gamePlayer.act(71)}else{this.erase()}" do I replace 71 and if so with what?
 

Restart

Veteran
Veteran
Joined
Mar 15, 2019
Messages
694
Reaction score
574
First Language
English
Primarily Uses
RMMV
the arrow event is just copy pasted from the base arrow object in the chrono engine demo
ZkaIP8G.png


it just has a move forward move route on repeat in the move route. Just make it whatever you want for your bullet event as usual.

the '71' is the event id of the arrow you're shooting with the gun.
 

Zettabon

Villager
Member
Joined
Apr 29, 2020
Messages
21
Reaction score
0
First Language
English
Primarily Uses
RMMV
Can you show me what you did in the skills? I copied both events exactly and nothing seems to be happening.
 

Restart

Veteran
Veteran
Joined
Mar 15, 2019
Messages
694
Reaction score
574
First Language
English
Primarily Uses
RMMV
Can you show me what you did in the skills? I copied both events exactly and nothing seems to be happening.
how about I just zip up the project with it


there's a chest in ABS stage 1 next to the sword chest which gives you the machinegun bow.
 

Zettabon

Villager
Member
Joined
Apr 29, 2020
Messages
21
Reaction score
0
First Language
English
Primarily Uses
RMMV
Much better. Will update accordingly, thanks.
 

Zettabon

Villager
Member
Joined
Apr 29, 2020
Messages
21
Reaction score
0
First Language
English
Primarily Uses
RMMV
Copied everything into my main project, seems to be working just fine, I really appreciate it.
If there's any way for these improvements to be made, it'll be wonderful. Just do the simple ones, you've done enough for me already.
Player can move while shooting
Instead of bursts of 7, a constant fire rate
Pose is kept while shooting
I understand some may be complicated, so please, I can deal with it, I hate being stubborn.
 

Restart

Veteran
Veteran
Joined
Mar 15, 2019
Messages
694
Reaction score
574
First Language
English
Primarily Uses
RMMV
Copied everything into my main project, seems to be working just fine, I really appreciate it.
If there's any way for these improvements to be made, it'll be wonderful. Just do the simple ones, you've done enough for me already.
Player can move while shooting
Instead of bursts of 7, a constant fire rate
Pose is kept while shooting
I understand some may be complicated, so please, I can deal with it, I hate being stubborn.
you can increase how long you keep shooting bullets by increasing how long the launcher sticks around

moving while firing can be accomplished by setting the pose duration on the arrow to 0.

Anything that involves splitting apart the shooting animation from being stuck in place is going to require rewriting large portions of the act code, so with base chrono engine you can pick either 'plays the tool_pose_suffix animation when shooting' or 'can shoot while moving'.
 

Zettabon

Villager
Member
Joined
Apr 29, 2020
Messages
21
Reaction score
0
First Language
English
Primarily Uses
RMMV
you can increase how long you keep shooting bullets by increasing how long the launcher sticks around

moving while firing can be accomplished by setting the pose duration on the arrow to 0.

Anything that involves splitting apart the shooting animation from being stuck in place is going to require rewriting large portions of the act code, so with base chrono engine you can pick either 'plays the tool_pose_suffix animation when shooting' or 'can shoot while moving'.
Thank you so much!!! Everything seems to be working just as I wanted it to!!
However, there's still a thing that I wanted to make, and that is making the character hold the gun while it's shooting, is there a *practical* way to make this, or do I just make the sprite hold the gun permanently?
 

Restart

Veteran
Veteran
Joined
Mar 15, 2019
Messages
694
Reaction score
574
First Language
English
Primarily Uses
RMMV
Thank you so much!!! Everything seems to be working just as I wanted it to!!
However, there's still a thing that I wanted to make, and that is making the character hold the gun while it's shooting, is there a *practical* way to make this, or do I just make the sprite hold the gun permanently?
If you're willing to settle for standing still, you just change the tool_pose_suffix to the your fire animation in the bullet event.


Otherwise you COULD do something like restructuring the move route for your machinegun event, so instead of just repeating two commands it does something like

>Change Actor Image to 'Harold_HoldingGun'
>if(Input.isPressed(Moghunter.ras_buttonWeapon)){$gamePlayer.act(71)}else{this.erase();[whatever the command is to change the actor back to harold]}
>Wait 10 frames
>if(Input.isPressed(Moghunter.ras_buttonWeapon)){$gamePlayer.act(71)}else{this.erase();[whatever the command is to change the actor back to harold]}
>Wait 10 frames>
if(Input.isPressed(Moghunter.ras_buttonWeapon)){$gamePlayer.act(71)}else{this.erase();[whatever the command is to change the actor back to harold]}
>Wait 10 frames
>if(Input.isPressed(Moghunter.ras_buttonWeapon)){$gamePlayer.act(71)}else{this.erase();[whatever the command is to change the actor back to harold]}
>Wait 10 frames
>if(Input.isPressed(Moghunter.ras_buttonWeapon)){$gamePlayer.act(71)}else{this.erase();[whatever the command is to change the actor back to harold]}
>Wait 10 frames
>if(Input.isPressed(Moghunter.ras_buttonWeapon)){$gamePlayer.act(71)}else{this.erase();[whatever the command is to change the actor back to harold]}
>Wait 10 frames
>if(Input.isPressed(Moghunter.ras_buttonWeapon)){$gamePlayer.act(71)}else{this.erase();[whatever the command is to change the actor back to harold]}
>Wait 10 frames
>if(Input.isPressed(Moghunter.ras_buttonWeapon)){$gamePlayer.act(71)}else{this.erase();[whatever the command is to change the actor back to harold]}
>Wait 10 frames
....

....
>Change Actor Image to 'Harold'

Note you'll need to have the other poses for chrono engine created for Harold_HoldingGun, so you'd need Harold_HoldingGun_idle or Harold_HoldingGun_dash or whatever.
 

Zettabon

Villager
Member
Joined
Apr 29, 2020
Messages
21
Reaction score
0
First Language
English
Primarily Uses
RMMV
If you're willing to settle for standing still, you just change the tool_pose_suffix to the your fire animation in the bullet event.


Otherwise you COULD do something like restructuring the move route for your machinegun event, so instead of just repeating two commands it does something like

>Change Actor Image to 'Harold_HoldingGun'
>if(Input.isPressed(Moghunter.ras_buttonWeapon)){$gamePlayer.act(71)}else{this.erase();[whatever the command is to change the actor back to harold]}
>Wait 10 frames
>if(Input.isPressed(Moghunter.ras_buttonWeapon)){$gamePlayer.act(71)}else{this.erase();[whatever the command is to change the actor back to harold]}
>Wait 10 frames>
if(Input.isPressed(Moghunter.ras_buttonWeapon)){$gamePlayer.act(71)}else{this.erase();[whatever the command is to change the actor back to harold]}
>Wait 10 frames
>if(Input.isPressed(Moghunter.ras_buttonWeapon)){$gamePlayer.act(71)}else{this.erase();[whatever the command is to change the actor back to harold]}
>Wait 10 frames
>if(Input.isPressed(Moghunter.ras_buttonWeapon)){$gamePlayer.act(71)}else{this.erase();[whatever the command is to change the actor back to harold]}
>Wait 10 frames
>if(Input.isPressed(Moghunter.ras_buttonWeapon)){$gamePlayer.act(71)}else{this.erase();[whatever the command is to change the actor back to harold]}
>Wait 10 frames
>if(Input.isPressed(Moghunter.ras_buttonWeapon)){$gamePlayer.act(71)}else{this.erase();[whatever the command is to change the actor back to harold]}
>Wait 10 frames
>if(Input.isPressed(Moghunter.ras_buttonWeapon)){$gamePlayer.act(71)}else{this.erase();[whatever the command is to change the actor back to harold]}
>Wait 10 frames
....

....
>Change Actor Image to 'Harold'

Note you'll need to have the other poses for chrono engine created for Harold_HoldingGun, so you'd need Harold_HoldingGun_idle or Harold_HoldingGun_dash or whatever.
So, if my logical reasoning isn't wrong, if I wanted to make it so the pose is held as long as the button is pressed, I can just make
Change actor image
Script
Wait
Script
Wait
And so on?
Note that I will make it so that you can move and shoot.
 

Restart

Veteran
Veteran
Joined
Mar 15, 2019
Messages
694
Reaction score
574
First Language
English
Primarily Uses
RMMV
yeah basically, I don't know offhand the way to change an actor's pose in scripts but you can just look up in the call list.
 

Zettabon

Villager
Member
Joined
Apr 29, 2020
Messages
21
Reaction score
0
First Language
English
Primarily Uses
RMMV
Thank you, Mr. Restart, you've earned your spot in my heart and in heaven.
 

hiddenone

Lurker Extraordinaire
Global Mod
Joined
Feb 19, 2014
Messages
2,587
Reaction score
5,483
First Language
english
Primarily Uses
RMMZ

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

Latest Threads

Latest Profile Posts

Child base test two, flappin' their arms like it's VX Ace.
ChildTest-02.gif
Zaj
Hi quick question. Is it possible for me to make a custom VXAce script without learning some bulkiness of Ruby?
Never Forget you've Got a friend, Even you feel your alone, Jesus Christ is there to Love and Be with you when your alone
6000 Plugins for RPG Maker MV, Pixel RPG Icons, & Reboot Pixel Font | RPG Maker News #38

Forum statistics

Threads
111,312
Messages
1,060,144
Members
144,635
Latest member
Rauro
Top