• 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] How to make ai use death pact? + rep

Status
Not open for further replies.
Level 19
Joined
Feb 15, 2008
Messages
2,184
How to make ai use death pact? + rep [SOLVED]

  • Meat Hook
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • Set Temp_Unit = (Random unit from AI_Group)
      • Unit - Order TempUnit to Orc Tauren Chieftain - Shockwave (Random point in Arena <gen>)
I dont find death pact in the abilitys. how do i make this? + rep ofc.
 
Last edited:
Level 19
Joined
Feb 15, 2008
Messages
2,184
ok thnx + rep.

But is this leak free or do i need set variable?

  • Meat Hook
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • Set Temp_Unit = (Random unit from AI_Group)
      • Unit - Order TempUnit to Undead Death Knight - Death Pact (Random unit from (Units in Arena <gen>))
it dident work :/

I want so it randomly use it for enemy in arena area.
 
Level 19
Joined
Feb 15, 2008
Messages
2,184
  • Meat Hook
    • Events
      • Time - Every 7.00 seconds of game time
    • Conditions
    • Actions
      • Set loc = (Random point in Arena Center <gen>)
      • Set Temp_Unit = (Random unit from AI_Group)
      • Unit - Order TempUnit to Undead Death Knight - Death Pact (Random unit from (Units in Arena Center <gen>))
i made this so far. what should i make more? and change?
 
Level 30
Joined
Nov 29, 2012
Messages
6,637
  • Meat Hook
    • Events
      • Time - Every 7.00 seconds of game time
    • Conditions
    • Actions
      • Set loc = (Random point in Arena Center <gen>)
      • Set Temp_Unit = (Random unit from AI_Group)
      • Unit - Order TempUnit to Undead Death Knight - Death Pact (Random unit from (Units in Arena Center <gen>))
i made this so far. what should i make more? and change?

Well, if that is all your trigger then you forgot to add the units on the AI_Group, you need to add something to it for the AI_Group to take effect as far as I know.
 
Level 13
Joined
Mar 29, 2012
Messages
542
- The loc variable is useless
- Don't forget to store (Units in Arena Center <gen>) in a variable with type group and destroy it with "call DestroyGroup(group)"
- As hell_master said, you are picking a random unit from AI_Group, if everything seems alright, that means the AI_Group is empty
 
Level 19
Joined
Feb 15, 2008
Messages
2,184
the ai group havent been set up can you pls help me show a little minimap or something?

and also can you show me how the trigger should look like. Mybe add a simple little minimap so i can check and thnx for help so far.

and its only for computer aswell.
 
Level 13
Joined
Mar 29, 2012
Messages
542
perhaps its because this:
  • Set Temp_Unit = (Random unit from AI_Group)
  • Unit - Order TempUnit to Undead Death Knight - Death Pact (Random unit from (Units in Arena Center <gen>))
You did set the "Temp_Unit" variable but used "TempUnit" variable (it's different), see?

  • Meat Hook
    • Events
      • Time - Every 7.00 seconds of game time
    • Conditions
    • Actions
      • Set Temp_Unit = (Random unit from AI_Group)
      • Unit - Add Death Pact to Temp_Unit
      • Set Temp_Group = (Units in Arena Center <gen>)
      • Unit - Order Temp_Unit to Undead Death Knight - Death Pact (Random unit from Temp_Group)
      • Custom script: call DestroyGroup(udg_Temp_Group)
 
Level 19
Joined
Feb 15, 2008
Messages
2,184
ok thnx bud.

  • Use Death Pact
    • Events
      • Time - Every 2.00 seconds of game time
    • Conditions
    • Actions
      • Set Temp_Unit = (Random unit from AI_Group)
      • Set Temp_Group = (Units in Arena Center <gen>)
      • Unit - Order Temp_Unit to Undead Death Knight - Death Pact (Random unit from Temp_Group)
      • Custom script: call DestroyGroup(udg_Temp_Group)
i made this trigger and they still not use the spell :/ strange...
 
ok thnx bud.

  • Use Death Pact
    • Events
      • Time - Every 2.00 seconds of game time
    • Conditions
    • Actions
      • Set Temp_Unit = (Random unit from AI_Group)
      • Set Temp_Group = (Units in Arena Center <gen>)
      • Unit - Order Temp_Unit to Undead Death Knight - Death Pact (Random unit from Temp_Group)
      • Custom script: call DestroyGroup(udg_Temp_Group)
i made this trigger and they still not use the spell :/ strange...

The above still leaks. You need to do this to clear all the leaks.

  • Use Death Pact
    • Events
      • Time - Every 2.00 seconds of game time
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Set Temp_Unit = (Random unit from AI_Group)
      • Set Temp_Group = (Units in Arena Center <gen>)
      • Custom script: set bj_wantDestroyGroup = true
      • Unit - Order Temp_Unit to Undead Death Knight - Death Pact (Random unit from Temp_Group)
      • Custom script: call DestroyGroup(udg_Temp_Group)
If it still isn't working check to see if the unit groups are empty and display a message if they are.
 
Level 19
Joined
Feb 15, 2008
Messages
2,184
Also both your set bj_wantDestroyGroup = true's are unnecessary.
The first one is destroying AI_Group after a unit has been chosen from it (bad, it means it'll only work once before the AI_Group is gone!).
The second is unnecessary because of the call DestroyGroup(udg_Temp_Group) at the end. You should only use one or the other.

how come?

also the AI doesent work.

  • SetupAIGroup
  • Collapse Events
  • Map initialization
  • Conditions
  • Collapse Actions
  • Unit Group - Add YourUnitHere! to AI_Group
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
The AI does not use death pact as it is a move that only very experienced players can even consider using with any success. Sacrificing one unit for another is not an easy to make tactical decision. Since the AI in WC3 is kind of poor, it was not designed to make such decisions so was not programed to ever cast the ability. Same applies for the Lich's equivalent.
 
Level 13
Joined
Mar 24, 2013
Messages
1,105
it still doesent work they dont use the spell. and Base ID is some unsubmerge i dont know why. and also unit or target point.

You're using channel? If so unsubmerge cannot be the baseorderid because the original submerge ability is an instant cast with no target ...

How can you cast death pact on a point? iirc you sacrifice a unit to get its hp back....

Look at abilities that are typical for unit only targeting...such as frost nova and use that as the base order id, or just use the regular death pact ability.
 
Level 19
Joined
Feb 15, 2008
Messages
2,184
I tested to use death pact as AI spell and they do not still throw this blade. And i dont know how to fix this. can some one just have a look at the map and fix?

so now finaly fixed it on my own. thnx anyway.
 
Last edited:
Status
Not open for further replies.
Top