| 11-06-2004, 11:55 PM | #1 |
Hi all, I guess this is my first post on those forums. Well anyway. I've made this map, which got pretty high ratings by several betatesters, but its not finnished yet. I'm looking for a injury system, each and every unit (save a few.) has some % chance to cause injuries to enemy units. Only one I've managed to do is a custom Bash, that has a 2% chance to stun the enemy for 9 seconds, called "Injury (Concussion)". The abilities I cant figure out how to make, is the following ones. Injury (Left arm) - Passive skill (Such as critical strike, bash etc.) which has a 4% chance to make the unit miss 30%. Injury (Right arm) - Passive skill (- o -) which has a 3% chance to decrease the enemy attack speed by 25% Injury (Legs) - Passive skill (- o -) which has a 3% chance to decrease the enemy unit's movement speed by X%. Injury (Eyes) - Passive skill (- o -) which has a 2% chance to decrease the enemy unit's range by 200. Can someone advice me how to create those (If possible.) Thanks alot for any ideas. Ps. oh, almost forgot, I have the World Editor Unlimited. |
| 11-07-2004, 12:24 AM | #2 |
One problem: attack range decrease - perhaps this is possible in WEU, but it definitly can't be done in normal WE. And, the way I am going to describe you, the easiset way in my opinion, uses only spells to get the desired effect, and you definitely can't decrease the attack range with spells, whatever editor you're using. The method I mentioned would be to use abilities based on "orb of slow". Orb of slow is an ability that gives the unit that has it a chance to cast a spell on attack. This spell can be any unit-targeting spell you assign to it. Another nice thing, the orb of slow ability allows you to give the unit different chances to have effect versus heroes, normal units, and summons. So, you make four differend orb-of-slow based abilities. One has a chance to cast a spell that decreases unit's movement speed (modified slow: injury-legs), and others have other spells in similar fashion (based on slow for attack speed or curse for miss chance). Problems: this will clog up the unit's command card with icons, one for each injury type orb-of-slow skill. The orb of slow displays a "disabled" icon of the ability it uses. An alternative to orb-of-slow abilities is to trigger the whole thing. The principle behind this method is similar: you use actual spells based on curse or slow to get the desired effect. But someone has to cast these spells. Here's where "dummy casters" come into play. Dummy casters are special invisible units that are created by triggers to cast additional spells. To make them fully invisible, like they weren't there, you must give them an invisible model like the "zone indicator", no shadow, and the "locust" ability that makes them unselectable, untargetable and not show on the minimap. Code:
Events:
A unit is attacked
Conditions:
attacked unit is allowed to be injured
Actions:
If - then - else multiple functions:
If - conditions:
integer comparison - (Random integer number between 1 and 100) less than or equal to 3
Then - actions:
set TempPointVariable = (position of (attacking unit))
unit - create DummyCaster for (owner of (attacking unit)) at TempPoint facing default building facing degrees
unit - add ability - add curse(left arm injury) to last created unit
add a 1 second expiration timer to last created unit
unit - issue order targeting a unit - order last created unit to (undead banshee - curse) (attacked unit)
custom script: call RemoveLocation( udg_TempPointVariable ) //comment: this line is here to prevent a memory leak
Else - actions:
do nothing
//comment: repeat the if-then-else for every possible type of injury; just change the spell each time
//if you want only one type of injury to be possible per one attack, then put a "skip remaining actions" at the end of "then - actions" in every if-then-else. |
| 11-07-2004, 12:30 AM | #3 |
Uh well... Triggering isnt my most powerful side, and I dont really get what all that gibberish mean (Trigger struff.). And.. Should I add that identical command to my triggers, or is there something I should change, and could you specify what it means by using that trigger. It will summon a unit that will... do what exactly? Thanks for the ideas btw. ps. oh right.. There is no way to remove the icons from the unit? So the passive abilities are there, but just not visible? I tried to set icon to 'NONE', but just showed up as green squares then... ![]() |
| 11-07-2004, 12:41 AM | #4 |
That trigger does the following: whenever a unit is attacked, it gives a chance that a spell will be cast on that unit (by a dummy caster), the spell representing an injury. I don't know what kind of units are allowed to be injured in your map (how are they distinguished from units that can be injured), otherwise I could give you a more precise condition for the trigger. Anyway, this is a very simple trigger, try to make it. All you need to know is that you need to make a point variable first, in the variable editor. You can get there by clicking on the "yellow X icon" in the trigger editor's toolbar. Then you need to make a dummy caster in the object editor, and all the injury-spells (spells that decrease attack speed, chance to hit etc...). |
| 11-07-2004, 01:07 AM | #5 |
Ill give you a list of units etc. Marine - (can be injured in all ways) Conscript - (can be injured in all ways) Medic - (can be injured in all ways) Engineer - (can be injured in all ways) Tesla Trooper - (can be injured in all ways) Grenadier - (can be injured in all ways) Rocket Trooper - (can be injured in all ways) (All above can cause injuries, except for Tesla trooper) Pillbox - (can cause injuries in all ways) Adv. Pillbox - (can cause injuries in all ways) Camo Pillbox - (can cause injuries in all ways) Artillery - (can cause injuries in all ways) Light Tank - (can cause injuries in all ways) Battle Tank - (can cause injuries in all ways) Legion Tank - (can cause injuries in all ways) Shryderic Tank - (can cause injuries in all ways) (None above can be injured in any way) Btw. I have created a dummy peasant now, which can cast curse, slow (movement), slow (attack speed), and stormbolt (stun). (Ops, removed Firebolt and replaced it with stormbolt) Guide me through the rest please, do you have MSN messenger perhaps? Oh, and I dont know how to make variables ^_^ |
| 11-07-2004, 06:32 AM | #6 |
To make it so that abilities don't show up in the interface, just check the Item ability- True in the object editor for the abilities that you want to not show up. This makes it so that they don't appear at all. |
| 11-07-2004, 09:28 AM | #7 |
Thanks alot, I was pretty sure it wasnt possible, but u proved me wrong, and im very grateful! :D |
| 11-07-2004, 10:46 AM | #8 | |
Quote:
Umm, that's not true at all. Abilities will show an icon as long as they are based on a type of an ability that shows an icon. So, if you base your ability on something that has an icon, it will still have it no matter if you set it as an item ability. Most item abilities, however, don't have an icon, and those won't give an icon even if unit abilities are made from them. This is also a good idea on how to mark your units, which can injure and which can't. Just make two abilities, based on some icon-not showing ability, like item-attack spped bonus or item - life regeneration bonus. Make these two abilities do nothing, and just give them to the units. These abilities won't show an icon, but you can use them to help the trigger determine if a unit can injure/be injured. Code:
Conditions:
and - multiple conditions
conditions:
integer comparison - (unit - level of ability (can-be-injured) for (attacked unit) greater than 0)
integer comparison - (unit - level of ability (can-injure) for (attacking unit) greater than 0)One more thing: you said your dummy peasant can cast two spells based on slow? That's not good, if you have more abilities based on the same one on one unit, they malfunction. That's why, in my trigger, I used a dummy caster that has no abilities and then I added only the ability he had to cast to him. |
| 11-09-2004, 11:30 AM | #9 |
Can i make an extra button on my units, on which you click to open a menu which shows the injuries you can cause? I mean, instead of having the stupid thingys appear on the hero. |
| 11-09-2004, 02:59 PM | #10 |
If you trigger the whole thing, you don't have any abilities showing on the hero. Otherwise, I think spellbooks can't hold passive abilities (not sure though), so the answer to your question is probably no. |
| 11-09-2004, 05:17 PM | #11 |
Yeah well I dont really know triggering and I have a hard time understanding what u explain, so... |
| 11-10-2004, 08:23 PM | #12 | |
Quote:
Spellbooks CAN hold passive abilities :) i've used it on one of my heros... |
