• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Help with a trigger

Status
Not open for further replies.
Level 9
Joined
Dec 12, 2021
Messages
72
I need your help please to solve the problem with a trigger, what happens is that I take a trigger from another map where it works and pass it to mine where it no longer works (it can be said that the animations and the ability work but they do not cause damage ), maybe it's because I have many variables and triggers in that map, it's just an idea. If anyone knows why it is and if there is a solution I would greatly appreciate it
I enclose the respective maps: - "Isla de la desgracia" is my map where the trigger passes, and "THW.TC14.NightscaleTribe" is the map where the original trigger is.
PDT: An important fact may be that I already tested the trigger on a map without triggers and it works perfectly. And another thing is that the ability belongs to the Giant druid of the naga race.
EDIT: I forgot to mention that the ability is called "Torrent Blast".
 

Attachments

  • (12)IslaDeLaDesgracia.w3x
    11.6 MB · Views: 10
  • THW.TC14.NightscaleTribe.w3x
    13.1 MB · Views: 13
Level 18
Joined
Mar 16, 2008
Messages
721
Ok I just tested on Isla de la Desgracia and Torrent Blast [A03U] seems to work????????

update: rank 1 and 2 work but NOT 3.

  • Torrent Blast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Torrent Blast
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • TorrentB[1] Equal to 0
        • Then - Actions
          • Trigger - Turn on Torrent Blast Loop <gen>
        • Else - Actions
      • Set VariableSet TorrentB[1] = (TorrentB[1] + 1)
      • Set VariableSet TorrentB[2] = (TorrentB[2] + 1)
      • [ADD SOME ACTION FOR LEVEL 3 HERE???????????]
      • Set VariableSet TorrentB_Off[TorrentB[2]] = False
      • Set VariableSet TorrentB_Caster[TorrentB[2]] = (Casting unit)
      • Set VariableSet TorrentB_Level[TorrentB[2]] = (Level of Torrent Blast for TorrentB_Caster[TorrentB[2]])
      • Set VariableSet TorrentB_Time[TorrentB[2]] = 10.00
 
Last edited:
Level 9
Joined
Dec 12, 2021
Messages
72
Yes, the 3 levels work, and I think I have found the flaw: In the type of units that are affected by this ability they appear as ground units = true, and if it works on my map, only certain amphibious type units do not It causes damage, do you know how I can change it?
EDIT: I mean I just realized that the ability does work on my map, it just doesn't deal damage to enemy amphibious units like Murguls, there is some spec on the triggers to affect that type of unit as well ( I mean amphibious units enemies)
 

Attachments

  • 1644114833578.png
    1644114833578.png
    552.5 KB · Views: 12
Level 18
Joined
Mar 16, 2008
Messages
721
EDIT: i tested again and I think you might be right. I started modifying the set variable action however i do not see an option for a unit classification check for amphibious units.
 
Last edited:
Level 9
Joined
Dec 12, 2021
Messages
72
It is somewhat strange because for me if the 3 levels work for me, which my only problem would be about the damage to amphibious units, it would be very useful if you showed me how I can do that of making ground and amphibious units be affected on the trigger.
Sorry for my english :(
 
Level 18
Joined
Mar 16, 2008
Messages
721
you are right. but if you make them not amphibious then they can't swim. it would be a better solution to make the trigger target ground and amphibious.

You can change that in object editor under their movement. But i think i can find a solution to fix them in the trigger. then you won't need to modify the object editor settings.

1644116642842.png


Amphibious is considered a ground unit. I'm confused why the condition for ground unit isn't including those amphibious units????

Edit: we could just make it target any unit, including structures and air units but then might be too strong? again i think the ideal solution would be target amphibious and ground but for some reason i can't find a unit classification check for amphibious.
 
Last edited:
Level 9
Joined
Dec 12, 2021
Messages
72
I do not intend to change the type of amphibious unit, I just want to make a change in the trigger so that it affects amphibious type units as well. I think I didn't explain myself well because I use a translator into your language and sometimes the meaning changes :(
If you have the solution for the trigger it would be very useful and I would be very grateful
EDIT: I guess if you can do that it would be fine anyway, I'll see how I create a balance as the amount of damage dealt
 
Last edited:
Level 18
Joined
Mar 16, 2008
Messages
721
We need something like there but there is no unit-type comparison for amphibious units???

  • Set VariableSet TorrentB_Group[TorrentB[3]] = (Units within 225.00 of TorrentB_Area[TorrentB[3]] matching (((((Matching unit) is A ground unit) Equal to True) or (((Matching unit) is AN AMPHIBIOUS UNIT) Equal to True)) and (((Matching unit) belongs to an enemy of (Owner of TorrentB_Caster[TorrentB[3]]).) Equal
 
Level 9
Joined
Dec 12, 2021
Messages
72
Well unlike the variable you made, I copied and pasted the same variable and made some changes
EDIT: Now it seems to work perfectly, it doesn't affect air units and now it does damage to amphibious and ground units
 

Attachments

  • 1644118756798.png
    1644118756798.png
    584.8 KB · Views: 11
Level 18
Joined
Mar 16, 2008
Messages
721
That is a good idea but i think it might cause a problem. You set it to all units that are alive, that includes flying units, then you set it again without clearing it to all units that aren't flying units. I think this might cause a leak [?] and also add unintended units to the group.

Maybe something more like this? I'm sure there is a better solution out there.

  • Set VariableSet TorrentB_Group[TorrentB[3]] = (Units within 225.00 of TorrentB_Area[TorrentB[3]].)
  • Unit Group - Pick every unit in TorrentB_Group[TorrentB[3]] and do (Actions)
    • Loop - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • ((Picked unit) is dead) Equal to True
              • ((Unit-type of (Picked unit)) is A structure) Equal to True
              • ((Unit-type of (Picked unit)) is A flying unit) Equal to True
        • Then - Actions
          • Unit Group - Remove (Picked unit) from TorrentB_Group[TorrentB[3]].
        • Else - Actions

Also you should post your triggers like this: [ t r i g g e r ]
 
Level 9
Joined
Dec 12, 2021
Messages
72
I will do it manually since you gave me the base of the trigger, anyway thank you very much, and one more thing and I hope it doesn't bother you... Could you also help me to do the same with the LB (liquid bomb) trigger that belongs to the same hero and it would be his definitive ability, what happens is that it works in the game but it doesn't work with amphibious units :(
 

Attachments

  • 1644121793808.png
    1644121793808.png
    590.1 KB · Views: 8
Level 18
Joined
Mar 16, 2008
Messages
721
once you get the Torrent Blast trigger working, just copy that to the LB trigger, but change the unit group variable to whatever the LB unit group is. You should also post the trigger here using [ trigger ] <text> [ /trigger] once you are done so I can double check you did it right.
 
Level 25
Joined
Sep 26, 2009
Messages
2,387
We need something like there but there is no unit-type comparison for amphibious units???

  • Set VariableSet TorrentB_Group[TorrentB[3]] = (Units within 225.00 of TorrentB_Area[TorrentB[3]] matching (((((Matching unit) is A ground unit) Equal to True) or (((Matching unit) is AN AMPHIBIOUS UNIT) Equal to True)) and (((Matching unit) belongs to an enemy of (Owner of TorrentB_Caster[TorrentB[3]]).) Equal

While there isn't a boolean condition to check whether unit is amphibious, in Reforged you have the option to compare unit's movement type.
The downside is that there is no list of available movement types in GUI, but what you can do is define your own global integer variables and use them.
You will need to initialize the variable(s) with correct values, here is the list:
  • Map Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set VariableSet MOVE_TYPE_NONE = 0
      • Set VariableSet MOVE_TYPE_FOOT = 1
      • Set VariableSet MOVE_TYPE_FLY = 2
      • Set VariableSet MOVE_TYPE_HORSE = 4
      • Set VariableSet MOVE_TYPE_HOVER = 8
      • Set VariableSet MOVE_TYPE_FLOAT = 16
      • Set VariableSet MOVE_TYPE_AMPHIBIOUS = 32
      • Set VariableSet MOVE_TYPE_UNBUILDABLE = 64

If you are only ever interested in amphibious, you can initialize only that variable.
Finally, in trigger you can do an integer comparison. The function that gives you the matching unit's movement type is called "Unit - Get Unit Integer Field" and the field itself is "Type ('umvt')" which actually refers to object editor's field "Movement - Type".
I tried the above in an empty map where I placed a single unit for each movement type, among them the Naga Snap Dragon as the only unit with Amphibious movement type.
Running the trigger below correctly picked only the snap dragon:
  • Test
    • Events
      • Player - Player 1 (Red) skips a cinematic sequence
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area) matching ((Unit: (Matching unit)'s Integer Field: Type ('umvt')) Equal to MOVE_TYPE_AMPHIBIOUS)) and do (Actions)
        • Loop - Actions
          • Game - Display to (All players) the text: (Name of (Picked unit))
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,583
On any version you can use Abilities to mimic the behavior of Classifications. For example, copy and paste the Storm Hammers ability, rename it to Amphibious (Classification), and give it to all of your Amphibious units.

Now you can check for it in your Conditions:
  • Level of Amphibious (Classification) for (Picked unit) Equal to 1

If you want to hide the Ability button, shift click the Art Button Position - X and Art Button Position - Y fields and set them to 0, -11. This may not work on your version. If that's the case then you can use a different ability that is hidden by default.
 
Level 9
Joined
Dec 12, 2021
Messages
72
In response to Nichilus, I think I would have to create new variables and for that it would complicate me more because I'm not good with triggers, all I do is pass triggers from one map to another, it's that simple.
The uncle thing could have served me in the same way and the idea is not bad. Anyway, thanks for sharing your ideas with me, now the trigger is fixed, and the skill works perfectly for me with all the desired units on my map. Gnuoy, what I said that I don't know how to place the triggers, I meant that I don't know how to place them in text here in this thread.
 
Status
Not open for further replies.
Top