• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

[AI] Trouble with Inventories and Casting o.O

Status
Not open for further replies.
Multiple units will not cast the same spell if they have items in their inventories o.O? Why? How do you fix this?

Btw, on a side note... does anyone know how to add a custom sound to a unit without triggering it? I do :ap:.

Edit: Another on the side note, I fixed the shotgun model for this one guy, so you can actually use it, can I upload it?

Edit#2: Here's the map... by the time you've looked at it though, I'll have mades tons more updates to it. lol. Oh well. At start of game just select say 4, when it asks you how many soldiers you want. Make all but one of them equip the shotguns they'll be given. Then try to shoot them. If one guy is carrying an item, they can't all be ordered to shoot at once. But if they all have the shotguns equipped, then they all can be ordered to shoot at once. How can I fix it so they can all be ordered to shoot the shotguns even when at least one of the guys is carrying an item? Btw, you'll get some early sneak peeks at a 1337 inventory system and some other things I'm working on. :D
 

Attachments

Last edited:
(also don't advertise your models on this forum its a help forum)

Ermmm I didn't mean to advertise... I was wondering if you're allowed to upload someone elses model that you've corrected? Is that allowed if I give the original model maker credit? If this isn't the place to discuss this I'll take it to a different section of the forums :slp:.
 
what you should do is this:

First trigger
Event:
person picks up item
Condition:
Itemtype of picked up item = blahblahblah
Action:
Set variable "shotgutequiped" = true
run "second trigger"

----- Note if the shotgun is an ability do this ----

Second trigger
Event:
Condition:
Action:
Select all "shotgun guys" and add ability "shotgun:

----- Note if the shotgun is an attack ----

Second trigger
Event:
Condition
Action:
Select all "shotgun guys" and enable attack (if its 1 then 1 otherwise 2)
This is really crude because I am not at my pc right now but i'm sure you will get the general idea... ;)
 
what you should do is this:

This is really crude because I am not at my pc right now but i'm sure you will get the general idea... ;)

Ermmm I already did that, the problem isn't with the shotgun (which is equipped as an ability) it's when one of the units with the shotgun ability has some other item, like ammo, in his inventory. Oh well, since then I've changed my game. Now it's, centered around controlling one unit, although you will be able to ask NPC units to help out using a variety of commands.
 
Status
Not open for further replies.
Back
Top