| 12-03-2004, 11:22 AM | #1 |
This trigger is pissing me off, IT KEEPS HITTING ALLYS?!?@ WHY?!@
Code:
Storm
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) == Channel
Actions
Custom script: local unit udg_UnitVar
Custom script: local unit udg_UnitVar2
Set UnitVar = (Casting unit)
Set PointVar = (Position of UnitVar)
Unit - Add Hax to (Casting unit)
Unit - Remove Hax from (Casting unit)
Unit - Pause (Casting unit)
Animation - Change (Casting unit) flying height to 300.00 at 100.00
For each (Integer A) from 1 to 4, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Integer((Mana of (Casting unit)))) >= 50
Then - Actions
Special Effect - Create a special effect attached to the origin of (Casting unit) using Abilities\Spells\Other\Monsoon\MonsoonBoltTarget.mdl
Set StormCount = (StormCount + 1)
Unit - Set mana of (Casting unit) to ((Mana of (Casting unit)) - 50.00)
Wait 0.75 seconds
Else - Actions
Do nothing
Unit Group - Pick every unit in (Units within 800.00 of (Position of UnitVar) matching ((((Matching unit) belongs to an ally of (Owner of UnitVar)) == False) and ((((Matching unit) is Dead) == False) and ((Matching unit) != UnitVar)))) and do (Actions)
Loop - Actions
Unit Group - Add (Picked unit) to StormGroupVar
For each (Integer A) from 1 to ((Number of units in StormGroupVar) + 1), do (Actions)
Loop - Actions
Unit Group - Pick every unit in (Random 1 units from (Units within 800.00 of (Position of UnitVar) matching (((((Owner of (Matching unit)) is an ally of (Owner of UnitVar)) == False) and (((Matching unit) is A structure) == False)) and ((((Matching unit) has buff Storm) == False) and and do (Actions)
Loop - Actions
Set UnitVar2 = (Picked unit)
Game - Display to (All players) the text: (String((Unit-type of UnitVar2)))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) is dead) == False
UnitVar2 != UnitVar
((Picked unit) belongs to an enemy of (Owner of UnitVar)) == True
((Picked unit) has buff Storm ) != True
Then - Actions
Custom script: call CasterCastAbility( GetOwningPlayer(udg_UnitVar), 'A006', "curse", udg_UnitVar2, true)
Custom script: call CasterSetCastSourceLoc(udg_PointVar)
Custom script: call DontDamageSelf()
Custom script: call CasterCastAbilityLevel( GetOwningPlayer(udg_UnitVar), 'A004', udg_StormCount, "chainlightning", udg_UnitVar2, false)
Else - Actions
Do nothing
Wait 0.60 seconds
Unit - Unpause UnitVar
Set StormCount = 0
Animation - Change UnitVar flying height to 0.00 at 150.00why heck, ive even called dont damage self, like that worked... |
| 12-03-2004, 03:11 PM | #2 |
I don't see why it would, but somestuff I have to say: call DontDamageSelf() That does nothing actually, DontDamageSelf() is a parameter of the new damage function to be put in the damage options call DamageUnitsInAOEEx ( .... .... , DontDamageSelf() + ....) for the trigger, the only idea I can have is that unit var is changed after a wait, but you can just change the targets allowed of the abilitieS? |
| 12-04-2004, 04:47 AM | #3 |
yes, the spell that the casters use is chainlightning which has the exact same targets as the normal spell (i.e it cant target allys) yet the caster system somehow bypasses this? |
| 12-04-2004, 04:16 PM | #4 |
Well if you check it, even your trigger has filters for allies, so I think it is because unitvar is changing during the wait |
| 12-05-2004, 08:57 AM | #5 |
Guest | I have the same problem with Light Raining, Fire Wall and Poisonous Weeds spells How can i fix it? :( |
| 12-06-2004, 03:57 AM | #6 |
yeah, im not sure why, but anyway how do i get the 'returns unit' thing to work? it doesnt tell you anywhere how to use it. |
| 12-06-2004, 04:05 AM | #7 |
Local variables don't work in If Statements created by the GUI. Sucks, doesn't it? ![]() |
| 12-07-2004, 08:16 AM | #8 |
really? damn. anyway also how do i find a spells integer ID? it doesnt have an ordercode and i cant find it. |
| 12-09-2004, 01:38 PM | #9 |
You mean the order id? well it is kind of bad actually You need to place an unit with that ability, and owned by your self, then make this trigger: Events: -A unit is issued an order with no target -A unit is issued an order targetting an object -A unit is issued an order targetting a point Conditions: Actions: Custom Sctipt : call BJDebugMsg(I2S(GetIssuedOrderId())) Use test map, and once in the game, take the unit and order it to cast that ability, a number will appear, something likje 8543244 , take a paper and a pencil to write down that number, it is the ability's order id |
| 12-10-2004, 05:15 AM | #10 |
thanks! :D |
