• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Spells: Item weight

Status
Not open for further replies.
Level 7
Joined
Dec 6, 2004
Messages
288
Hey, I'm trying to create an Item weight for my RPG, it's basically subtracting movement speed from the Hero when carrying an item;
Ex.: Chain Armor, 20lbs.
Quilted Armor, 5lbs
I would use the weight to create some formula to remove a realistic ammount of speed. The problem is, I could always 'Set unit speed,' but that wouldn't fit in with having Speed modifying items, such as boots of speed. I could just base a spell off of 'Slow' to subtract a % of the movement speed, and that would work nicely. Except, the ammount of speed reduction depends on how much strength your hero has, the more, the less speed is reducted. This could be accomplished, by simply adding movement speed to the hero on each strength interval I suppose, and then I'd need to make sure that the speed never actually adds onto the hero when it is not wearing anything, that would just make him faster. But in fact, only add movement speed when an item is equiped, and no more than the item takes.
I'm not completely sure how this would work, but if someone could find a good formula or a different approuch to this that would be awesome! This would also be a very nice spell :D
 
Level 9
Joined
Mar 25, 2005
Messages
252
Sollution

Here is a way you can use agility to increase/decrease movement speed. I didn't read your post carefully enough so this propably doesn't help you but since I have already written it I shall post it. :D
I came up with one way of doing it:
  • first give a value for the "Hero Attributes - Movement Bonus per Agility Point".
  • make a trigger that is activated when a unit acquires the item
  • use the "Modify Hero Attribute" action to decrease the units agility
  • here you could do a function that counts how much agility will be decreased paying attention to the amount of strenght the unit has
  • make another trigger in the same way that increases the agility of the unit back when it drops the item
Now the agility of the unit that gets the item is decreased - decreasing attack and movement speed. But if the unit's primary attribute is agility then it's attack damage will also be decreased.
 
Status
Not open for further replies.
Top