Animation jimmying?

M

MrJoeS

Guest
I want to use the Villager 3d model for a hero, and I'd like him to use the "attack" animation when he cast spells. The default is for him to stand still, or scratch his neck. Am I out of luck?
 

Darg

Administrator
Reaction score
49
Untitled Trigger 001
Events
Unit - A unit owned by Player 1 (Red) Begins casting an ability
Conditions
(Unit-type of (Casting unit)) Equal to Villager (Male)
Actions
Animation - Play (Casting unit)'s attack animation
 
M

MrJoeS

Guest
Awesome. Elegant. I was worried this would be a dead end, and I'd need to accept a shortfall or rework a significant bit of concept.

Thanks again Darg.
 
M

MrJoeS

Guest
Ok, trouble again. The villager's ability is an item-stealing thing. I was hoping to be able to write triggers to have whatever item was in the target unit's "slot 1" and add a copy of it to the villager's inventory.

This is the trigger I wrote:

[]

Larceny
--Events
----Unit - A unit Finishes casting an ability
--Conditions
----(Ability being cast) Equal to Pick Pocket
--Actions
----Set Loot = (Item-type of (Item carried by (Targeted unit) in slot 1))
----Item - Remove (Item carried by (Targeted unit) in slot 1)
----Hero - Create Loot and give it to (Triggering unit)

[]

I really love TFT WE's "copy as text" feature.

I know my problem here is that (targeted unit) isn't meant to do what I'm trying to do. It's meant to be attached to the "acquires a target" unit event. I guess my basic problem is that I can't find a "is the target of an ability" or "is affected by an ability" or "acquires a buff" event for units.

Then I could make the triggering unit the target of the Pick Pocket ability.

(oh, by the way, Pick Pocket is a stripped-down, 50.00-range, low damage Frost Nova with no AoE and a slowing duration of only 0.2 seconds)
 

Darg

Administrator
Reaction score
49
The solution here is going to be just a little more tricky, but it should be do-able. It seems you are right, there is no event response to find the target unit for a spell casting event, which seems very odd. Anyway:

Code:
Untitled Trigger 001
    Events
        Unit - A unit owned by Player 1 (Red) Is issued an order targeting an object
    Conditions
        (Issued order) Equal to (Order(frostnova))
                                   [your spell is based off frost nova]
    Actions
        set <pickpocket_target> = (target unit of issued order)
              [unit variable]

Code:
Larceny
    Events
       Unit - A unit Finishes casting an ability
    Conditions
       (Ability being cast) Equal to Pick Pocket
    Actions
       Set Loot = (Item-type of (Item carried by <pickpocket_target> in slot 1))
       Item - Remove (Item carried by <pickpocket_target> in slot 1)
       Hero - Create Loot and give it to (casting unit)

oh, and if this is a multiplayer map, turn "pickpocket_target" into a unit array, and do:

<pickpocket_target[player number of (ordered unit)]> in the first trigger

and:

<pickpocket_target[player number of (casting unit)]> in the second trigger.


hopefully that works.......


ADDITIONAL NOTE ON "COPY AS TEXT" feature:

To preserve the trigger formatting, you can:

1. click on the "#" button which sits among those buttons between the post subject and the contents of your post. Paste your trigger into the window that pops up.

2. Type in "(code)" and "(/code)" before and after the trigger, replacing the () brackets with [] brackets (I didn't do that because it automatically turns everything inside the tags into code).
 
M

MrJoeS

Guest
Thanks. I was scared I might need to use a risky region system or something that might occasionally glitch things up. Fortunately, unlike StarEdit, WE gets away from using regions constantly.

I'll be sure next time to post in a "code" box, too. :D
 
M

MrJoeS

Guest
Custom Unit limitation?

While engineering the heros in my map, I ran into what I think may be obstacles. Trying to reach specific hit point and armor totals, I found myself doing algebra to get the outcomes I wanted. There may be a way around this.

Can I cause the bonus HP per point of Strength to be something other than 25?

It is impossible to use base values of less that one for HP and armor (called "defense" in the editor, for absolutely no reason) though -150 is technically an integer. And yeah, it's pretty anal of me to bother mentioning that, but it does bother me. ::grin::

I can work with these limitations, but I wanted to have HP values on the order of 100, but not put Strength values as low as 2 or 3.
 

Darg

Administrator
Reaction score
49
Yes you can, I'm guessing from the question that you haven't had a look at advanced -> gameplay constants yet. It's pretty amazing some of the things you can change in there :)

And while you're at it, have a look at advanced -> game interface, and take a look at how much (and how easily) you can change the entire game interface!



oh yeah, regarding your question, look for the "hero attributes" fields in gameplay constants.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top