HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Split Ability Help

08-26-2006, 11:24 PM#1
WTFish
I'm making a Binary Fission type ability, and I have no idea why this doesn't work, lol.
Trigger:
Split
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Binary Fission
Collapse Actions
Set SplitCaster = (Triggering unit)
Unit - Set life of SplitCaster to ((Life of SplitCaster) / 2.00)
Unit - Create 1 Wisp for (Owner of SplitCaster) at (Position of SplitCaster) facing 0.00 degrees
Unit - Set life of (Last created unit) to (Life of SplitCaster)
Selection - Add (Last created unit) to selection for (Owner of SplitCaster)

If anyone can tell me why it doesnt work, or a way I can fix it, that would be great .
08-27-2006, 12:35 AM#2
Ice_Keese
Well, what doesn't work?
Your question is a bit vague...
08-27-2006, 02:36 AM#3
Wyvernoid
Try changing all the things about spell into 'orders'. This may help a bit though troublesome.
In case you don't know what I'm talking about, here's a modified trigger...
Trigger:
Split
Collapse Events
Unit - A unit Is issued an order with no target
Collapse Conditions
(Issued order) Equal to {the ability you based on - attention! THE ABILITY YOU BASED ON}
Collapse Actions {NOT MODIFIED}
Set SplitCaster = (Triggering unit)
Unit - Set life of SplitCaster to ((Life of SplitCaster) / 2.00)
Unit - Create 1 Wisp for (Owner of SplitCaster) at (Position of SplitCaster) facing 0.00 degrees
Unit - Set life of (Last created unit) to (Life of SplitCaster)
Selection - Add (Last created unit) to selection for (Owner of SplitCaster)
08-27-2006, 04:08 AM#4
WTFish
Sorry for being so vague lol. I don't think its a problem with the event, as the trigger triggers fine. I think its something to do with the actions.
Heres an example of what happens when I cast it:
I have 2 units.
I cast the ability
I have 4 units.
I cast the ability
I have 6 units (wtf?)
I cast the ability
I have 8 units (again, wtf?)
I cast the ability
I have 20 units.

It is obviously not working as I intended it to lol. Each time I cast it I am meant to have double the amount of units I had previously. However, sometimes it works perfectly, and other times (like the one I showed you) it does not. Anyone know why?
Thanks
08-27-2006, 07:01 AM#5
Wyvernoid
Why I suggested that is because... When I use some events related to spells, I sometimes fail too. The problem was that sometimes "Target Unit of ability being cast" was equal to "No unit". But when I changed it to order, I got the right result.

Believe me, spell events are new components in tft and sometimes may have problems, but order events should be no problem.

Anyway, try it. JUST A TRY! ^^
08-27-2006, 08:30 AM#6
The)TideHunter(
And hows that surposed to give you double units?
Its creating 1 unit everytime the spell is cast.
If you wanted double amount of unit-type based units everytime you cast, you this:
Trigger:
Split
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Binary Fission
Collapse Actions
Custom Script: local group g = CreateGroup()
Custom Script: local unit CurrentUnit
Custom Script: local integer Units
Custom Script: call GroupEnumUnitsInRect(g, null)
Custom Script: loop
Custom Script: set CurrentUnit = FirstOfGroup(g)
Custom Script: exitwhen CurrentUnit==null
Custom Script: if(GetUnitTypeId(CurrentUnit) != YourUnitType)then
Custom Script: call GroupRemoveUnit(g, CurrentUnit)
Custom Script: endif
Custom Script: endloop
Custom Script: call ForGroup(g, function CountUnitsInGroupEnum)
Custom Script: set udg_TempInteger = bj_groupCountUnits
Custom Script: call DestroyGroup(g)
Set SplitCaster = (Casting unit)
Set TempLoc = (Position of SplitCaster)
Unit - Set life of SplitCaster to ((Life of SplitCaster) / 2.00)
Unit - Create TempInteger Wisp for (Owner of SplitCaster) at TempLoc facing 0.00 degrees
Collapse Unit Group - Pick every unit in (Last created unit group) and do (Actions)
Collapse Loop - Actions
Unit - Set life of (Picked unit) to (Life of SplitCaster)
Selection - Add (Picked unit) to selection for (Owner of SplitCaster)
Custom Sctipt: call RemoveLocation(udg_TempLoc)

Yes its big, i would prefer to use Jass.
Hope thats what you asked, cause i spent long on it.
You need to change the bit that says: YourUnitType to the rawcode of the unit type thats being created.
and create a variable called TempLoc which is a point
and create a variable called TempInteger which is a integer.
08-27-2006, 09:27 AM#7
blu_da_noob
I think it adds the units to your selection, so all of the units you have selected are casting the ability and you should be getting a duplicate for each.
08-27-2006, 09:47 AM#8
Anitarf
Maybe some of the units are not casting the ability because of cooldown/mana?

Besides, he wasn't using spell event responses, he was using "triggering unit" which always works correctly. Using orders for this sort of stuff is just wrong.
08-27-2006, 11:10 AM#9
The)TideHunter(
Quote:
Originally Posted by Anitarf
Besides, he wasn't using spell event responses, he was using "triggering unit" which always works correctly.

What difference does it make? I prefer to use Casting Unit rather than Triggering Unit, and it is a spell event, so why not use it?
I'v had problems with triggering unit in the past so i never use it now.
08-28-2006, 05:57 AM#10
WTFish
Ahh... sry The)TideHunter(. Anitarfs right, I set cooldown to 0 seconds and it works fine. . Hopefully your trigger can be useful to some people, looks like a lot of time went into it . Perhaps it gives a different effect for mine, or can be used in different ways, I couldnt understand it lol .

Anyway thanks for helping
08-28-2006, 07:45 AM#11
Anitarf
Quote:
Originally Posted by The)TideHunter(
What difference does it make? I prefer to use Casting Unit rather than Triggering Unit, and it is a spell event, so why not use it?
Because it's horribly bugged?
Quote:
I'v had problems with triggering unit in the past so i never use it now.
Well, I'm sure of one thing, when using cast events, Triggering unit is far superior to Casting unit because it works properly even after waits.
Split Ability Help - Wc3C.net