Hero Tavern Type Issues.

Jak-Skell

New Member
Reaction score
0
Well, I have a few problems I want to cover in this thread.

First of all, I am developing a map. The map is similar to Vampirism Beast and Island Defense, where you choose a builder, then there is a titan. Now, choosing a builder is item based. In other words, it's like a hero tavern, but you buy an item, and then it creates a unit in the center of the map.
Here's my triggers for this...

Trigger:
  • Builder Tavern
    • Events
      • Time - Elapsed game time is 0.10 seconds
    • Conditions
    • Actions
      • Neutral Building - Add Orc to Tavern BUILDER 0002 <gen> with 0 in stock and a max stock of 1
      • Neutral Building - Add Random to Tavern BUILDER 0002 <gen> with 0 in stock and a max stock of 1
      • Neutral Building - Add Tauren to Tavern BUILDER 0002 <gen> with 0 in stock and a max stock of 1
      • Player Group - Pick every player in (All allies of Player 1 (Red)) and do (Actions)
        • Loop - Actions
          • Player - Set (Picked player) Current gold to 1
          • Camera - Pan camera as necessary for (Picked player) to (Position of Tavern BUILDER 0002 <gen>) over 0.00 seconds


Now, I want to accomplish two things here. First, I want the camera to lock onto the tavern, so people can't go remove their view from the tavern until picking a builder.

How do I do this?

Now, my next question, is how to make it so that after one person buys any unit, I can change the Cooldown of the Item so it doesn't have to change. In other words, the cooldown times for all the items is 15 Seconds. (I mean, to load in the store.) Now, after one is bought, I want the cooldown to become automatic. So after someone buys the first Orc, there is still one in stock. I hope that makes sense >.<

Now, for my next trigger goes like this,
Trigger:
  • Builder Selection
    • Events
      • Unit - Tavern BUILDER 0002 &lt;gen&gt; Sells an item (from shop)
    • Conditions
      • (Item-type of (Sold Item)) Equal to Orc


Now, I need the actions. I want it to create an Orc at the center of the map, and pan the camera to it. I tried doing it, but Triggering Player wasn't working.

Now, for my final topic, the problem is a picker. In order to buy something, you need a nearby patron. Can I remove this feature, or is there some way I can, like, make the picker invisible and not selectable? Anything to make it completely un-noticable? Then, after it is created, I need a trigger to remove the picker.

Now, for my REAL last topic, because I forgot this, a big error is vision. I need the player to be able to see the tavern to select it, but I want the tavern to be invisible once the player has chosen. So can I remove Share Vision, then enable it again when the Builder is made?


Thanks in Advance.
 

Executor

I see you
Reaction score
57
To lock the camera use:
Trigger:
  • Camera - Pan camera as necessary for (Picked player) to (Position of Tavern BUILDER 0002 &lt;gen&gt;) over 0.00 seconds


and force it periodically again and again.

There is another simple way to just lock the cam.. but this method can be bypassed.
 

Komaqtion

You can change this now in User CP.
Reaction score
469
First of all, never, and I mean NEVER, use:
Trigger:
  • Camera - Pan camera as necessary for (Picked player) to (Position of Tavern BUILDER 0002 &lt;gen&gt;) over 0.00 seconds


The "as necessary" pan camera action, as i can desync players...
Use the normal one instead ;)

And, to lock the camera, use this action:
Trigger:
  • Camera - Lock camera target for (Picked player) to Tavern BUILDER 0002 &lt;gen&gt;, offset by (0.00, 0.00) using Default rotation


Now, my next question, is how to make it so that after one person buys any unit, I can change the Cooldown of the Item so it doesn't have to change. In other words, the cooldown times for all the items is 15 Seconds. (I mean, to load in the store.) Now, after one is bought, I want the cooldown to become automatic. So after someone buys the first Orc, there is still one in stock. I hope that makes sense >.<

Hmm... Don't really understand what you mean there :S
Why not simply change the cooldown in the Object Editor for the item ? :S

Now, I need the actions. I want it to create an Orc at the center of the map, and pan the camera to it. I tried doing it, but Triggering Player wasn't working.

This should do it ;)
Trigger:
  • Pan to Center
    • Events
    • Conditions
    • Actions
      • Set TempPoint = (Center of (Playable map area))
      • Unit - Create 1 Orc for (Owner of (Buying unit)) at TempPoint facing Default building facing degrees
      • Camera - Pan camera for (Owner of (Buying unit)) to TempPoint over 1.00 seconds
      • Custom script: call RemoveLocation(udg_TempPoint)


Code:
Now, for my final topic, the problem is a picker. In order to buy something, you need a nearby patron. Can I remove this feature, or is there some way I can, like, make the picker invisible and not selectable? Anything to make it completely un-noticable? Then, after it is created, I need a trigger to remove the picker.

Well, simply make a unit, and add Locust to the unit, and make it have no model ;)
And, you'll need to make sure that the tavern has the ability "Select Unit" ability, and not the "Select Hero" one ;)

Now, for my REAL last topic, because I forgot this, a big error is vision. I need the player to be able to see the tavern to select it, but I want the tavern to be invisible once the player has chosen. So can I remove Share Vision, then enable it again when the Builder is made?

Well, you can simply do this action at time elapsed 0.01:
Trigger:
  • Visibility
    • Events
    • Conditions
    • Actions
      • Set TempPoint = (Position of (Triggering unit))
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Visibility - Create an initially Enabled visibility modifier for (Picked player) emitting Visibility from TempPoint to a radius of 512.00
          • Set Visibility[(Player number of (Picked player))] = (Last created visibility modifier)
      • Custom script: call RemoveLocation(udg_TempPoint)


Then, when the player has bought the item, do this:
Trigger:
  • Visibility - Destroy Visibility[(Player number of (Owner of (Buying unit)))]
 

Happy

Well-Known Member
Reaction score
71
Now, for my final topic, the problem is a picker. In order to buy something, you need a nearby patron. Can I remove this feature, or is there some way I can, like, make the picker invisible and not selectable? Anything to make it completely un-noticable? Then, after it is created, I need a trigger to remove the picker.

create a dummy there and remove it if they are finished.^^
 

NoobImbaPro

You can change this now in User CP.
Reaction score
60
Trigger:
  • ...
    • Camera - Pan camera for Player 1 (Red) to (position of tavern) over 500.00 seconds
    • Unit - Grant shared vision of (tavern) to Player 1 (Red)
    • Unit - Deny shared vision of (tavern) to Player 1 (Red)

Make the tavern not to sell items but the units find the region they spawn when they are bought and move them instantly to region you prefer.
When the unit enters the region do
Trigger:
  • Camera - Pan camera for Player 1 (Red) to (position of builder) over 0.05 seconds

Place a dummy unit with 0 (Pathing - Collision Radius 0) for each player close to your tavern.When the builder is bought, remove the dummy unit for the player that bought it.

Everything I give you is spare but is more easy and simple.

(i was afk when I was making my answer so i haven't seen Komaqtion's answer)
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Thanks so much, +Rep for the helpers :3

Why not +rep for me ?! :S
I did most of the helping :p
(No offence, guys ;), it's just that I haven't gotten that much +rep lately :()
 

Jak-Skell

New Member
Reaction score
0
Sorry, I didn't rep any of you, I forgot @___@ But that's fixed now.

Also, thanks for the reminder.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top