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

[Trigger] A fun spell I am trying to make

Status
Not open for further replies.
Why do you use "Facing Of Unit" as parameter. Just replace these facings with 2 reals which are depended on the current index of it's instance.

QQSFsfx1 and QQSFsfx2 are the dummies? Why you change their facing? And it anyway is not instant (even you use 0.00 seconds), so your further action won't be correctly. Thats why you should work with reals.

Other action is ok I think, "offset of 20 towards <increasing/decreasing> real".

Just in case you've forgot: put "Custom script: set bj_wantDestroyGroup = true" before you create your unit groups, so they get destroyed.

And I know this is very subjective now, but OMG names like "QQSFsfx1" .... I would definitly change the names. :d I had exactly to read the actions that I understood that this variable is the circeling dummy. ^_^

Edit: The trigger streches the site for me. Please put it in hidden tags.;)
 
When start spell:

Set offset1[index] = 20
Set offsetChange1[index] = 3

Set offset2[index] = 20
Set offsetChange2[index] = -3

Periodic trigger:

  • Set Real1[index] = Real1[index] + 5
    • If- Conditions
      • (offset1[index] + offsetChange1[index]) > MAX_OFFSET
    • Then - Actions
      • Set offsetChange1[index] = -3
    • Else - Actions
      • If - Conditions
        • (offset1[index] + offsetChange1[index]) < MIN_OFFSET
      • Then - Actions
        • Set offsetChange1[index] = + 3
      • Else - Actions
  • Set offset1[index] = offset1[index] + offsetChange1[index]
  • Unit - Move Dummy1 to Point1 with offset offset1[index] towards Real1[index]
This example was only for 1 dummy. For second one do same but with Real2 = Real - 5
 
Status
Not open for further replies.
Top