• 🏆 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] Shared Shops

Status
Not open for further replies.
Level 3
Joined
Dec 15, 2007
Messages
44
This is probably a really noob question, but is it possible to make a shared shop sell units AND upgrades? Or only units and items that I'd have to use triggers to upgrade the units. I'm working on an AoS map and the buildings hire mercenaries to push lanes and I also want to be abled to upgrade the structure into a higher level.

-And I need to have a building that can globaly upgrade units (attack, defense, speed, hp, etc)

Any help?
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
First, you could just add this question in your previous thread.

Anyway, will those upgrades level up, or are they 1-time upgrades ? (I mean, can you upgrade level 1, level 2, level 3, etc or just level 1 ?).

I think the easiest way would be to change the ownership of the shop during the upgrading like you did un-reason-ly in your other thread.
 
Level 3
Joined
Dec 15, 2007
Messages
44
yes, they'd be series upgrades, 1, 2, 3, etc.

And no, I didn't change the ownership of the shop in my other trigger, it just changes the ownership of the unit bought, so that the player who buys it doesn't get it, the cpu does.
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
It means you would probably need to do it that when a unit gets close it will check the current updrades level in it, set them into a variable, and then remove them and add the abilities of that unit's team.

Its worth a shot and its the only way I can think of, of doing it.
 
Level 6
Joined
Nov 28, 2007
Messages
203
You could make a neutral passive shop that sells items with the same name and icon as the skill. And only one item/skill. (This trigger only upgrades the ability, thought.)
  • Untitled Trigger 001
    • 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 Acid Bomb
          • (Level of Acid Bomb for (Triggering unit)) Greater than or equal to 1
        • Then - Actions
          • Unit - Set level of Acid Bomb for (Triggering unit) to ((Level of Acid Bomb for (Triggering unit)) + 1)
          • Item - Remove (Item being manipulated)
        • 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 Animate Dead
          • (Level of Animate Dead for (Triggering unit)) Greater than or equal to 1
        • Then - Actions
          • Unit - Set level of Animate Dead for (Triggering unit) to ((Level of Animate Dead for (Triggering unit)) + 1)
          • Item - Remove (Item being manipulated)
        • Else - Actions
 
Level 21
Joined
Jan 5, 2005
Messages
3,515
no its a bad idea to make a shop that sells to everyone and changes team or what it sells, because if two people are trying to use it at the same time it really screws up

the best way to do it is to make an invisible shop for each user at the same spot and have one bit unit shop on top of it. then when the user selects the big shop, its selection is automattically move to the smaller shop. or alternatively just configure the pathing so they cna only select their own shop.
 
Level 6
Joined
Aug 15, 2007
Messages
209
Wait, so you want a building that can upgrade, and sell units...
If the building being upgraded is neutral, and owned by a computer, then make a unit be called "Upgrade" or something, kill it when it spawns, and replace the building with another.
 
Level 21
Joined
Jan 5, 2005
Messages
3,515
GST, if there would be 2 shops there wouldn't be any problem from the start >.<

no i dont think you understand my concept. visually it appears there is only one shop, however there is a shop unit for each player underneath the shop that can be seen, what i mean by this is an invisible shop for each unit with no collision that is placed beneath the shop that can be seen. the shop that can be seen can also only be an animation, doesnt neccesarrly need to be anything.

the reason this needs to be done is because when upgrades are bought, the items the shop will sell will change, this is fine usually to swap the items when each players clicks on it, the problem arrises when two players are at the shop at the same time as one of the players may be given the option of items and upgrades that shouldnt be available, if they arent at the same upgrade level as the other player.
 
Level 6
Joined
Nov 28, 2007
Messages
203
you can do
  • Selection
    • Events
      • Player - Player 1 (Red) Selects a unit
      • Player - Player 2 (Red) Selects a unit
      • Player - Player 3 (Red) Selects a unit
      • Player - Player 4 (Red) Selects a unit
      • Player - Player 5 (Red) Selects a unit
    • Conditions
      • (Triggering unit) Equal to Visible Shop 0000
    • Actions
      • Selection - Remove (Triggering unit) from selection for (Triggering player)
      • Selection - Add InvisibleShop[(Player number of (Triggering player))] to selection for (Triggering player)
 
Level 3
Joined
Dec 15, 2007
Messages
44
Hm, thanks for the feedback, but I personally think the whole invisible shop thing is way too complicated. I'm gonna try items with names for the mercenaries and upgrades and trigger it that way. I'll see what I can do with that, but if anyone wants, could you give me some tips on how to go about doing this?
 
Level 3
Joined
Dec 15, 2007
Messages
44
Okay, so I'm trying to make a shop that just sells items that are identical to units sold. I'm really confused with how these items work, so can someone give me really indepth help?

I tried a powerup item so that it would just use upon purchase and then I tried to make a trigger that would create units according to the purchase, but that failed horribly.

First: With the shop sharing skill, somehow it has no range limit and I don't even have to have a hero to buy items. I don't know how this happened, 'cause I looked into the shop sharing skill and it has a 600 activation range.

Second: The item is a powerup and I'm not even sure that's what I need to use. Idealy it'd be a sort of tome that would be used and would do nothing but a trigger would create units.

Thirdly: How would I go about doing this in a simple manner that would cover all my bases? I don't wanna have to make too many triggers to do this.

Here's a couple main questions:

-Is power-up item one I should use?

-Is there a trigger that can designate a specific item used and create units at that point while being general enough to apply everywhere on map?

-How do variables work?
I'm thinking of setting up variables based on which items people buy and triggering things that way.

SOMEONE HELP ME PLEASE!!!
 
Last edited:
Level 3
Joined
Dec 15, 2007
Messages
44
Someone please help me I'm totally lost and I'm getting really frustrated with my map.
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
  • Untitled Trigger 002
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Item[1] = Rat {tome}
      • Set Item[2] = Bunny {tome}
      • Set Item[3] = Cat {tome}
      • Set Item[4] = Dog {tome}
      • Set Item[5] = Wolf {tome}
      • Set Unit[1] = Rat {unit}
      • Set Unit[2] = Bunny {unit}
      • Set Unit[3] = Cat {unit}
      • Set Unit[4] = Dog {unit}
      • Set Unit[5] = Wolf {unit]
  • Untitled Trigger 001
    • Events
      • Unit - A unit Uses an item
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 5, do (Actions)
        • Loop - 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[(Integer A)]
            • Then - Actions
              • Set Point = (Position of (Triggering unit))
              • Unit - Create 1 Unit[(Integer A)] for (Owner of (Triggering unit)) at Point facing Default building facing degrees
              • Custom script: call RemoveLocation(udg_Point)
            • Else - Actions

{ Variables used: Item[array] - Item Type variable, Unit[array] - Unit Type variable, Point - Point variable }
 
Status
Not open for further replies.
Top