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

Mount Hypogrif / Pick up Archer

Status
Not open for further replies.
Level 12
Joined
Nov 3, 2013
Messages
989
I've got this idea that whisps would have an ability which allows them to merge with other units to empower them.

However I intend it to be akin more towards metamorphosis where the unit transform into a stronger being for a timed period and then reverts, so it should have a duration.

And also it should consume the whisp, so it would be for defensive purposes early and a way to free up food later on.

Now I'm already fiddling with mount/pick up and not giving the result any "dismount" equivalent but the problem with duration remains.
 
Level 12
Joined
Nov 3, 2013
Messages
989
The idea is that the whisp dies permanently but the effect is only temporary, to represent that it's life force is being drained or w/e.

As it is now, both the units need pick up / mount to be compatible, which is taking up an awful amount of command button slots.

I'd prefer not to trigger the thing since they have to move to each other for the fuse and so but if nobody comes up with some better Idea i'll just give the whisp channel and give the target metamorphosis via triggers

Edit: Actually I think I'll give the whisp possesion and spawn a dummy unit with a modified polymorph/hex.
 
Level 12
Joined
Nov 3, 2013
Messages
989
If it's only the visuals of the command buttons that is your concern you can just put the mount/pick up in a hidden spellbook.

The advantage with mount/pick up is the target - unit type field but I think I can have the possession limited to player units, organic, non hero & self.

I don't really know if possession even work on your own units though...
 
Level 12
Joined
Nov 3, 2013
Messages
989
Damn, seems like you can't allow possession to target friendly units...

So now it's trigger vs mount/ pick up & hidden spell book

I think mount/ pick up is better for CPU player but trigger is probably cleaner...
 
Level 12
Joined
Nov 3, 2013
Messages
989
OK so an update here;
  • Untitled Trigger 005
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Empower Satyr
    • Actions
      • Set Temp_Unit[0] = (Triggering unit)
      • Set Temp_Unit[1] = (Target unit of ability being cast)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of Temp_Unit[1]) Equal to Satyr
        • Then - Actions
          • Unit - Add Empower Satyr (Corrupted Whisp) to Temp_Unit[0]
          • Unit - Add Empower Satyr (Satyr) to Temp_Unit[1]
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of Temp_Unit[1]) Equal to Satyr Trickster
            • Then - Actions
              • Unit - Add Empower Satyr Trickster (Corrupted Whisp) to Temp_Unit[0]
              • Unit - Add Empower Satyr Trickster (Satyr) to Temp_Unit[1]
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Unit-type of Temp_Unit[1]) Equal to Satyr Shadowdancer
                • Then - Actions
                  • Unit - Add Empower Satyr Shadowdancer (Corrupted Whisp) to Temp_Unit[0]
                  • Unit - Add Empower Satyr Shadowdancer (Satyr) to Temp_Unit[1]
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Unit-type of Temp_Unit[1]) Equal to Satyr Soulstealer
                    • Then - Actions
                      • Unit - Add Empower Satyr Soulstealer (Corrupted Whisp) to Temp_Unit[0]
                      • Unit - Add Empower Satyr Soulstealer (Satyr) to Temp_Unit[1]
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Unit-type of Temp_Unit[1]) Equal to Satyr Hellcaller
                        • Then - Actions
                          • Unit - Add Empower Satyr Hellcaller (Corrupted Whisp) to Temp_Unit[0]
                          • Unit - Add Empower Satyr Hellcaller (Satyr) to Temp_Unit[1]
                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Unit-type of Temp_Unit[1]) Equal to Vile Temptress
                            • Then - Actions
                              • Unit - Add Empower Vile Temptress (Corrupted Whisp) to Temp_Unit[0]
                              • Unit - Add Empower Vile Temptress (Satyr) to Temp_Unit[1]
                            • Else - Actions
      • Unit - Turn collision for Temp_Unit[0] Off
      • Unit - Make Temp_Unit[0] Invulnerable
      • Custom script: call UnitAddAbility(udg_Temp_Unit[0], 'Aloc')
      • Unit - Order Temp_Unit[0] to Night Elf Hippogryph - Pick Up Archer
The game didn't recognize that the units had the ability inside the spellbooks.

Now it's working by having the whisp cast a dummy channel on the desired target, give them the appropriate ability and issueing the order instead.

The problem now is that if multiple whisps are in selection they all will cast the ability and get locust & invulnerability even though only one of them will be used for the merge.

Now I'm thinking I'll have to use dynamic indexing and an arrayed boolean or something to make it work with the trigger I've got now.

However I think it's possible that I've overlooked something and there would be a better/smoother way.
 
Level 12
Joined
Nov 3, 2013
Messages
989
Ok so I've settled with the two following triggers

  • Satyr Empower Satyr
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Empower Satyr
    • Actions
      • Set Emp_Int_Index = (Emp_Int_Index + 1)
      • For each (Integer IntegerVar) from 1 to Emp_Int_Index, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Emp_Unit_Target[IntegerVar] Equal to (Target unit of ability being cast)
            • Then - Actions
              • Set Emp_Int_Index = (Emp_Int_Index - 1)
              • Skip remaining actions
            • Else - Actions
      • Set Emp_Unit_Caster[Emp_Int_Index] = (Triggering unit)
      • Set Emp_Unit_Target[Emp_Int_Index] = (Target unit of ability being cast)
      • Set Emp_UnitType_Target[Emp_Int_Index] = (Unit-type of Emp_Unit_Target[Emp_Int_Index])
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of Emp_Unit_Target[Emp_Int_Index]) Equal to Satyr
        • Then - Actions
          • Unit - Add Empower Satyr (Corrupted Whisp) to Emp_Unit_Caster[Emp_Int_Index]
          • Unit - Add Empower Satyr (Satyr) to Emp_Unit_Target[Emp_Int_Index]
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of Emp_Unit_Target[Emp_Int_Index]) Equal to Satyr Trickster
            • Then - Actions
              • Unit - Add Empower Satyr Trickster (Corrupted Whisp) to Emp_Unit_Caster[Emp_Int_Index]
              • Unit - Add Empower Satyr Trickster (Satyr) to Emp_Unit_Target[Emp_Int_Index]
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Unit-type of Emp_Unit_Target[Emp_Int_Index]) Equal to Satyr Shadowdancer
                • Then - Actions
                  • Unit - Add Empower Satyr Shadowdancer (Corrupted Whisp) to Emp_Unit_Caster[Emp_Int_Index]
                  • Unit - Add Empower Satyr Shadowdancer (Satyr) to Emp_Unit_Target[Emp_Int_Index]
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Unit-type of Emp_Unit_Target[Emp_Int_Index]) Equal to Satyr Soulstealer
                    • Then - Actions
                      • Unit - Add Empower Satyr Soulstealer (Corrupted Whisp) to Emp_Unit_Caster[Emp_Int_Index]
                      • Unit - Add Empower Satyr Soulstealer (Satyr) to Emp_Unit_Target[Emp_Int_Index]
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Unit-type of Emp_Unit_Target[Emp_Int_Index]) Equal to Satyr Hellcaller
                        • Then - Actions
                          • Unit - Add Empower Satyr Hellcaller (Corrupted Whisp) to Emp_Unit_Caster[Emp_Int_Index]
                          • Unit - Add Empower Satyr Hellcaller (Satyr) to Emp_Unit_Target[Emp_Int_Index]
                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Unit-type of Emp_Unit_Target[Emp_Int_Index]) Equal to Vile Temptress
                            • Then - Actions
                              • Unit - Add Empower Vile Temptress (Corrupted Whisp) to Emp_Unit_Caster[Emp_Int_Index]
                              • Unit - Add Empower Vile Temptress (Satyr) to Emp_Unit_Target[Emp_Int_Index]
                            • Else - Actions
      • Unit - Turn collision for Emp_Unit_Caster[Emp_Int_Index] Off
      • Unit - Make Emp_Unit_Caster[Emp_Int_Index] Invulnerable
      • Custom script: call UnitAddAbility(udg_Emp_Unit_Caster[udg_Emp_Int_Index], 'Aloc')
      • Unit - Order Emp_Unit_Caster[Emp_Int_Index] to Night Elf Hippogryph - Pick Up Archer
  • Satyr Empower Satyr 2
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Empower Satyr (Corrupted Whisp)
      • (Ability being cast) Equal to Empower Satyr Trickster (Corrupted Whisp)
      • (Ability being cast) Equal to Empower Satyr Shadowdancer (Corrupted Whisp)
      • (Ability being cast) Equal to Empower Satyr Soulstealer (Corrupted Whisp)
      • (Ability being cast) Equal to Empower Vile Temptress (Corrupted Whisp)
      • (Ability being cast) Equal to Empower Satyr Hellcaller (Corrupted Whisp)
    • Actions
      • Game - Display to (All players) the text: ability swag
      • For each (Integer IntegerVar) from 1 to Emp_Int_Index, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Triggering unit) Equal to Emp_Unit_Caster[IntegerVar]
            • Then - Actions
              • Game - Display to (All players) the text: Real swag
            • Else - Actions
However there's a new problem. The resulting unit doesn't count as either Emp_UnitType_Target or Caster anymore. (unlike when you replace/transform)

How do I make the variables point to the new unit?
 
Level 12
Joined
Nov 3, 2013
Messages
989
Try instead of Skip Remaining Actions:
  • Custom script: exitwhen true
This will just exit the loop instead of skipping the rest of the actions.

Thanks for the tip, although the whole point is to not only exit loop but to skip all the remaning actions, it's to prevent more than one whisp to use the merge ability on the same unit.

Edit: It will be useful for the second trigger though, thanks.
 
Level 12
Joined
Nov 3, 2013
Messages
989
Ah yeah I see the problem. The indexing was a bit confusing but I think I got it now. I'll put on mah thinken cap.

Edit:
I am assuming the first trigger works.

Sorry for being weird.

The first trigger works and the first text message is being displayed in the 2nd trigger. But after the caster and target unit merge

Emp_Unit_Caster[integerVar] and Emp_Unit_Target[integerVar]

give "no unit" or "null" or w/e

so it doesn't continue

Edit: I've been thinking that I might need a new event to catch this but there doesn't seem to be anything for "two units become one" or anything similar...
 
Level 12
Joined
Nov 3, 2013
Messages
989
Edit2:
This is perhaps a long shot. Can you change the conditions to Unit type of Emp_Unit_Caster[IntegerVar] Equal to unit type of no unit?

Too bad it didn't work, would've been a pleasant surprise.
 
Level 12
Joined
Nov 3, 2013
Messages
989
Both, they're the same ability but pick up already had the "move to unit" as true so I based the whisps' version on that and mount for the satyrs.

As a note; for it to work both units need the ability with each others unit type as "partner unit" and share the same "final unit"
 
Level 12
Joined
Nov 3, 2013
Messages
989
So could it be that the Satyr is in fact the triggering unit?
Can you make a test text that displays the name of the triggering unit when one of the Empower abilities are started?

I had already done a test earlier

  • Untitled Trigger 001
    • Events
      • Player - Player 3 (Teal) types a chat message containing asd as An exact match
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units currently selected by Player 3 (Teal)) and do (Actions)
        • Loop - Actions
          • For each (Integer IntegerVar) from 1 to Emp_Int_Index, do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Picked unit) Equal to Emp_Unit_Target[IntegerVar]
                • Then - Actions
                  • Game - Display to (All players) the text: Swag Satyr
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Picked unit) Equal to Emp_Unit_Caster[IntegerVar]
                    • Then - Actions
                      • Game - Display to (All players) the text: Swag Whisp
                    • Else - Actions
If used while the whisp moves to the satyr it displays the message.

If used after they've merged it doesn't display any message.

I'm thinking that it seems to create a new unit so I'm gonna try with some more events, also if you think it can help I could attach the map if you want to get a better look.

Edit: It worked with Entering unit, guess i'll just have to make a 3rd trigger. Should have guessed it were creating a completely new unit instead of replacing existing ones u.u

Now it just got a bit more weird than it already were too :3
 
Level 12
Joined
Nov 3, 2013
Messages
989
Ok so I noticed I had forgot to put an "OR multiple conditions" in the old 2nd trigger, it still didn't work since the result is a completely new unit and require the event "unit enters region" so I guess I got lucky in my streak of bad luck
 
Level 12
Joined
Nov 3, 2013
Messages
989
Right now I don't even know what the **** i'm doing...

The entering unit works but now I don't know how to use the index since it were already very weird without periodic event it got even weirder now.

Then I got this clever idea, I thought it was clever, but it doesn't seem to work;

  • Satyr Empower Satyr 2
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Triggering unit)) Equal to Empowered Satyr
          • (Unit-type of (Triggering unit)) Equal to Empowered Satyr Trickster
          • (Unit-type of (Triggering unit)) Equal to Empowered Satyr Shadowdancer
          • (Unit-type of (Triggering unit)) Equal to Empowered Satyr Soulstealer
          • (Unit-type of (Triggering unit)) Equal to Empowered Satyr Hellcaller
          • (Unit-type of (Triggering unit)) Equal to Empowered Vile Temptress
    • Actions
      • Custom script: local unit udg_tempUnit = GetTriggerUnit()
      • Custom script: local unit udg_tempUnitType = udg_Emp_UnitType_Target[udg_Emp_Int_Index]
      • Unit - Add a 27.00 second Animate Dead expiration timer to tempUnit
      • Wait 26.00 seconds
      • Unit - Replace tempUnit with a tempUnitType using The old unit's relative life and mana
It doesn't seem to like

Custom script: local unitType udg_tempUnitType = udg_Emp_UnitType_Target[udg_Emp_Int_Index]
 
Level 12
Joined
Nov 3, 2013
Messages
989
I don't know what I'm doing >_<

So what I'm supposed to be doing is the revert process, they are supposed to get a duration timer like with summons and metamorphosis.

Since I don't know how I'm supposed to use the index with the new trigger I thought I could use local variables with the same name as global ones.

Problem is I still need to get the unit type, so I tried to get it from the first trigger but that custom script was probably retarded or something because it said it were trying to make an integer variable into a unit variable.

Then I had my 2nd great idea - to make a local string variable of the unit name and then use sub string for unit type (they all have the same name but "empowered ")

But apparently I know close to nothing about how to use local variables in custom script.

  • Satyr Empower Satyr 2
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Triggering unit)) Equal to Empowered Satyr
          • (Unit-type of (Triggering unit)) Equal to Empowered Satyr Trickster
          • (Unit-type of (Triggering unit)) Equal to Empowered Satyr Shadowdancer
          • (Unit-type of (Triggering unit)) Equal to Empowered Satyr Soulstealer
          • (Unit-type of (Triggering unit)) Equal to Empowered Satyr Hellcaller
          • (Unit-type of (Triggering unit)) Equal to Empowered Vile Temptress
    • Actions
      • Custom script: local unit udg_tempUnit = GetTriggerUnit()
      • Set unitTypeString = (Name of tempUnit)
      • Set tempInt = (Length of unitTypeString)
      • Custom script: local string udg_unitTypeString = udg_unitTypeString
      • Custom script: local int udg_tempInt = udg_tempInt
      • Unit - Add a 24.00 second Animate Dead expiration timer to tempUnit
      • Wait 26.00 seconds
      • Unit - Replace tempUnit with a (Unit-type((Substring(unitTypeString, 11, tempInt)))) using The old unit's relative life and mana
 
Level 23
Joined
Oct 20, 2012
Messages
3,075
  • Satyr Empower Satyr 2
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Triggering unit)) Equal to Empowered Satyr
          • (Unit-type of (Triggering unit)) Equal to Empowered Satyr Trickster
          • (Unit-type of (Triggering unit)) Equal to Empowered Satyr Shadowdancer
          • (Unit-type of (Triggering unit)) Equal to Empowered Satyr Soulstealer
          • (Unit-type of (Triggering unit)) Equal to Empowered Satyr Hellcaller
          • (Unit-type of (Triggering unit)) Equal to Empowered Vile Temptress
    • Actions
      • Custom script: local unit udg_tempUnit = GetTriggerUnit()
      • Set unitTypeString = (Name of tempUnit)
      • Set tempInt = (Length of unitTypeString)
      • Custom script: local string udg_unitTypeString = udg_unitTypeString
      • Custom script: local int udg_tempInt = udg_tempInt
      • Unit - Add a 24.00 second Animate Dead expiration timer to tempUnit
      • Wait 26.00 seconds
      • Unit - Replace tempUnit with a (Unit-type((Substring(unitTypeString, 11, tempInt)))) using The old unit's relative life and mana

Did a quick test based on your trigger. It should work but you shouldn't wait 2 seconds longer since you're replacing a dead unit with a new one with relative life and mana so the new one would be dead too.

  • Empowere Test
    • Events
      • Unit - A unit enters (Entire map)
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Triggering unit)) Equal to Empowered Peasant
          • (Unit-type of (Triggering unit)) Equal to Empowered Footman
          • (Unit-type of (Triggering unit)) Equal to Empowered Knight
    • Actions
      • Custom script: local unit udg_tempunit = GetTriggerUnit()
      • Custom script: local string udg_utype_String = GetUnitName(udg_tempunit)
      • Custom script: local integer udg_tempint = StringLength(udg_utype_String)
      • Unit - Add a 25.00 second Generic expiration timer to tempunit
      • Wait 24.00 seconds
      • Unit - Replace tempunit with a (Unit-type((Substring(utype_String, 11, tempint)))) using The old unit's relative life and mana
EDIT: Didn't see ceday's post.
 
Level 12
Joined
Nov 3, 2013
Messages
989
It still doesn't work. Says it cannot convert unittype to integer, although the only integer in the whole trigger is the index.

Because i didn't understand why or how to fix it i tried to use substring for unit type instead but my custom scripts just doesn't work.

The wait time and expirition time is reveresed in my map, just forgot to change it here, sorry

Edit: As for the sub string attempt, the error im getting is "locals are only supported at the top of the function"

Edit 2: Thanks greenix, since i didn't know the getter thingies I thought I could just use global variables and make the local ones the same, guess not.
 
Level 12
Joined
Feb 22, 2010
Messages
1,115
Hmm try this, tempUnitType is unit type variable from variable editor.
  • Actions
    • Custom script: local integer udg_tempUnitType = udg_Emp_UnitType_Target[udg_Emp_Int_Index]
    • Unit - Add a 27.00 second Animate Dead expiration timer to (Triggering Unit)
    • Wait 26.00 seconds
    • Unit - Replace (Triggering Unit) with a tempUnitType using The old unit's relative life and mana
 
Level 12
Joined
Nov 3, 2013
Messages
989
I don't get it, it should be working but instead of being replaced it just get removed...

  • Satyr Empower Satyr 2
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Triggering unit)) Equal to Empowered Satyr
          • (Unit-type of (Triggering unit)) Equal to Empowered Satyr Trickster
          • (Unit-type of (Triggering unit)) Equal to Empowered Satyr Shadowdancer
          • (Unit-type of (Triggering unit)) Equal to Empowered Satyr Soulstealer
          • (Unit-type of (Triggering unit)) Equal to Empowered Satyr Hellcaller
          • (Unit-type of (Triggering unit)) Equal to Empowered Vile Temptress
    • Actions
      • -------- Triggering Unit --------
      • Custom script: local unit udg_tempUnit = GetTriggerUnit()
      • -------- Name of triggering unit --------
      • Custom script: local string udg_unitTypeString = GetUnitName(udg_tempUnit)
      • -------- String lenght of name of triggering unit --------
      • Custom script: local integer udg_tempInt = StringLength(udg_unitTypeString)
      • -------- expiration timer for visual --------
      • Unit - Add a 26.00 second Animate Dead expiration timer to tempUnit
      • -------- short duration to test faster --------
      • Wait 5.00 seconds
      • -------- revert new unit back to old unit type --------
      • Unit - Replace tempUnit with a (Unit-type((Substring(unitTypeString, 11, tempInt)))) using The old unit's relative life and mana
Also, Ceday it remoevd the error but it still didn't give expiration timer or replace unit afterwards
 
Level 12
Joined
Nov 3, 2013
Messages
989
I think the problem is that the "entering" unit is a unit morph of two other units because it works when I use on normal units.

What I'm doing now is to remove the unit and create a new one with the old unit type.
 
Status
Not open for further replies.
Top