Spell Fail

Septimus

New Member
Reaction score
58
spells_2267_screenshot.jpg


Status

Coding : GUI/Trigger
Spell Type : MUI

Ability Description

Create a word "FAIL" that would fall from the sky. Each word deal 50 damage to any enemy within 300 range and higher level reduce the mana cost and cooldown.

Level 1 - 45 seconds cooldown, 90 mana cost.
Level 2 - 30 seconds cooldown, 75 mana cost.
Level 3 - 15 seconds cooldown, 60 mana cost.

Version 1.02 Update

Fix documentation error.
Further optimize the code.

Version 1.01

Reconstruct the entire spell, more efficient and have additional effect (Full credit for reconstruct goes to Rmx).
Add RED BARON to credit list.
Change tooltips description.
Change the falling angle of the word.
Enable user to adjust the falling speed at much easier way.
Custom values no longer been use.​

Trigger:
  • FAIL On
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to FAIL
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • FAIL_Skip Equal to 0
        • Then - Actions
          • Trigger - Turn on FAIL Loop <gen>
        • Else - Actions
      • Set FAIL = 1
      • Set F_Point[1] = (Target point of ability being cast)
      • For each (Integer F_Spawn) from 1 to 4, do (Actions)
        • Loop - Actions
          • Set FAIL_Times = (FAIL_Times + 1)
          • Set FAIL_Skip = (FAIL_Skip + 1)
          • Set FAIL_Off[FAIL_Times] = True
          • Set Sheep_Off[FAIL_Times] = False
          • Set F_Hero[FAIL_Times] = (Casting unit)
          • Set F_Speed[FAIL_Times] = 2.00
          • Set F_Distance[FAIL_Times] = (800.00 - ((Real(FAIL)) x 100.00))
          • Set F_Distance[FAIL_Times] = (F_Distance[FAIL_Times] + 265.00)
          • Set F_Point[2] = (F_Point[1] offset by F_Distance[FAIL_Times] towards 180.00 degrees)
          • Set F_Height[FAIL_Times] = 800.00
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • FAIL Equal to 1
            • Then - Actions
              • Unit - Create 1 F for (Owner of F_Hero[FAIL_Times]) at F_Point[2] facing 0.00 degrees
              • Set F_Unit[FAIL_Times] = (Last created unit)
              • Animation - Change F_Unit[FAIL_Times] flying height to F_Height[FAIL_Times] at 0.00
              • Unit - Turn collision for F_Unit[FAIL_Times] Off
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • FAIL Equal to 2
                • Then - Actions
                  • Unit - Create 1 A for (Owner of F_Hero[FAIL_Times]) at F_Point[2] facing 0.00 degrees
                  • Set F_Unit[FAIL_Times] = (Last created unit)
                  • Animation - Change F_Unit[FAIL_Times] flying height to F_Height[FAIL_Times] at 0.00
                  • Unit - Turn collision for F_Unit[FAIL_Times] Off
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • FAIL Equal to 3
                    • Then - Actions
                      • Unit - Create 1 I for (Owner of F_Hero[FAIL_Times]) at F_Point[2] facing 270.00 degrees
                      • Set F_Unit[FAIL_Times] = (Last created unit)
                      • Animation - Change F_Unit[FAIL_Times] flying height to F_Height[FAIL_Times] at 0.00
                      • Unit - Turn collision for F_Unit[FAIL_Times] Off
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • FAIL Equal to 4
                        • Then - Actions
                          • Unit - Create 1 L for (Owner of F_Hero[FAIL_Times]) at F_Point[2] facing 270.00 degrees
                          • Set F_Unit[FAIL_Times] = (Last created unit)
                          • Animation - Change F_Unit[FAIL_Times] flying height to F_Height[FAIL_Times] at 0.00
                          • Unit - Turn collision for F_Unit[FAIL_Times] Off
                        • Else - Actions
          • Custom script: call RemoveLocation(udg_F_Point[2])
          • Set FAIL = (FAIL + 1)
      • Custom script: call RemoveLocation(udg_F_Point[1])
      • Set FAIL = 0


Trigger:
  • FAIL Loop
    • Events
      • Time - Every 0.02 seconds of game time
    • Conditions
    • Actions
      • For each (Integer F) from 1 to FAIL_Times, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • FAIL_Off[F] Equal to True
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • F_Height[F] Less than or equal to 15.00
                • Then - Actions
                  • Set FAIL_Off[F] = False
                  • Set FAIL_Skip = (FAIL_Skip - 1)
                  • Set F_Targ[1] = (Position of F_Unit[F])
                  • Special Effect - Create a special effect at F_Targ[1] using Objects\Spawnmodels\Human\HCancelDeath\HCancelDeath.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Set F_Group[F] = (Units within 300.00 of F_Targ[1] matching (((Owner of (Matching unit)) Not equal to (Owner of F_Hero[F])) and (((Matching unit) is alive) Equal to True)))
                  • Unit Group - Pick every unit in F_Group[F] and do (Actions)
                    • Loop - Actions
                      • Unit - Cause F_Hero[F] to damage (Picked unit), dealing 50.00 damage of attack type Spells and damage type Normal
                  • Custom script: call DestroyGroup(udg_F_Group[udg_F])
                  • Unit - Remove F_Unit[F] from the game
                  • Set F_Unit[F] = No unit
                  • Set F_Hero[F] = No unit
                  • For each (Integer Sheep_Integer) from 1 to 8, do (Actions)
                    • Loop - Actions
                      • Set FAIL_Times = (FAIL_Times + 1)
                      • Set FAIL_Skip = (FAIL_Skip + 1)
                      • Set FAIL_Off[FAIL_Times] = False
                      • Set Sheep_Off[FAIL_Times] = True
                      • Set F_Speed[FAIL_Times] = 10.00
                      • Set F_Distance[FAIL_Times] = (Random real number between 300.00 and 500.00)
                      • Set F_Angle[FAIL_Times] = (Random angle)
                      • Unit - Create 1 Sheep for Neutral Passive at F_Targ[1] facing F_Angle[FAIL_Times] degrees
                      • Set F_Unit[FAIL_Times] = (Last created unit)
                  • Custom script: call RemoveLocation(udg_F_Targ[1])
                  • Set F_Speed[F] = 0.00
                  • Set F_Distance[F] = 0.00
                  • Set F_Height[F] = 0.00
                • Else - Actions
                  • Set F_Distance[F] = (F_Distance[F] - F_Speed[F])
                  • Set F_Point[3] = (Position of F_Unit[F])
                  • Set F_Point[4] = (F_Point[3] offset by F_Speed[F] towards 360.00 degrees)
                  • Unit - Move F_Unit[F] instantly to F_Point[4]
                  • Custom script: call RemoveLocation(udg_F_Point[3])
                  • Custom script: call RemoveLocation(udg_F_Point[4])
                  • Set F_Height[F] = (F_Height[F] - F_Speed[F])
                  • Animation - Change F_Unit[F] flying height to F_Height[F] at 0.00
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Sheep_Off[F] Equal to True
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • F_Distance[F] Less than or equal to 0.00
                    • Then - Actions
                      • Set Sheep_Off[F] = False
                      • Set FAIL_Skip = (FAIL_Skip - 1)
                      • Set F_Targ[1] = (Position of F_Unit[F])
                      • Special Effect - Create a special effect at F_Targ[1] using Objects\Spawnmodels\Other\ToonBoom\ToonBoom.mdl
                      • Special Effect - Destroy (Last created special effect)
                      • Custom script: call RemoveLocation(udg_F_Targ[1])
                      • Unit - Remove F_Unit[F] from the game
                      • Set F_Unit[F] = No unit
                      • Set F_Speed[F] = 0.00
                      • Set F_Distance[F] = 0.00
                      • Set F_Angle[F] = 0.00
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • FAIL_Skip Equal to 0
                        • Then - Actions
                          • Set FAIL_Times = 0
                          • Trigger - Turn off FAIL Loop <gen>
                        • Else - Actions
                    • Else - Actions
                  • Set F_Distance[F] = (F_Distance[F] - F_Speed[F])
                  • Set F_Point[3] = (Position of F_Unit[F])
                  • Set F_Point[4] = (F_Point[3] offset by F_Speed[F] towards F_Angle[F] degrees)
                  • Unit - Move F_Unit[F] instantly to F_Point[4]
                  • Custom script: call RemoveLocation(udg_F_Point[3])
                  • Custom script: call RemoveLocation(udg_F_Point[4])
                • Else - Actions
 

Attachments

  • FAIL v1.02.w3x
    20.9 KB · Views: 254

Romek

Super Moderator
Reaction score
963
> Animation - Change F_Unit[F] flying height to F_Height[F] at 1000000000.00
Animation - Change F_Unit[F] flying height to F_Height[F] at 0
Same effect, but cleaner.

I haven't looked at the code, or tested it. But it looks/sounds very humorous. :D
 

Septimus

New Member
Reaction score
58
> Animation - Change F_Unit[F] flying height to F_Height[F] at 1000000000.00
Animation - Change F_Unit[F] flying height to F_Height[F] at 0
Same effect, but cleaner.

I haven't looked at the code, or tested it. But it looks/sounds very humorous. :D

What's the slight difference that make 0 much cleaner?
 

Kenny

Back for now.
Reaction score
202
0.00 is instant, and it just looks better than 1000000000.00.

Also, its amusing, how this spell fails when you cast it near the map bounds, you should look into that. All the letters get bundled up and it looks crap.

Also i think this would look better if the word just "dropped" out of the sky. Instead of coming from the side, make it come from above, and give it a realistic drop rate. It would be much cooler.

The sheep were an interesting touch :p.

EDIT:

I'm not to good with GUI, but can't:

Code:
- Unit - Create 1 L for (Owner of F_Hero[FAIL_Times]) at F_Point[2] facing 270.00 degrees

- Set F_Unit[FAIL_Times] = (Last created unit)

just be:

Code:
- Set F_Unit[FAIL_Times] = Create 1 L for (Owner of F_Hero[FAIL_Times]) at F_Point[2] facing 270.00 degrees

?
 

Septimus

New Member
Reaction score
58
Also, its amusing, how this spell fails when you cast it near the map bounds, you should look into that. All the letters get bundled up and it looks crap.

To answer your question, it was rather simple.

The unit cannot be created at boundary area.

Also i think this would look better if the word just "dropped" out of the sky. Instead of coming from the side, make it come from above, and give it a realistic drop rate. It would be much cooler.

Also, making it drop directly from the sky make it look more plain compare from the side.

And the drop rate speed can be adjust by the user itself. That's it, if you ever read the documentation at all.

The current drop speed was set at slow to follow the theme "FAIL". Like they said, only a FAIL could FAIL to dodge it.

I'm not to good with GUI, but can't:

Yes, it can and it was essential. It was an index system and it was require in order for it to be fully MUI.
 

Kenny

Back for now.
Reaction score
202
To answer your question, it was rather simple.

I didn't ask a question, I was just stating it looks rather ugly, and unprofessional.

Also, making it drop directly from the sky make it look more plain compare from the side.

That may be, but i still think you should do something about the bugs that can occur due to how you coded it.

Yes, it can and it was essential. It was an index system and it was require in order for it to be fully MUI.

What? I just showed you that you can reduce some lines in your code, it shouldn't really influence anything. And if it does, GUI is worse than i thought.
 

Septimus

New Member
Reaction score
58
I didn't ask a question, I was just stating it looks rather ugly, and unprofessional.

That may be, but i still think you should do something about the bugs that can occur due to how you coded it.

There is no right solution to it since the unit cannot be created outside the boundary.

What? I just showed you that you can reduce some lines in your code, it shouldn't really influence anything. And if it does, GUI is worse than i thought.

That is the price it paid when a spells was coded in GUI.
 

AgentPaper

From the depths, I come.
Reaction score
107
I didn't ask a question, I was just stating it looks rather ugly, and unprofessional.

It would take far more extra code to fix the problem than it's worth.

What? I just showed you that you can reduce some lines in your code, it shouldn't really influence anything. And if it does, GUI is worse than i thought.

It wouldn't influence anything, because it's impossible. GUI doesn't allow you to create something in the middle of storing that very thing into a variable. (or do anything else for that matter)
 

RMX

New Member
Reaction score
8
Very Lovely Spell :p

I like the spell :p it's EPIC FAIL ! ! !............

Well Triggers seems to be perfect ....

Also about

> Animation - Change F_Unit[F] flying height to F_Height[F] at 1000000000.00
Animation - Change F_Unit[F] flying height to F_Height[F] at 0

Well it's the same it won't effect too much the PC would it :p :p :p :p
 

Romek

Super Moderator
Reaction score
963
Same stuff applies to this spell as with your shitty one (literally).
Would anyone honestly want to import this into their map, and use it?

...

I thought not.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top