• 🏆 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] Immunity Tech not working on units

Status
Not open for further replies.
Level 2
Joined
Jul 23, 2017
Messages
8
Hello, I am trying to add a tech for the human race in which to be investigated will grant magical immunity to the peasants, but for some reason does not work. I created a new tech and in the tab of "effect" I selected "Immunity to magic" and added it to the "Tech used" tab of the peasant. I have tried many ways but none works. How can I do so that through this investigation the peasants possess magical immunity? If possible without skills/abilities, since I want to do it with tech upgrade. Sorry for my bad english, I'm desperate.
 
Level 11
Joined
Jun 2, 2004
Messages
849
Well you give them an ability that grants spell immunity, and give that ability a techtree requirement for your upgrade. Before the upgrade is researched the spell immunity ability will be disabled and won't grant immunity.
 
Level 2
Joined
Jul 23, 2017
Messages
8
Well you give them an ability that grants spell immunity, and give that ability a techtree requirement for your upgrade. Before the upgrade is researched the spell immunity ability will be disabled and won't grant immunity.
I did that but doesn't work. I don't know how can I do this.
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,192
Possibly the ability is missing the logic to support upgrades. Maybe a triggered approach might be better where by researching the upgrade turns on a trigger that gives every unit of the appropriate type the magic immunity ability upon creation as well as giving all existing units of appropriate type such ability.
 
Level 2
Joined
Jul 23, 2017
Messages
8
Possibly the ability is missing the logic to support upgrades. Maybe a triggered approach might be better where by researching the upgrade turns on a trigger that gives every unit of the appropriate type the magic immunity ability upon creation as well as giving all existing units of appropriate type such ability.
I did something similar to that, but I couldn't find a trigger that enables/disables/set immunity.
 
Level 2
Joined
Jul 23, 2017
Messages
8
Add the immunity ability to the unit like any other ability and make the immunity ability permanent. If the ability supports being added to units then it will work. Making it permanent is so that it does not get lost during unit morphs.
I tried recently, seems that peasants have the ability of immunity "learned", while the same ability is showing the tech-upgrade requirement. I mean, with or without investigating the tech, the peasants have immunity anyway. I need that peasants learn immunity by tech. This is hell for me.
 
Level 2
Joined
Jul 23, 2017
Messages
8
Like I said, try adding the ability to the peasants by trigger after researching the tech. The peasants start without the ability, but after the technology is reached the ability is added to them by triggers.
Well I tried this (I'm very noob with triggers): I did a trigger that picks a unity group of type peasant (action) and DO (add ability - "Immunity"), with the condition: Something related with Tech-Type (researched) and selected Immunity. Still doesn't work. Sorry for my trash english xD
 
Level 21
Joined
Dec 4, 2007
Messages
1,478
Don't forget to apply the upgrade to post-research trained peasants.
Hell let me help you out real quick.

P.S: normally the manipulation of object editor data would suffice, but in some cases you are required to work around hardcoded limitations of the editor.
 

Attachments

  • Spellimmune tech.w3x
    13.6 KB · Views: 43
Level 2
Joined
Jul 23, 2017
Messages
8
Don't forget to apply the upgrade to post-research trained peasants.
Hell let me help you out real quick.

P.S: normally the manipulation of object editor data would suffice, but in some cases you are required to work around hardcoded limitations of the editor.
Thanks, you saved me hours of stress. I didn't think that it would be a little hard to do it. Post Solved.
 
Level 2
Joined
Jul 23, 2017
Messages
8
Thanks, you saved me hours of stress. I didn't think that it would be a little hard to do it. Post Solved.
It was like A]mun's trigger but I forgot to add a reasonable event and the helpful script code. Thanks to you I did the logical part :D. Post Solved
 
Status
Not open for further replies.
Top