| 02-26-2005, 09:18 AM | #1 |
how do you make it so a unit can't attack if the owner of the unit has no lumber? |
| 02-26-2005, 09:25 AM | #2 | |
Quote:
you can take away its attack ability, 'Aatk' was it? i can't remember exactly you can force it to order - 'stop' whenever you detect it attack with event unit is attacked cond attacking unit = whatever owner of attacking unit current lumber = 0 action etc... i'm sure theres other ways, but i'm tired atm and need sleep badly |
| 02-26-2005, 09:31 AM | #3 |
but that means a unit would have to attack a unit before it can be told to stop attacking.. thanks for help.. I need to stop a unit from attacking before it attacks |
| 02-26-2005, 09:54 AM | #4 |
Guest | Event - Grd insults BadFurDay while he tries to help him Conditions - none Actions - Run custom script (NoHelpForGrd()) Set (grd_IQ) to (0) Display text message for (grd): (good bye) |
| 02-26-2005, 10:20 AM | #5 |
Do you just hate when people don't know when there not wanted.. I thanked you for helping but you where just pulling triggerz out of your ass.. sorry, but it's the truth... I don't be an asshole in your topics, your the one who keeps posting in mine.. So why don't you be good little boy and go play with the traffic. |
| 02-26-2005, 12:14 PM | #6 |
Event:A unit is attacked Condition:Owner of attacking unit current lumber equal to 0 Action: Order attacking unit to stop -Even the event said that unit is attacked but when ur unit try attack and unit and owner of it has 0 lumber the game will make it stop instantly so it's cant attack try it and see man ^_^ |
| 02-26-2005, 12:51 PM | #7 |
ok thanks, another name to add to the credits welcoming message :D + I gave yoiu rep. :D thanks -------------------------------------------------------------------------------------------------------- This is the last thing I need help with, except I have some questions for Ant... But this is the last time I'll be asking for any help on my map!!!!! What I want is to make it so a unit will not even try to attack another unit, so like with this trigger that I have now the unit will move towards the unit, and it makes it hard to walk away and the unit will jolt, which is really annoying.. |
| 02-26-2005, 02:38 PM | #8 |
Well just find ''accquistion range'' in object editor and edit it as u want if u set it to 0 then u must order attack and target to an unit to make ur unit attack it if not even enemy sit next to your unit but he wont attacked back if not got attacked. |
| 02-27-2005, 05:56 AM | #9 |
thanks for the help but puting the accquistion range to 0 has made it worse! that sounds weird, but it's true! |
| 02-27-2005, 08:47 AM | #10 | |
Quote:
didn't believe what i said was true till someone else said it? tsk, need to try these things first anyways, as for your last question, i haven't looked deeply into this but you can try to remove the attack ability 'Aatk' (i think, i may not be correct on the code and someone will have to correct me) and then add the ability back when u get lumber again i'm not exactly sure on this method the alternate method i suppose could be to use the attack-stop stuff, but also ally the player with the enemy while having no lumber and unally after not as snazzy, but i imagine it would work... only problem would be spells |
| 02-27-2005, 10:20 AM | #11 |
raptor-- I don't understand.. "remove the attack ability 'Aatk' " is that like that code stuff? if so how? |
| 02-27-2005, 09:00 PM | #12 | |
Quote:
Custom script: call UnitRemoveAbilityBJ( 'Aatk', unit ) but i tried it, yes you can remove the attack ability nicely, but in the end i wasn't able to re-add the attack ability back to the unit, so scratch that |
| 02-28-2005, 09:23 AM | #13 |
You could try having a periodic trigger that adds the 'Orc Burrow' ability to the unit when lumber hits 0, and removing it when lumber goes up again. If I remember correctly, that ability stops the unit from attacking at all. (Unless units are inside it, but if it doesn't have a cargo hold, this isn't a problem.) I'm not sure if it behaves much better than the stop-ordering approach, but it's worth a try. You could also experiment with simply replacing the unit with another, identical, unit that doesn't have an attack. |
| 02-28-2005, 11:46 AM | #14 |
| 03-04-2005, 03:07 AM | #15 |
divine_peon that would work with my map, if it wasn't for the camera triggers and my movement system! :( |
