So are you equipping the item? You can have the item in an inventory slot and not equipped which is why I ask... I'm not sure, but you might be able to create a trigger so that when the item is equipped it attaches the model to the unit.
EDIT: Didn't see anything about a unit equipping it so that won't work...
I would also like to know how to do this. So far I've only been able to figure out how to attach an item to a unit that is facing a certain direction and that just doesn't work when you want the trigger to take place once your unit picks up the item. You can't know ahead of time what direction your unit will be facing. This is a really frustrating problem.
I don't really want to answer this since you keep bumping it, but I'll give a hint at least.
It'll be an actor related event. I'm not sure if you can track equipped items directly via actors but you can shimmy this with an actor event to tie to a dummy behavior or effect, creating/destroying with event held and using site operations (or maybe just a model actor type, i forget attechment options on it offhand) in order to achieve this.
Not 100% sure but you can try this... make a model and attach it to your unit in the data editor... then make a trigger/validator that actives when the unit equips the item. This means you would have to make all of the actor models before hand and attach them to the unit with conditions in which to activate them. This would be like how the death animation is attached to the unit but for equipping items.
If you sat down and tried to figure out how SCV's would work, you could get this but here, pretty much a tutorial on everything you need to know. (If you need more help, I attached the map, but as you see from map, it does work exactly as I originally noted.) Here's a SCV wielding an SCV when an item is in his inventory.
Made an item container called Hero Equip in data editor - item container section.
in Hero Equip item container: Added with Slots+ a new array and checked the Equip option.
Made an ability with type - Inventory called Hero Equip.
In Hero Equip ability: Added with Ability - info+ a new array and set container to Hero Equip.
Put an SCV on map for player 1.
Gave SCV the Hero Equip ability using Abilities + on Unit Data Tab.
Made a new behavior in Behavior Tab called BuffSCVAttach and behavior type: buff (Suggested name is BuffSCVAttach, noted this)
Made a new item in the Item Tab called SCVAttach with itemtype: Generic. (Suggested name is: HeroSCVAttach, noted this)
Inside SCVattach Item: Change Equip Behaviors to BuffSCVAttach.
Inside SCVAttach Item: Change face to 250mm cannon
Made a new unit in the Unit Tab called SCVAttach with itemtype: Item.
In SCVattach unit: changed Stats: Item to Hero SCVattach
Go to actor section and find SCV actor. go into it's Events+, and do the following
First entry) Event: UnitBirth.SCVAttach
First entry) Message: Create
Above line creates the SCV actor when the item is on the floor.
Find "Carry mineral field minerals" actor, and make a copy of it (ctrl+c->ctrl+v).
Rename above to SCVAttach
In SCVattach actor, change model from carry minerals to SCV
In SCVattach actor, go to into events and add/modify the carry events as so:
First Entry) Event: Behavior.buffSCVAttach.On
Second Entry) Message: Create
Above line creates the attachment. It will be in it's hands since the Host Site Operations + said so.
Second Entry) Event: Behavior.buffSCVAttach.Off
Second Entry) Message: AnimBracketStop BSD
This stops the event when behavior is removed.
Special Notes: Be sure the Model has an attachment point you specify. change hardpoint (find in actor SCVATTach)to your point of interest.
Hi guys, how can I attach a model when I move an item to an equipement objet container ?
The problem is I have 2 containers so I have to select the right one.
Any working idea ?
@MisterTeaRealOne: Go
bump
@MisterTeaRealOne: Go
Damn If there was a way to assign the right container to a variable I could manage to do it but it seems its impossible :(
Bu-bump !
Nobody knows what you mean.
@PvtChevron: Go
I have two item containers behaviors on a hero.
If the equipement item container contains a sword I want to attach a sword to my hero.
Is it more explicit ?
@MisterTeaRealOne: Go
bump
So are you equipping the item? You can have the item in an inventory slot and not equipped which is why I ask... I'm not sure, but you might be able to create a trigger so that when the item is equipped it attaches the model to the unit.
EDIT: Didn't see anything about a unit equipping it so that won't work...
hm i won't ever have an answer then :D
@MisterTeaRealOne: Go
buumpp forever !!!!
@MisterTeaRealOne: Go
bumpy bump
@MisterTeaRealOne: Go
bump
@MisterTeaRealOne: Go
bump
@MisterTeaRealOne: Go
bompy bomp
I would also like to know how to do this. So far I've only been able to figure out how to attach an item to a unit that is facing a certain direction and that just doesn't work when you want the trigger to take place once your unit picks up the item. You can't know ahead of time what direction your unit will be facing. This is a really frustrating problem.
I don't really want to answer this since you keep bumping it, but I'll give a hint at least.
It'll be an actor related event. I'm not sure if you can track equipped items directly via actors but you can shimmy this with an actor event to tie to a dummy behavior or effect, creating/destroying with event held and using site operations (or maybe just a model actor type, i forget attechment options on it offhand) in order to achieve this.
@Xackery: Go
First bumping is my only choice cuz of nobody answering me.
And did u try what you are trying to explain to me ? Cuz I don't think it will work (at least did you try it?)
Thank you
@MisterTeaRealOne: Go
bump
Not 100% sure but you can try this... make a model and attach it to your unit in the data editor... then make a trigger/validator that actives when the unit equips the item. This means you would have to make all of the actor models before hand and attach them to the unit with conditions in which to activate them. This would be like how the death animation is attached to the unit but for equipping items.
If you sat down and tried to figure out how SCV's would work, you could get this but here, pretty much a tutorial on everything you need to know. (If you need more help, I attached the map, but as you see from map, it does work exactly as I originally noted.) Here's a SCV wielding an SCV when an item is in his inventory.
Special Notes: Be sure the Model has an attachment point you specify. change hardpoint (find in actor SCVATTach)to your point of interest.
@Xackery: Go
Thank you so much. In fact I just didn't see the equip behavior in items Now I can continue my map. Thank you again :D