• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

[Trigger] Math Problem

Status
Not open for further replies.
Level 17
Joined
Jun 12, 2007
Messages
1,261
I still don't get it why but my AoE of a custum spell won't work properly.
It has 5 levels, and the AoE starts at 300, then 400, then 500 etc
So in normal math you would get the formula: 200 + 100x = y

But it wont work here... The below trigger makes AoE that are way to big.
But when I try 100 + 50x = y they become to small.... (Half)

So what do I need to do in the below trigger to get the correct formula?

  • Unit Group - Pick every unit in (Units within (200.00 + (100.00 x (Real((Level of Excorcism [E] for (Triggering unit)))))) of CastPoint[(Player number of (Owner of (Triggering unit)))]) and do (Actions)
    • Loop - Actions
 
so u want it to have a radius of 300, right? that means it is a 600 area as far as i know

this leaks, too

better make a unit group using

Set AOEGroup = Every unit within (200 + ((Level of Ability for unit) x 100) range of Point

and remove it later with cal DestroyGroup(udg_AOEGroup)

I just use a bj function to destroy the group. But isn't your formula the same as mine?
 
(taschenrechner?) ????? I'll post the entire trigger. [Oh a calculator, yeh I know normal math. 200 + 100x = y should also work but it doesn't]

  • Excorcism
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Excorcism [E]
    • Actions
      • Set CastPoint[(Player number of (Owner of (Triggering unit)))] = (Position of (Triggering unit))
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within (300.00 + (((Real((Level of Excorcism [E] for (Triggering unit)))) - 1.00) x 100.00)) of CastPoint[(Player number of (Owner of (Triggering unit)))]) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Unit-type of (Picked unit)) is Undead) Equal to True
            • Then - Actions
              • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at CastPoint[(Player number of (Owner of (Triggering unit)))] facing Default building facing degrees
              • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
              • Unit - Add Exorcism to (Last created unit)
              • Unit - Set level of Exorcism for (Last created unit) to (Level of Excorcism [E] for (Triggering unit))
              • Unit - Order (Last created unit) to Human Sorceress - Slow (Picked unit)
            • Else - Actions
      • Custom script: call RemoveLocation(udg_CastPoint[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))])
Now lvl1 Channel has a targeting image of 300 AoE, lvl2 400 AoE.
This Channel ability is called Excorcism [E], it will trigger the dummy to cast; Excorcism on the level of the triggering unit. blabla....

Why does it pick a to big AoE? xD I want this one to be done before I make more....
 
This:
  • Set CastPoint[(Player number of (Owner of (Triggering unit)))] = (Position of (Triggering unit))
Was still from my previous custom spell trigger and I forgot to edit it.
When I read my trigger I suddenly realized that.
I changed it into:

  • Set CastPoint[(Player number of (Owner of (Triggering unit)))] = (Target point of ability being cast)
And now it work's fine. ^^
 
kk, good luck with whatever u are doing

Preparing Ziggurat Takeover II for Beta Release, you can find ZIggurat Takeover in my maps section (signature).

Or if interested go here, it's the thread for my map.
Even though nobody is paying attention to it, I post some information and screenies on it, also the progress. xd
 
Status
Not open for further replies.
Back
Top