• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Conversion Ability

Status
Not open for further replies.
Level 11
Joined
Apr 9, 2013
Messages
710
Hello there people of the Hiveworkshop this is the first time I ever make something like this and if I did something wrong please inform me as fast as possible so I can try and correct it, at any rate let me explain you my troubles.
I shall get right to the point:
Basically I am trying to make an ability like in "Empire Earth/Age of Empires" that works similar if not identical to the Priest in the said game. If you are not familiar with the game mechanic or the art of "wololo" it works like this:
Priests Have ability called "Conversion" it is a Channeling spell that lasts around 10 seconds which ends up making the targeted unit become the same team as the caster. (Mind Control in Red Alert 2)
Now my "dear" friend Teemu has managed to make such ability to work "decently" (note: he didn't make it channeling), however there are other aspects you must know. The Church from which you train the Priest has an "aura" that makes it impossible to convert units. (note: we tried to use Auras but it tends to lag {as we quite have many Auras in the game} quite heavily and it isn't very reliable from what we tested, the way we made it was also quite crude, Unit attacks unit, "5" seconds passed, the attacked unit gets converted, game checks if unit has aura if unit has aura then conversion does not happen, roses are red etc..)
How I imagined it would work is quite "simple" really, we take an auto-cast'able ability,(we use faerie fire as it gives you vision of the unit as well) and give it to a Priest, the priest then is supposed to cast it on to an enemy (even friendly) target to afterwards get a buff (call it Conversion) that the triggers will have to count to 10 then check if the buff is still present and after that convert the unit to the caster, the way we thought to counter was by dispelling it (adding modified abolish magic to Church that will dispel the buff or by priest dispel) therefore cancelling the Conversion: Unit has buff, trigger counts seconds if buff is not there for the 10 seconds then the unit will remain unharmed.
This is a rough explanation on how I could make the ability work in Warcraft, obviously if you have other suggestion and ideas on how this could work, they are more than welcomed.
(Note this is quite an important "feature" in our map and we can't ignore it or make a lousy imitation, though anything would help that doesn't lag the game)
If I have made any spelling or grammatical errors or if you simply do not understand what I said please feel free to ask.
I hope that I gave you enough material to work an Idea on your mind, I thought of giving you a screenshot of the trigger or make a test map for you to experiment on. One of these will be here for sure though perhaps not for the initial release of the post.
For ever longing this post even more I hope you are kind enough to help if not then a simple response will be good, therefore I appreciate the time you took to read my post.
 

Ardenian

A

Ardenian

Why not simply create a channelling ability, index a unit starting channelling and a corresponding counter as well as the target unit.
Set up a loop to increase the counter and once the counter reaches a certain value, change owner.
In another trigger you check whether the casting unit interrupts its channelling.

To avoid the thing with Church, in case I got it right, you could also add a hidden dummy ability doing nothing to related units.
 
This doesn't seem too complicated to make - if you want this to be based of the Priest's normal attack, use a DDS. Damage Engine is my go to as it's rather brilliant. Otherwise, base your ability off Channel and give it a Follow Through Time of 300 seconds or somthing. use starts the effect of an ability, check for the ability, then add the priest to a unit group. The triggers below show a slightly different method from what u described - it uses an internal timer and checks if the unit has the Church aura buff - if it does, suspend the internal timer. This is why the channel has a long follow through time. Adding the dispellable conversion buff is easily added to the triggers, I was just a bit lazy :p

I haven't tested those btw. Also, you need a unit indexer.

  • Conversion
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Conversion
    • Actions
      • Set ID = (Custom value of (Triggering unit))
      • Set Target[ID] = (Target unit of ability being cast)
      • Unit Group - Add (Triggering unit) to ConversionGroup
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Conversion Loop is on) Equal to False
        • Then - Actions
          • Trigger - Turn on Conversion Loop
        • Else - Actions
  • Conversion Loop
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in ConversionGroup and do (Actions)
        • Loop - Actions
          • Set Priest = (Picked unit)
          • Set ID = (Custom value of Priest)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • (Priest is alive) Equal to True
                  • (Target[ID] is alive) Equal to True
                  • (Current order of Priest) Equal to (Order(conversion-order-here))
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Target[ID] has buff Church Aura) Equal to False
                • Then - Actions
                  • Set ConversionInterval[ID] = (Conversion[ID] + 1)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ConversionInterval[ID] Equal to 100
                    • Then - Actions
                      • Set ConversionInterval[ID] = 0
                      • Unit - Order Priest to Stop
                      • -------- This is where you would add the dispellable conversion buff if you want to do it that way. Dummy caster, dummy spell, etc --------
                      • -------- Keep in mind, you'll need a separate timer for that to keep track of when the buff ends --------
                      • Unit - Change ownership of Target[ID] to (Owner of Priest) and Change color
                      • Unit Group - Remove Beamer from ConversionGroup
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (ConversionGroup is empty) Equal to True
                        • Then - Actions
                          • Trigger - Turn off (This trigger)
                        • Else - Actions
                    • Else - Actions
                • Else - Actions
            • Else - Actions
              • Unit Group - Remove Priest from ConversionGroup
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (ConversionGroup is empty) Equal to True
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
 
Level 11
Joined
Apr 9, 2013
Messages
710
Thank you all for your suggestions, I will try to see if they work and suit my plans as I couldn't get to work this few days.
Note: The ability needs to be auto cast.
EDIT: The Problem basing it on "attack" is that they will tend to only focus one target, instead of each one attacking individually, having an ability fixes this as units that have buff will not be targeted until the buff is gone.
 
Last edited:
Level 24
Joined
Aug 1, 2013
Messages
4,657
-_-
Finishes casting an ability is ran when the unit has ended the backswing duration.
When you order your unit to walk after the spell effect (when it takes mana and puts it on cooldown) then you will never have a finished casting event.

All you want is an ability with 10 seconds casting time.
Why is that so hard?

Base your spell of channel and set channeling time to 10.
Then use Starts the effect of an ability to convert the unit.
 
-_-
Finishes casting an ability is ran when the unit has ended the backswing duration.
When you order your unit to walk after the spell effect (when it takes mana and puts it on cooldown) then you will never have a finished casting event.

All you want is an ability with 10 seconds casting time.
Why is that so hard?

Base your spell of channel and set channeling time to 10.
Then use Starts the effect of an ability to convert the unit.

Oh, well that explains a lot. Finishes casting an ability still unreliable though.

When you say channelling time, do you mean Follow through time or Casting time?
 
Level 13
Joined
Jun 20, 2014
Messages
479
Ya u cannot use target point of the ability and targer unit of the ability using finishes casting event as the casting is complete. I think thats the logic behind it or its what ppl refer as bug.

on topic: weitlol has the easiest approach and should work properly
 
Level 11
Joined
Apr 9, 2013
Messages
710
Many thanks again for all the suggestions.
I managed to make it work this way (While it isn't the wanting product it's still good for now)
Priest attacks target, targets gets buff, if buff present for 5 seconds then it converts if not then nothing happen, You can even dispel the thing.
The problem by making it "attack" is that instead of spreading the damage it focuses only on some units kinda "overkill", which when getting attacked by 100 soldiers and your 20 priests only manage to convert 10 it's quite embarassing.
This is why I think an ability will work better, as it checks if the buff is on the unit and if it is it won't cast it again atleast until the buff running out.
I tried basing it on an auto cast ability like faerie fire and even searing arrow but can't get it to work.
Could you kind sirs help me once again?
 
Level 13
Joined
Jun 20, 2014
Messages
479
event
unit is attacked
condition
<your condition>
event
set point = position of attacked unit
set unitGroup = units within 200 of (point)
pick units in (unitGroup)
//make a dummy then buff all the units in the group

there some psudocode that should work if u can already track a single unit
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
Why is noone using his brain?

HnFB5PE.png


  • Convert
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Convert (Monk)
    • Actions
      • Unit - Change ownership of (Target unit of ability being cast) to (Owner of (Triggering unit)) and Change color
To use "smart" (right click) to cast the spell, you create another trigger that catches the "smart" order and order the unit to cast Convert instead. (This has to be done using a 0s timer or pause unit/turn off trigger.)
 
Status
Not open for further replies.
Top