1. Hey Guest, is it this your first time on the forums?

    Visit the Beginner's Box

    Introduce yourself, read some of the ins and outs of the community, access to useful links and information.

    Dismiss Notice

How can I restore the old archer triple shot[SOLVED]

Discussion in 'Modding Help' started by duke54, Jan 17, 2015.

  1. duke54

    duke54 Catapult Fodder

    Messages:
    27
    So, it took me 4 hours of serious code reading, but the old triple shot code is still there and can be restored easily by updating some basic variables.
    To see the old triple shot in action check out my server: Legend CTF *OP Archer Kingdom* (you need to have "non-vanilla" set to green to see it)

    I'm gonna make a mod for it, but to edit it yourself, do following.

    In "Base\Entities\Characters\Archer\ArcherCommon.as" lines 27 and 28:

    const ::s32 legolas_arrows_count = 1;
    const ::s32 legolas_arrows_volley = 3;

    The arrows_count is how many times the archer can shoot in a row when fully charged.
    The arrows_volley is how many arrows will be shot at once when fully charged.

    So basically just set arrows_count to 3 for triple shot, and arrows_volley to 1 to remove shotgun effect like this:

    const ::s32 legolas_arrows_count = 3;
    const ::s32 legolas_arrows_volley = 1;

    That's it! Good luck. Mod to follow shortly.

    **EDIT**
    In the mod, I was also able to setup triple shot so that the 2nd and 3rd shots break apart, and don't go as far, just like with the shotgun shot.
     
    Last edited: Jan 20, 2015
  2. acromatic

    acromatic Catapult Fodder

    Messages:
    13
    Well I'm not going to code it for you and don't know what the original script was for that function. I can tell you that onTick is a relevant function to the old code... s32 ticksToStart = gametime - getGameTime();

    This is ripped from some of the spawn code. There is also getTicksSinceCreated.. and a few others. Most of them would allow you to do what you're talking about. (don't quote me on that)

    I think you won't get much response on this from the devs, most wouldn't encourage rehashing many game mechanics they just finished slaughtering. Also the old code might be rewritten to fix unsolvable issues or to balance the game. REbrewing old code and functions is risky by nature in many cases so you may not see any help in that area.

    in the logic script there may already be a clock function/variables that may or may not be wise to utilize. If there is becareful of it's usage or simply write your own script. You have the freedom to make mistakes if you backup and work with a separate game copy. clocking functions are basic programming scheme, you should have either no problem implementing this on your own or using it as a valuable educational lesson.
    --- Double Post Merged, Jan 27, 2015, Original Post Date: Jan 17, 2015 ---
    Glad to see you got it working so quickly. Also glad to see the devs found a way to modify the code in such a manner that you can still use the old effect, or something similar. It really shows they think about what they're doing and what others might want to do. Essentially it's obvious good programming habits. I noticed the mod later that day after posting my last reply. Great stuff!