• 🏆 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!

[Solved] How to remove Build from Peasant??

Status
Not open for further replies.
Hi, I have an ability on my Peasants that is based on Destroyer form and transforms them into a peasant version that has no buildings to build, but the icon is still there and has no worker classification.

I tried already to remove peon-type classification with triggers when he casts the ability but does not work.
 
Thanks!

Solved.

  • Remove Worker Classification Ghost
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Ability being cast) Equal to Ghost Form (Peasant)
          • (Ability being cast) Equal to Ghost Form (Engineer)
    • Actions
      • -------- to not have an idle worker icon on the screen --------
      • Unit - Remove classification of A peon-type unit from (Triggering unit)
      • Set TempUnit = (Triggering unit)
      • -------- to not have a build ability even if it has no buildings to build --------
      • Custom script: call UnitRemoveAbility(udg_TempUnit, 'AHbu')
 
Level 24
Joined
Jun 26, 2020
Messages
1,852
Thanks!

Solved.

  • Remove Worker Classification Ghost
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Ability being cast) Equal to Ghost Form (Peasant)
          • (Ability being cast) Equal to Ghost Form (Engineer)
    • Actions
      • -------- to not have an idle worker icon on the screen --------
      • Unit - Remove classification of A peon-type unit from (Triggering unit)
      • Set TempUnit = (Triggering unit)
      • -------- to not have a build ability even if it has no buildings to build --------
      • Custom script: call UnitRemoveAbility(udg_TempUnit, 'AHbu')
Question, why do you use a TempUnit instead of just use GetTriggerUnit()?, and why don't you also use it in this function?
  • Unit - Remove classification of A peon-type unit from TempUnit
To reduce the number of functions calls.
 
Status
Not open for further replies.
Top