| 06-14-2004, 10:22 PM | #1 | |
i wanna make a map using Marines or any unit with ammo like attack. When he shoots/attacks, he loses 1 mana/ammo. And when he loses all his mana/ammo, he cant attack. I dont want it a spell. I want in a attack. how? like: Quote:
Like that (i made it up to get u an idea of wut i want) ^_^ thanx |
| 06-14-2004, 10:28 PM | #2 | |
Quote:
I wouldn't use the aspect of mana if I were you but here's how you do it: Basically make a trigger that detects the spell being cast and minus his mana by 1 point by setting the mana value to his current mana value - 1 mana basically.. very simple Btw if you want it like ammo I recommend turning off mana regeneration :P. |
| 06-14-2004, 10:34 PM | #3 | |
ok... i dont get it. Can u show me how u would do it like wut i did. Im a noob at triggers and so i need a bit of help. or, if u could make a simple map and then i can see for real. thanx! and when u said Quote:
|
| 06-14-2004, 10:36 PM | #4 |
even simpler... make the units attack autocast...like searing arrows. make the mana cost 1. then just remove all the buffs/damage/effects, or however you want it. projectile art, and icons...etc dont even need triggers! look at that! hope it helps...peace flames' |
| 06-14-2004, 10:38 PM | #5 |
Action example of minusing mana: Unit - Set mana of (Casting unit) to ((Mana of (Casting unit)) - 1.00) |
| 06-14-2004, 10:46 PM | #6 |
The only trigger you would need is this: Code:
Event:
Unit is attacked
Conditions
<none>
Actions:
If -
Conditions:
Real comparison- Mana of attacking unit greater than or equal to 1
Then do:
Unit- Set mana of attacking unit = mana of attacking unit - 1
Else do:
Unit- Issue order with no targer - Order attacking unit to StopThat's all you need. This kind of thing has been asked about and done at least a dozen times. |
| 06-15-2004, 07:26 PM | #7 |
th15, how do i make it "-1"? i cant! i dont know y? its strange! can u hel me? or anyone taht knows how to make -1 in triggers! |
| 06-15-2004, 10:59 PM | #8 |
... When you click on the part to change the value, use the "Arithmetic" function. Its the default function. Then just enter "Unit- property: mana of XXX unit" and change the sign to "-" |
| 06-16-2004, 12:25 AM | #9 |
you could also make a spell of heal making the targets enemy and the heal amount in the negative and mana cost 1 etc. and disable attack for the unit... with that attack, it will use it at the target until you run out of ammo or they are dead. you could also name the auto casting as "auto aim" another way you could do it, is sacrifice one of the resourse things up the top... like food or wood. with food, you could make the denominator (the bottom of the #/#) as the maximum ammor and the food the amount of ammo... then use the above trigger to take away food instead of mana... with wood... nows this could be funner, you can use the bunch of lumber pickups as ammo crates, they could be no restriction on ammo... and you can use the like wise triggers as above... also if you do intend to have ammo instead of one of the resourses, you can change the ico to a picture of bullets... ou can slo use the resourses as keys, grenades, bombs, other weapons etc. |
| 06-16-2004, 01:55 AM | #10 |
WOW! KOOL! thanx both of u! Logik, thats sounds great! ill try that! im not on my comp now so ill let u know Th15 if it worked! I thought, when u made it "-" its turn out to be "0.00" but ill try again. Tahnx again! Bye! |
| 06-16-2004, 12:36 PM | #11 |
logik- To my knowledge, heal cannot target units with full health. Elthanor- Add a "Set Variable" action. Click the hotspot on the left to set it to the correct variable. On the right, click the underlined text there once. Smack in the centre of the new window that pops up, you will see "1.00+1.00". Change the number of the left to the variable name. Change the "+" sign to a "-" sign. And finally, you should really start out smaller if you haven't even discovered the arithmetic function. |
| 06-29-2004, 01:10 PM | #12 | |
Quote:
its not working. wut variable? and wut maps has this in them. so i can how they did it. i cant make in negative! it would work! im sorry but i tryed everythig! PLZ HELP! ill give them credit on my maP! ![]() |
| 06-29-2004, 05:43 PM | #13 |
You don't need Triggers! Like flames said, make a ability based on Searing arrows, or something, and make it's cool down really short, and remove the buffs and stuff, have it set to start out on auto-cast, and have it so it doesn't desplay on the command card so the players can't turn it off. |
| 06-29-2004, 08:42 PM | #14 |
but, when your mana is 0, wont the unit start attacking? and even if u make is so the unit has no attack, i thing the triggering way better! lol. ill try taht way tho. BUT, cant i just make is -1 and then it will be done? o_O |
| 06-30-2004, 12:18 AM | #15 |
ye soz i 4got about that heal proble,\m.... |
