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

[Trigger] Variable?No unit code

Status
Not open for further replies.
Hi, i'm working on a system... and i use unit in code, so if there is a way to set this unit in variable or something(that there would be no need to select a unit for trigger) Now i have a unit hidden somewhere on the map(backpack unit)
The trigger is ok, the only problem is that there must be that two specific units. (sry but i dunno how to explain other way...) so if i want to make it for more players i'm in deep sh*t. and one more thing all triggers depends on other triggers...
  • Bag Pick
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to BackPack
    • Actions
      • Unit - Add Open Backpack to (Triggering unit)
This works fine
  • Bag
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Open Backpack
    • Actions
      • Set Point = (Position of (Triggering unit))
      • Unit - Move Backpack 0014 <gen> instantly to Point
      • Unit - Unhide Backpack 0014 <gen>
      • Selection - Select Backpack 0014 <gen> for (Triggering player)
See here i use unit in code
  • Bag Close
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Close Backpack
    • Actions
      • Unit - Hide (Triggering unit)
      • Selection - Select Blood Mage 0001 <gen> for (Triggering player)
and here too, so if there is a way to convert a unit in code to non coded unit?

HF -BR-
 
I suppose you want it to work more "globaly" and not just with the unit you select in the trigger?

Yes.

I tried a variable bu i cant set it propherly for trigger. so if there is mby a script code or anything that is not unit in code?

Edit:

Ill edit the trigger, that it will look here as a want to be like.
......when i get back home.......
 
Last edited:
  • Variable
  • Set Backpack(unit)=Backpack[1]
  • Set Backpack(unit)=Backpack[2]
  • .
  • .
  • .
it would look like that, but i dont know how to set that if some1 could rewrote my uper trigger, and show me the waz how to sat that variable...
and than i would put each baskpack for a player, and set it for a casting unit...

HF -BR-

Edit:

I seted the variable like in previous "variable" trigger, but the problem is that the only option for the "move or hide unit" action is casting, last created, triggering unit, etc. ...
And there are two units "backpack" and "blood mage" so if i set triggering, casting,.. unit for the action it wont work.
I was thinking about seting a "backpack(unit)" in Melee Initialization as a (damn i dunno for what) so this is the PROBLEM, i have no idea how to make this sh*t work propherly!
so pls help me out.

HF -BR-
 
Last edited:
Status
Not open for further replies.
Top