• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Trigger with a missing Order.

Status
Not open for further replies.

SpasMaster

Hosted Project: SC
Level 23
Joined
Jan 29, 2010
Messages
1,969
Hello everyone!

In my map I have both a custom Shop system AND a Backpack system. They don't work very well together because sometimes the Shop automatically selects the backpack (since it's a hero unit).

I tried to force the shop with a trigger to always select a Hero that isn't equal to Backpack. Well, World Editor does not offer the option to give a unit the Select Hero order.

88704766.png


Is there another way to order the Shop to Select a specific Hero (Not equal to backpack)?
 
Level 30
Joined
Nov 29, 2012
Messages
6,637
How about just make the Backpack a normal unit with a hero backpack maybe and give a shop a Select hero and not Select Unit?

I really dont know why you like it to be a hero unit.

Or other option is MasterTrainer's. Where if the backpack goes in range with a shop, teleport it a distance again that makes the shop not select the backpack.
 

SpasMaster

Hosted Project: SC
Level 23
Joined
Jan 29, 2010
Messages
1,969
How about just make the Backpack a normal unit with a hero backpack maybe and give a shop a Select hero and not Select Unit?

I really dont know why you like it to be a hero unit.

Or other option is MasterTrainer's. Where if the backpack goes in range with a shop, teleport it a distance again that makes the shop not select the backpack.

Because the backpack is an invisible unit that constantly moves with the hero and the only way to select it is via the hero portrait at top left corner of the screen. That's why I want it to be hero. ^^

The idea about teleportation could work, yeah.
 
Level 30
Joined
Nov 29, 2012
Messages
6,637
Why not? I find that a great idea :O

What exactly does not work?

Actually I found a way and it works. For the Select ability make its Interaction Any Non-Buildings and make the Backpack as a Building and it will not be selected!

The only letdown is it will select any unit even without an inventory.

@MasterTrainer
I tried its Unit Classification to be Worker and it still selected the unit.
 

SpasMaster

Hosted Project: SC
Level 23
Joined
Jan 29, 2010
Messages
1,969
It will work. Since the backpack's classification is a worker, and it is always idle, the game will recognize it as an idle worker, and ipso facto, show the backpack's icon at the lower left corner of the game's screen, above the minimap.

Damn, the thing is that the Backpack is constantly on the move with the hero and since it's moving it won't be recognized as "idle", right? :/

It's like... the Backpack is "Attached" to the hero, so they can trade items between eachother at any point.
 
Level 20
Joined
Apr 14, 2012
Messages
2,901
Damn, the thing is that the Backpack is constantly on the move with the hero and since it's moving it won't be recognized as "idle", right? :/

No. See here, the unit should stay only in one point, probably in an unused corner of the map far from everything.

Then, when the hero buys an item, put that item in the backpack. Actually for this to work the backpack must be a hero and classified as worker.

Then if you want to get some items from the backpack, just do the Give item action again.

If you can't understand that, I can post a simple system for you.
 

SpasMaster

Hosted Project: SC
Level 23
Joined
Jan 29, 2010
Messages
1,969
No. See here, the unit should stay only in one point, probably in an unused corner of the map far from everything.

Then, when the hero buys an item, put that item in the backpack. Actually for this to work the backpack must be a hero and classified as worker.

Then if you want to get some items from the backpack, just do the Give item action again.

If you can't understand that, I can post a simple system for you.

I want the backpack to freely trade items with the hero without coding that. If the Backpack is 200 screens away from the Hero, it cannot give him items. That's why it's, as I said, "attached" to the hero which sadly makes no Idle Worker icon appear.
 
Level 30
Joined
Nov 29, 2012
Messages
6,637
Now I know a way of making shops not SELECT a specific unit. Here is the thing you only need:

Go for Select Hero ability and configure its Interaction, check both Units w/ inventory and Any Non Buildings so it will select only units with inventory but should be not building.

Now configure also your backpack, make it a Building type and see? It will not slelect the Backpack.

Test map below!
 

Attachments

  • ddddf.w3x
    16.4 KB · Views: 39

SpasMaster

Hosted Project: SC
Level 23
Joined
Jan 29, 2010
Messages
1,969
Now I know a way of making shops not SELECT a specific unit. Here is the thing you only need:

Go for Select Hero ability and configure its Interaction, check both Units w/ inventory and Any Non Buildings so it will select only units with inventory but should be not building.

Now configure also your backpack, make it a Building type and see? It will not slelect the Backpack.

Test map below!

I think that does the trick. Thanks. +rep for everyone who tried to help.
 
Status
Not open for further replies.
Top