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

DotA questions (disable gold sharing/items loyal to owner)

Status
Not open for further replies.
Level 5
Joined
Feb 6, 2011
Messages
177
hello hive users
thank you for taking the time to read this thread
my question is
i want to make the items not work when a unit of the owner who did not bought that item use it
like in Dota
when somebody buys a boots of speed
the effects of these boots will only work on the unit whose owner bought these boots even if he gives them to somebody else
and the other question is how can i disable the gold transfer between players
again like in Dota
regards
 
Level 17
Joined
Feb 11, 2011
Messages
1,860
You need to create 2 of each item - the real item and then a 'fake' one that looks the same but doesn't have any abilities. You would then do this:

  • Trigger
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item being manipulated)) Equal to Boots of Speed
          • (Owner of (Item being manipulated)) Not equal to (Owner of (Hero manipulating item))
        • Then - Actions
          • Item - Remove (Item being manipulated)
          • Hero - Create Disabled Boots of Speed and give it to (Hero manipulating item)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item-type of (Item being manipulated)) Equal to Disabled Boots of Speed
              • (Owner of (Item being manipulated)) Equal to (Owner of (Hero manipulating item))
            • Then - Actions
              • Item - Remove (Item being manipulated)
              • Hero - Create Boots Speed and give it to (Hero manipulating item)
            • Else - Actions
About the gold transfer - go to Scenario, Ally Priorities and tick the [ ] Modify Ally Priorities. Then, for each player set it to none (instead of high or low priority).
 
Level 5
Joined
Feb 6, 2011
Messages
177
darkgrom

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
  • If - Conditions
  • ((Hero manipulating item) has (Item being manipulated)) Equal to True
  • Then - Actions
  • Unit - Set (Hero manipulating item) movement speed to 300.00
  • Else - Actions
this idea is very bad
its an AOS map and every hero has his own abilities ... properties and etc
so if i get everybody to 300 damn its bad
check ur code... u seem to be a biggener .. try to learn more ;D
no offince
 
Level 17
Joined
Feb 11, 2011
Messages
1,860
No, that's the only way you can do it. You could make a trigger so you can't pick up other players' items...

  • Trigger
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Owner of (Item being manipulated)) Not equal to (Owner of (Hero manipulating item))
    • Actions
      • Hero - Drop (Item being manipulated) from (Hero manipulating item)
      • Game - Display to (Player group((Owner of (Hero manipulating item)))) the text: |cffff0000You cannot pick other players' items up!|r
 
Level 5
Joined
Feb 6, 2011
Messages
177
No, that's the only way you can do it. You could make a trigger so you can't pick up other players' items...

  • Trigger
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Owner of (Item being manipulated)) Not equal to (Owner of (Hero manipulating item))
    • Actions
      • Hero - Drop (Item being manipulated) from (Hero manipulating item)
      • Game - Display to (Player group((Owner of (Hero manipulating item)))) the text: |cffff0000You cannot pick other players' items up!|r

i thought of it at the bigging but it seems bad for an Aos i mean what . if ur team mate was at the base and u asked him to bring ur item to u .. its either a chicken or its the hero itself
but i do rly believe that there must be an another way
think of it.... more than 80 items and recipes damn the map loading time will be years and the game will lag like hell!
 
Level 5
Joined
Feb 6, 2011
Messages
177
still very scary
but i guess that i will not do a million triggers for 60 recipes and more than 80 items :S
jee am even scared to think about it
i guess i'll take the easy way in here
which will be that all heroes are prevented to take other players items .. they wont pick it up
but their chickens could do :D
and for the enemies i will make a trigger that will stop even enemy chickens to pick up ur item :D
so the item transfer in the map stays manly to the Hero . and an ally chicken :D
all of u got +rep .. Mr.bean u got 1 and as soon as i can give you another . i will :D
thx for the help
regards
 
Level 15
Joined
Jul 9, 2008
Messages
1,552
instead of making a trigger for each item why dont u just set up the triggers like this

all free hand but u get the concept


  • map int
  • item real[1] = boots speed
  • item real [2] = helm
  • item disabled [1] = boots speed(disabled)
  • item disabled [2] = helm(disabled)

  • Trigger
  • Events
  • Unit - A unit Acquires an item
  • Conditions
  • Actions
  • for each integer items_loop from 1 to (number of items) do actions
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
  • If - Conditions
  • (Item-type of (Item being manipulated)) Equal to real item [items_loop]
  • (Owner of (Item being manipulated)) Not equal to (Owner of (Hero manipulating item))
  • Then - Actions
  • Item - Remove (Item being manipulated)
  • Hero - Create item disabled[items_loop] and give it to (Hero manipulating item)
  • Else - Actions
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
  • If - Conditions
  • (Item-type of (Item being manipulated)) Equal to item disabled [items_loop]
  • (Owner of (Item being manipulated)) Equal to (Owner of (Hero manipulating item))
  • Then - Actions
  • Item - Remove (Item being manipulated)
  • Hero - Create item real [item_loop] and give it to (Hero manipulating item)
  • Else - Actions
 
Status
Not open for further replies.
Top