Automatic Firearms. Chrono Engine ABS

● ARCHIVED · READ-ONLY
Started by Zettabon 20 posts View original ↗
  1. 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?
  2. 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.
  3. Thank you, will try this at once.
  4. Restart said:
    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.
  5. the toolb is the event id of your machine gun bullet on your tool map
  6. Restart said:
    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:
  7. 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
  8. Restart said:
    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?
  9. 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.
  10. Can you show me what you did in the skills? I copied both events exactly and nothing seems to be happening.
  11. Zettabon said:
    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

    File on MEGA
    there's a chest in ABS stage 1 next to the sword chest which gives you the machinegun bow.
  12. Much better. Will update accordingly, thanks.
  13. 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.
  14. Zettabon said:
    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'.
  15. Restart said:
    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?
  16. Zettabon said:
    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.
  17. Restart said:
    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.
  18. 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.
  19. Thank you, Mr. Restart, you've earned your spot in my heart and in heaven.
  20. 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.