• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Moving Shop

Status
Not open for further replies.
Level 1
Joined
Jan 15, 2013
Messages
61
Hi guys. How can i make a shop that will not stay at one place but move through the map (like a ghost or something). Thx in advance and +rep

P.S. I would appreciate if you can make an example map
 
Level 10
Joined
Apr 18, 2009
Messages
601
In what way should it move to different locations? Like a flying unit issued to move to random locations all the time? Should it move with movement speed or should it be a static building that just pops up at different random locations?
 
Level 1
Joined
Jan 15, 2013
Messages
61
it should move around the map, not flying. maybe make 3-4 locations and move between them making a circle around the map
 
Level 25
Joined
May 11, 2007
Messages
4,650
Copy the abilites from the Goblin Merchant, place them on your unit of choice, then set the items sold of that unit to whatever items you want?

Abilites -
Items Sold

Both are in the object editor of the unit.
 
Level 2
Joined
Jan 15, 2014
Messages
5
Hello there, KIRIL!

I'm assuming you want the following scenario to occur:
A merchant travels to five or six locations in a map in a circular motion, periodically stopping at each to sell his wares, without being interrupted. A hero can purchase items while the merchant is moving, as well.

This is fairly simple to set up.
I've created a map that shows how you can do this. Please check this post's attachments to download it.

I'd suggest checking the map both in-game (to see how it works live) as well as having a look at the object and trigger editors to see what I've done. In the trigger editor, I've included explanations/descriptions on each of the triggers to help you understand what I did, and why I did what I did.

If you have any further questions, please feel free either to reply to me in this thread, or to send me a PM. I hope this helps!
 

Attachments

  • MerchantMoveMechanic.w3x
    15.4 KB · Views: 56
Level 9
Joined
May 27, 2012
Messages
116
Good way to solve it but you leak a location... at the Timer Expires trigger.
Heres what it should look like:
  • Timer Expires
    • Events
      • Time - MerchantMoveTimer expires
    • Conditions
    • Actions
      • Set TempPoint[1] = (Center of MerchantRegion[TravelToNum])
      • Unit - Order Merchant to Move To TempPoint[1]
      • Custom script: call RemoveLocation (udg_TempPoint[1])
ad why not combie the set variable trigger with the trigger there you start the timer both has the same event that way you cut down the trigger number!
 
Level 10
Joined
Apr 18, 2009
Messages
601
Hello there, KIRIL!

I'm assuming you want the following scenario to occur:
A merchant travels to five or six locations in a map in a circular motion, periodically stopping at each to sell his wares, without being interrupted. A hero can purchase items while the merchant is moving, as well.

This is fairly simple to set up.
I've created a map that shows how you can do this. Please check this post's attachments to download it.

I'd suggest checking the map both in-game (to see how it works live) as well as having a look at the object and trigger editors to see what I've done. In the trigger editor, I've included explanations/descriptions on each of the triggers to help you understand what I did, and why I did what I did.

If you have any further questions, please feel free either to reply to me in this thread, or to send me a PM. I hope this helps!

Excellent explanation. PsychotikRaptor put lot of work into explaining exactly what's going on. You should check out the trigger comments of that map, K_I_R_I_L.

As a side-note to you PsychotikRaptor; when a player manually casts the Select Unit ability from the shop, then the merchant will stop. So this is a bug right now.
 
Level 2
Joined
Jan 15, 2014
Messages
5
Reaver:
Ah, thank you for that! I'm still relatively new to mapping, so I'm glad a more experienced member corrected me. :)
The reason I separated the two triggers is so that I could explain each one in more detail without having a wall of text (in other words, making it more simple), but I understand what you say, and, in reality, combining the two would be a good choice.

I hope the O.P takes note of your reply. :D

Licheus:
Thank you. Hm, I had not thought of that! I guess I now see the value in testers. :p I'll see if I can solve that, unless someone solves it first.
 
Level 1
Joined
Jan 15, 2013
Messages
61
Thx a lot guys, especially you PsychotikRaptor/ You did a very good job. But i encountered a problem. If i buy an item while the merchant is travelling he stops and remains at that place
 
Level 2
Joined
Jan 15, 2014
Messages
5
There we go! I've fixed the memory leak and the movement bug. It should run like a charm now. Please check this post's attachments for the fixed version. :D

Edit: I noticed another memory leak. Quickly patched it up. :3
 

Attachments

  • MerchantMoveMechanic (Fixed).w3x
    16.8 KB · Views: 55
Status
Not open for further replies.
Top