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

[General] [AI] Prevent Automatic Sell Of Items

Status
Not open for further replies.
Level 13
Joined
Mar 19, 2010
Messages
870
Hi,

I'm working on an AI for my mod "Forsaken Bastion's Fall".
In my game i have a shop where you can buy units and another shop where you can buy items.

1. If an AI Player buy items and move along the other shop where you can buy units, he sell the first slot of his inventory and move again to his target location.

2. Why?

3. How can i prevent this behavior? I dont want that the heroes sell its items on any shop except i tell them to do that!

Reg.
Patrick
 
Level 6
Joined
Feb 5, 2012
Messages
1,685
Hi,

I'm working on an AI for my mod "Forsaken Bastion's Fall".
In my game i have a shop where you can buy units and another shop where you can buy items.

1. If an AI Player buy items and move along the other shop where you can buy units, he sell the first slot of his inventory and move again to his target location.

2. Why?

3. How can i prevent this behavior? I dont want that the heroes sell its items on any shop except i tell them to do that!

Reg.
Patrick

I didn't encounter this problem on my AI Systems on my Hero Arena maps.

Instead of using orders I manually detect their gold and use give item and remove item.
 
Level 13
Joined
Mar 19, 2010
Messages
870
No, the hero buys 1x Heal Potions (3xStack) and 1x Mana Potions (2x Stack) and one other item in the Item Shop. Than he moves a long the way and near the shop where you can buy units he moves directly to the it and sell ONLY the first slot with the Heal Potions (1x 3Stack).
 
Level 13
Joined
Mar 19, 2010
Messages
870
You can Download the latest map (development state) by click on "Source Code" in my signature. Than start map by adding a computer slot for the the first "orc player slot". Than you'll see the Tauren Chief buying Items at the shops, move to the teleporter and than he sell the heal potions on the next shop. Try yourself.
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
That's not a test map. I do not want to introspect your whole map. The loading time is hefty, the ingame wait time is hefty. I diminished the pick duration and tried to compile it, which may diverge if we do not have the same setup, it did not choose a Tauren Chieftain anymore nor handled the shop. You have the tools and knowledge, so break it apart until the problem is isolated and easy and fast to invoke.

edit: I can at least tell that when the item was rendered unpawnable as advised above, it cannot any longer sell the item to the shop but still tries and drops it in front of the shop. I guess you did not test changing the player controller.
 
Status
Not open for further replies.
Top