• 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.

Corruption: Offsets vs Vector

Is one way in almost any case the better choice?

  • "Relative Offsets" are almost everytime the better choice.

    Votes: 0 0.0%
  • "vectors" are almost everytime the better choice.

    Votes: 0 0.0%
  • Something else

    Votes: 1 100.0%

  • Total voters
    1
  • Poll closed .
Status
Not open for further replies.
I am currently working on a Spell kind of "Corruption form gul'dan"
Call forth three bursts of shadow energy from a target location in a line
corruption.png

from Heroes of the storm and for some reason I made that thing quite confiquerable and decleared 2 ways of defining the wave impact zones, the problem is somehow I think one is always the better choice, but wana ask someone elses opinion.

Currently you can setup the impactzone jumps in 2 ways:

Predefined relative offsets.

You save for each waveimpact the relative offset to the cast point.
One can set a Flag that this offsets turn according to caster target point angle (the saved locations are in this case 0°).
How the setup looks in triggers:
  • Actions
    • Set Corruption_Waves[Spell__UsedData] = 6
    • -------- Enable Turning --------
    • Set Corruption_Move_UseCustomTurn[Spell__UsedData] = True
    • Hashtable - Save Handle Of(Point(0.00, 0.00)) as 1 of Spell__Ability_Id in Spell__Hash
    • Hashtable - Save Handle Of(Point(200.00, 0.00)) as 2 of Spell__Ability_Id in Spell__Hash
    • Hashtable - Save Handle Of(Point(400.00, 0.00)) as 3 of Spell__Ability_Id in Spell__Hash
    • Hashtable - Save Handle Of(Point(400.00, 200.00)) as 4 of Spell__Ability_Id in Spell__Hash
    • Hashtable - Save Handle Of(Point(600.00, 200.00)) as 5 of Spell__Ability_Id in Spell__Hash
    • Hashtable - Save Handle Of(Point(800.00, 200.00)) as 6 of Spell__Ability_Id in Spell__Hash
results into this form:
test.png


Vector

Here one does not save offsets one defines upto 4 angles with wave jumpspeed aka vectors.
Each wave uses 1 vector to define the position of the next wavelocation.
To be compact I used only 2 vectors to built this formation.​
One can define a default speed which is used by all angles.
"From" & "To" define which waves are using this vector, if 2 vectors colide the one with the higher number takes this wave.
How it looks in triggers:
  • Actions
    • Set Corruption_Waves[Spell__UsedData] = 6
    • Set Corruption_Move_IfAngleDiffers[Spell__UsedData] = True
    • Set Corruption_Move_Angle1[Spell__UsedData] = 0.00
    • Set Corruption_Move_Angle1Speed[Spell__UsedData] = 200.00
    • Set Corruption_Move_Angle1To[Spell__UsedData] = 6
    • Set Corruption_Move_Angle2From[Spell__UsedData] = 3
    • Set Corruption_Move_Angle2To[Spell__UsedData] = 3
    • Set Corruption_Move_Angle2[Spell__UsedData] = 90.00
    • Set Corruption_Move_Angle2Speed[Spell__UsedData] = 200.00
Produces the same as above.
test.png



Now to my question again: You think one of both is in almost any case the better choice?
Or are both bad and there is a better one?
 
Last edited:
I would say both have their own uses. For example, when it comes to relativity of position/s, vectors are most likely preferred over predefined relative offsets, since you can also consider the angle of the spell when cast in a more understandable manner. Similarly, if you are sure of what happens, a predefined relative offset wouldn't hurt.
 
Status
Not open for further replies.
Top