SUPPORT ACCOUNT CLANS
Welcome, Unregistered.
 

Thread: How to make a hero

Page 25 of 31 FirstFirst ... 15212223242526272829 ... LastLast
Results 481 to 500 of 614
  1. #481
    Offline
    Account Icon
    Join Date
    Jul 2009
    Location
    Minnesnowta
    Posts
    2,085
    Quote Originally Posted by Oloko View Post
    I know it might sounds dumb to say this now, but I remember now that you can actually make an affector "move" like a projectile.

    So I think you could spawn the affector at the target location and then it would start moving forward. Adding a impact interval would probably do the trick to make it explode at every X ms as it travels. Witch Slayer stun uses such affector.


    As for the spawning in front of your hero. You could put a offset="500 0 0" in the spawn of your affector.
    Using exactly what you said works perfectly fine, the only difficult part is telling exactly where the impacts are happening. As long as a unit is there to "trigger" the impact, it shows up in a straight line, however, if no unit is there to be hit, it's "invisible" per se. I've been using:

    Code:
    <onimpact>
            <printdebuginfo />
            <damage effecttype="Magic" amount="55,80,105,130" />
            <applystate name="State_Stunned" duration="1500,1700,1900,2100" />
            <playeffect effect="effects/cast.effect" source="this_entity" target="" occlude="true" />
        </onimpact>
    to give the location of the impact. Is there a way to make it show up even when no enemy unit is there? Thanks for all the help, this is more of a nitpicky thing to make it feel more "complete" and like a real skill, but if you're making it, there's no sense in under-doing it! I have also tried "this_position" and the exact same thing occurs with the animation.
    HONOR- If you need it defined, you don't have it.

  2. #482
    Offline
    Account Icon
    Join Date
    Jul 2009
    Location
    Minnesnowta
    Posts
    2,085
    Quote Originally Posted by Oloko View Post
    I know it might sounds dumb to say this now, but I remember now that you can actually make an affector "move" like a projectile.

    So I think you could spawn the affector at the target location and then it would start moving forward. Adding a impact interval would probably do the trick to make it explode at every X ms as it travels. Witch Slayer stun uses such affector.


    As for the spawning in front of your hero. You could put a offset="500 0 0" in the spawn of your affector.
    Using exactly what you said works perfectly fine, the only difficult part is telling exactly where the impacts are happening. As long as a unit is there to "trigger" the impact, it shows up in a straight line, however, if no unit is there to be hit, it's "invisible" per se. I've been using:

    Code:
    <onimpact>
            <printdebuginfo />
            <damage effecttype="Magic" amount="55,80,105,130" />
            <applystate name="State_Stunned" duration="1500,1700,1900,2100" />
            <playeffect effect="effects/cast.effect" source="this_entity" target="" occlude="true" />
        </onimpact>
    to give the location of the impact. Is there a way to make it show up even when no enemy unit is there? Thanks for all the help, this is more of a nitpicky thing to make it feel more "complete" and like a real skill, but if you're making it, there's no sense in under-doing it! I have also tried "this_position" and the exact same thing occurs with the animation.
    HONOR- If you need it defined, you don't have it.

  3. #483
    I think you can put an impacteffect in the affector attributes to do this.

    PHP Code:
    <affector

    impacteffect
    ="..."

    >

    </
    affector
    This would probably create the explosion effect on the affector even if there is no hero there.

  4. #484
    I think you can put an impacteffect in the affector attributes to do this.

    PHP Code:
    <affector

    impacteffect
    ="..."

    >

    </
    affector
    This would probably create the explosion effect on the affector even if there is no hero there.

  5. #485
    Offline
    Account Icon
    Chat Symbol
    Join Date
    Oct 2009
    Location
    Sweden, Gothenburg
    Posts
    293
    How do I change the tooltips?

    I just get the range, AoE manacost and all that stuff, but I want to implent tooltips.

    I need help!

  6. #486
    Offline
    Account Icon
    Chat Symbol
    Join Date
    Oct 2009
    Location
    Sweden, Gothenburg
    Posts
    293
    How do I change the tooltips?

    I just get the range, AoE manacost and all that stuff, but I want to implent tooltips.

    I need help!

  7. #487
    Quote Originally Posted by Jayykob View Post
    How do I change the tooltips?

    I just get the range, AoE manacost and all that stuff, but I want to implent tooltips.

    I need help!
    you need to add tooltips for your spells to the stringtables files located in /stringtables/

    take a look at entities_en.str and include your stuff there.

  8. #488
    Quote Originally Posted by Jayykob View Post
    How do I change the tooltips?

    I just get the range, AoE manacost and all that stuff, but I want to implent tooltips.

    I need help!
    you need to add tooltips for your spells to the stringtables files located in /stringtables/

    take a look at entities_en.str and include your stuff there.

  9. #489
    I would recommend you to create your own stringtable files like this: entities_MYNAME_en.str

    That way, you will be able to keep the official spell description and have yours too.

  10. #490
    I would recommend you to create your own stringtable files like this: entities_MYNAME_en.str

    That way, you will be able to keep the official spell description and have yours too.

  11. #491
    Offline
    Account Icon
    Chat Symbol
    Join Date
    Jul 2009
    Posts
    1,115
    Aww man I really wish I could understand programming or scripting in some form cos I'd love to make a large version of the purge neutral creep as a tonberry style assassin! :P

  12. #492
    Offline
    Account Icon
    Join Date
    Jul 2009
    Location
    Minnesnowta
    Posts
    2,085
    Quote Originally Posted by Calcifer View Post
    Aww man I really wish I could understand programming or scripting in some form cos I'd love to make a large version of the purge neutral creep as a tonberry style assassin! :P
    It's not that hard really, but it can be really time consuming! There are a lot of resources on the forums here and people to help out with things if you have questions or run into problems. A lot of it is just looking at skills already in the game, and picking apart the different things. If you're curious to see how things work, you can always look into the resources0.s2z files with winrar, select a hero, and just research.
    HONOR- If you need it defined, you don't have it.

  13. #493
    Offline
    Account Icon
    Join Date
    Jul 2009
    Location
    Minnesnowta
    Posts
    2,085
    Have an idea for a new ability that I'd like to code. The idea is basically that the ability over time gathers charges, up to a maximum of 20,40,60. On use, charges are consumed, one every 50 milliseconds, and a projectile is fired at a random target within range, dealing damage. The ability proceeds to go until all charges are consumed. The only real condition for the spell target selection is that the previous target can't be hit twice in a row.

    As it stands, my idea was this:
    Usage of the ability applies a state to the caster.
    While this state is active, charges are consumed continuously, firing projectiles.
    To determine the "last hit" target, a brief hidden state will be applied to the target, which with a condition test="hasstate" will make it an invalid target.
    Once all projectiles run out, the original state on self will end.

    For simplicity's sake, I pulled most of the code from Corrupted Disciple to modify for the spell, as generally, it works similar to how CD's ult works. For charges I pulled chipper's rocket spell.

    Just wondering if how I have it planned out thus far would be the easiest way to go about something like that, or if anyone else has any ideas on possibly a better practice for it.

    Foreseeable problems I can pick out might be:
    How to make sure the original state applied to the caster is removed.
    Selecting random targets within range (I figured I'd pull from any *bounce* type spell with random target selection for pointers).
    Passing a counter variable from the "charge" entity to the entity that will be essentially firing the projectiles and choosing targets.

    Thanks! After this spell is complete, my full hero will be functional, just not quite polished.
    HONOR- If you need it defined, you don't have it.

  14. #494
    If you want, you could do an <areaofeffect> that target one unit at random and it ignore the proxy_entity. So it would look like this:

    PHP Code:
    <oninflict>
        <
    areaofeffect
            radius
    ="600"
            
    maxtotalimpacts="1"
            
    targetselection="random"
            
    targetscheme="visible_organic_enemy_units"
            
    center="source_entity"
            
    ignore="proxy_entity"
        
    >
            <
    spawnprojectile name="Projectile_CorruptedDisciple_Ability4" source="source_entity" target="target_entity" offset="0 0 150" noresponse="true" />
            <
    setproxy entity="this_entity" target="target_entity" />
        </
    areaofeffect>
    </
    oninflict
    So here it would hit a random unit in a 600 radius, ignoring the proxy_entity. When you find a target, you set it as your new proxy_entity, so that you don't hit it next time.
    I think this would work out well.

    Then right after your area of effect you can test the number of charge on the state, if the number is 0 then you remove it with <expire /> otherwise you reduce it.

    Edit: I think I misunderstood you, do you want the state to jump from one entity to the other, like Balphagore's silence jump from one entity to the other?
    Last edited by Oloko; 02-08-2011 at 12:37 PM.

  15. #495
    Offline
    Account Icon
    Join Date
    Jul 2009
    Location
    Minnesnowta
    Posts
    2,085
    Quote Originally Posted by Oloko View Post
    If you want, you could do an <areaofeffect> that target one unit at random and it ignore the proxy_entity. So it would look like this:

    PHP Code:
    <oninflict>
        <
    areaofeffect
            radius
    ="600"
            
    maxtotalimpacts="1"
            
    targetselection="random"
            
    targetscheme="visible_organic_enemy_units"
            
    center="source_entity"
            
    ignore="proxy_entity"
        
    >
            <
    spawnprojectile name="Projectile_CorruptedDisciple_Ability4" source="source_entity" target="target_entity" offset="0 0 150" noresponse="true" />
            <
    setproxy entity="this_entity" target="target_entity" />
        </
    areaofeffect>
    </
    oninflict
    So here it would hit a random unit in a 600 radius, ignoring the proxy_entity. When you find a target, you set it as your new proxy_entity, so that you don't hit it next time.
    I think this would work out well.

    Then right after your area of effect you can test the number of charge on the state, if the number is 0 then you remove it with <expire /> otherwise you reduce it.

    Edit: I think I misunderstood you, do you want the state to jump from one entity to the other, like Balphagore's silence jump from one entity to the other?
    No, I think you understood it correctly. I wasn't thinking of using a proxy entity instead of a state. Your version of the code is a little simpler, and I think I can save myself from basically using a placeholder state to make the target an invalid target.
    HONOR- If you need it defined, you don't have it.

  16. #496
    I was thinking about it, you might have some issue if there is only one target near you. Since it will it the entity once, and then the second time won't hit it since it's the proxy. The third time still won't it, since the proxy entity hasn't changed since then. So you will use all your charge and you will only have hit a unit once.
    I don't know if it's what you want to do. If it's not, then there is some easy solution for it.

  17. #497
    Offline
    Account Icon
    Join Date
    Jul 2009
    Location
    Minnesnowta
    Posts
    2,085
    Quote Originally Posted by Oloko View Post
    I was thinking about it, you might have some issue if there is only one target near you. Since it will it the entity once, and then the second time won't hit it since it's the proxy. The third time still won't it, since the proxy entity hasn't changed since then. So you will use all your charge and you will only have hit a unit once.
    I don't know if it's what you want to do. If it's not, then there is some easy solution for it.
    That's kind of exactly it. For the moment I think I've decided to take a book from Moonqueen's page and set a "maximpactspertarget" and set it to 30, while removing the ignore proxy entity portion.

    My code thus far:
    Ability (for the most part appears to be working properly)
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <ability
        name="ability_arcane_barrage"
    
        icon="icon.tga"
        statuseffecttooltip=""
        
        anim="ability_1"
        casttime="1000"
        castactiontime="0"
    
        maxlevel="3"
        requiredlevel="6,11,16"
    
        actiontype="self_position"
        targetscheme="nonboss_visible_enemy_units"
        casteffecttype="Magic"
    
        frontqueue="true"
        inheritmovement="true"
        novoiceresponse="true"
        
        manacost="250,350,450"
        cooldowntime="5000,4000,3000"
        
        maxcharges="20,40,60"
        initialcharges="20,40,60"
    >
        <onlearn>
            <applystate name="State_Arcane_Barrage_Charges" />
            <addcharges count="20" />
        </onlearn>
            
        <onupgrade>
            <addcharges count="20" />
        </onupgrade>
        
        <onimpact>
            <applystate name="State_Arcane_Barrage_Self" target="source_entity" duration="3000"/>
        </onimpact>
        
    </ability>
    Projectile (seems to be working properly)
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <projectile
        name="Projectile_Arcane_Barrage"
    
        speed="1600"
        gravity="14000"
    
        modelscale="0.4"
        model="effects/projectile.mdf"
    
        impacteffect="effects/impact.effect"
        invalideffect=""
        traileffect="effects/trail.effect"
    >
        <onimpact>
            <damage effecttype="Magic" amount="40" />
        </onimpact>
    </projectile>
    State applied to self when used (may not be working properly)
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <state
        name="State_Arcane_Barrage_Self"
    
        icon="icon.tga"
        
        impactinterval="150,100,50"
        passiveeffect="effects/state.effect"
        effecttype="Magic"
    >
        <onimpact>
            <areaofeffect
                radius="800"
                maxtotalimpacts="1"
                maximpactspertarget="30"
                targetselection="random"
                targetscheme="visible_organic_enemy_units"
                center="source_entity"
                ignore="proxy_entity"
            >
                <spawnprojectile name="Projectile_Arcane_Barrage" source="source_entity" target="target_entity" offset="0 0 150" noresponse="true" />
                <setproxy entity="this_entity" target="target_entity" />
            </areaofeffect>
            <removecharge />
            <condition test="charges eq 0">
                <expire />
            </condition>
        </onimpact>
    
    </state>
    Charges State (may not be working correctly)
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <state
        name="State_Arcane_Barrage_Charges"
        
        ishidden="true"
        impactinterval="5000,4000,3000"
        maxcharges="20,40,60"
    
    >
        <oninflict>
            <starttimer entity="proxy_entity" duration="5000,4000,3000" />
        </oninflict>
        
        <onimpact>
            <addcharges entity="proxy_entity" count="1" />
            <condition test="charges gt 1">
                <starttimer entity="proxy_entity" duration="5000,4000,3000" />
                <changeduration b="5000,4000,3000" op="max" />
            </condition>
            <removecharge />
        </onimpact>
    </state>
    Currently the problem that I had been having was on activation, the effect would happen once, then the state would disappear from the caster, causing no charges to be lost and the ability to end.

    I *think* the problem is related to passing the current charge value to the "state" entity, and then decrementing the charges value from the original.

    Edit: I changed the code so that the charges don't need to be passed, the duration of the buff is simply determined by the number of charges. However, I've been having trouble getting the "ability" to regenerate charges after using them. Bleh, making it messy for myself.
    Last edited by dandylion; 02-08-2011 at 04:23 PM.
    HONOR- If you need it defined, you don't have it.

  18. #498
    There was issue with the actual state to refresh the amount of charge and the way to reduce the number of charge. I was able to get everything working with this:

    PHP Code:
    <ability
        name
    ="ability_arcane_barage"

        
    icon="icon.tga"
        
    statuseffecttooltip=""
        
        
    anim="ability_1"
        
    casttime="1000"
        
    castactiontime="0"

        
    maxlevel="3"
        
    requiredlevel="6,11,16"

        
    actiontype="self_position"
        
    targetscheme="nonboss_visible_enemy_units"
        
    casteffecttype="Magic"

        
    frontqueue="true"
        
    inheritmovement="true"
        
    novoiceresponse="true"
        
        
    manacost="250,350,450"
        
    cooldowntime="5000,4000,3000"
        
        
    maxcharges="20,40,60"
        
    initialcharges="20,40,60"
    >
        <
    onlearn>
            <
    addcharges count="20" />
            <
    applystate name="State_Arcane_Barrage_Charges" continuous="true" proxy="this_entity" />
        </
    onlearn>
            
        <
    onupgrade>
            <
    addcharges count="20" />
            <
    applystate name="State_Arcane_Barrage_Charges" continuous="true" proxy="this_entity" />
        </
    onupgrade>
        
        <
    onimpact>
            <
    applystate name="State_Arcane_Barrage_Self" target="source_entity" duration="3000" />
        </
    onimpact>
    </
    ability
    PHP Code:
    <state
        name
    ="State_Arcane_Barrage_Self"

        
    icon="icon.tga"
        
        
    impactinterval="150,100,50"
        
    passiveeffect="effects/state.effect"
        
    effecttype="Magic"
    >
        <
    onimpact>
            <
    setent0 entity="proxy_entity" />
            <
    areaofeffect
                radius
    ="800"
                
    maxtotalimpacts="1"
                
    targetselection="random"
                
    targetscheme="visible_organic_enemy_units"
                
    center="source_entity"
                
    ignore="this_proxy_entity"
            
    >
                <
    spawnprojectile name="Projectile_Arcane_Barrage" source="source_entity" target="target_entity" offset="0 0 150" noresponse="true" />
                <
    setproxy entity="this_entity" target="target_entity" />
            </
    areaofeffect>
            <
    condition test="target_entity eq source_entity" target="proxy_entity" source="ent0">
                <
    setproxy entity="this_entity" target="" />
            </
    condition>
            
            <
    pushability source="source_entity" name="Ability_CorruptedDisciple4" />
            <
    removecharge entity="stack_entity" />
            <
    condition test="result eq 0">
                <
    expire />
            </
    condition>
        </
    onimpact>

    </
    state
    The maximpactspertarget="30" doesn't work here since you don't hit more than once. Here I made it so that on your second hit, if the proxy_entity wasn't changed, then it set it to null. This will make the third one hit the target again and so on. This way you loose one charge to nothing. If you want you could replace the <setproxy entity="this_entity" target="" /> with another <areaofeffect> but without the ignore.
    That way it would hit a random target that is not the proxy, but if it can't find one, it will then hit the proxy.

    PHP Code:
    <state
        name
    ="State_Arcane_Barrage_Charges"
        
        
    ishidden="true"
        
    impactinterval="800,600,400,200"
        
    deathpersist="true"
    >
        <
    onimpact>
            <
    addcharges entity="proxy_entity" count="1" />
        </
    onimpact>
    </
    state
    I must say, the result is quite nice. Great idea.

  19. #499
    Offline
    Account Icon
    Join Date
    Jul 2009
    Location
    Minnesnowta
    Posts
    2,085
    Quote Originally Posted by Oloko View Post
    There was issue with the actual state to refresh the amount of charge and the way to reduce the number of charge. I was able to get everything working with this:

    PHP Code:
    <ability
        name
    ="ability_arcane_barage"

        
    icon="icon.tga"
        
    statuseffecttooltip=""
        
        
    anim="ability_1"
        
    casttime="1000"
        
    castactiontime="0"

        
    maxlevel="3"
        
    requiredlevel="6,11,16"

        
    actiontype="self_position"
        
    targetscheme="nonboss_visible_enemy_units"
        
    casteffecttype="Magic"

        
    frontqueue="true"
        
    inheritmovement="true"
        
    novoiceresponse="true"
        
        
    manacost="250,350,450"
        
    cooldowntime="5000,4000,3000"
        
        
    maxcharges="20,40,60"
        
    initialcharges="20,40,60"
    >
        <
    onlearn>
            <
    addcharges count="20" />
            <
    applystate name="State_Arcane_Barrage_Charges" continuous="true" proxy="this_entity" />
        </
    onlearn>
            
        <
    onupgrade>
            <
    addcharges count="20" />
            <
    applystate name="State_Arcane_Barrage_Charges" continuous="true" proxy="this_entity" />
        </
    onupgrade>
        
        <
    onimpact>
            <
    applystate name="State_Arcane_Barrage_Self" target="source_entity" duration="3000" />
        </
    onimpact>
    </
    ability
    PHP Code:
    <state
        name
    ="State_Arcane_Barrage_Self"

        
    icon="icon.tga"
        
        
    impactinterval="150,100,50"
        
    passiveeffect="effects/state.effect"
        
    effecttype="Magic"
    >
        <
    onimpact>
            <
    setent0 entity="proxy_entity" />
            <
    areaofeffect
                radius
    ="800"
                
    maxtotalimpacts="1"
                
    targetselection="random"
                
    targetscheme="visible_organic_enemy_units"
                
    center="source_entity"
                
    ignore="this_proxy_entity"
            
    >
                <
    spawnprojectile name="Projectile_Arcane_Barrage" source="source_entity" target="target_entity" offset="0 0 150" noresponse="true" />
                <
    setproxy entity="this_entity" target="target_entity" />
            </
    areaofeffect>
            <
    condition test="target_entity eq source_entity" target="proxy_entity" source="ent0">
                <
    setproxy entity="this_entity" target="" />
            </
    condition>
            
            <
    pushability source="source_entity" name="Ability_CorruptedDisciple4" />
            <
    removecharge entity="stack_entity" />
            <
    condition test="result eq 0">
                <
    expire />
            </
    condition>
        </
    onimpact>

    </
    state
    The maximpactspertarget="30" doesn't work here since you don't hit more than once. Here I made it so that on your second hit, if the proxy_entity wasn't changed, then it set it to null. This will make the third one hit the target again and so on. This way you loose one charge to nothing. If you want you could replace the <setproxy entity="this_entity" target="" /> with another <areaofeffect> but without the ignore.
    That way it would hit a random target that is not the proxy, but if it can't find one, it will then hit the proxy.

    PHP Code:
    <state
        name
    ="State_Arcane_Barrage_Charges"
        
        
    ishidden="true"
        
    impactinterval="800,600,400,200"
        
    deathpersist="true"
    >
        <
    onimpact>
            <
    addcharges entity="proxy_entity" count="1" />
        </
    onimpact>
    </
    state
    I must say, the result is quite nice. Great idea.
    Thanks for all the help, and I appreciate the comment! I'll post the full hero as a playable thing, from my bouts in practice mode, the end result is really pretty fun!

    Grats on moderator too btw! You've certainly put in enough effort in this section of the forums to earn it!
    HONOR- If you need it defined, you don't have it.

  20. #500
    I did something like this before, but instead you spawned a vodoo ulti whom shot dodgeable projectiles. Only problem with that was that the projectile just went to the target_postiton when it fired, and not any longer. You guys know how to fix that?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •