- Joined
- Mar 22, 2012
- Messages
- 1,551
I think bones I need few attachment for model, lets right weapon, chest. Attachments should move with body part. I will upload model soon just tell me if u can made it
Last edited:
library Attachments
struct AT
private static hashtable h = InitHashtable()
static method removeAttachment takes item it returns nothing
if HaveSavedHandle(h,GetHandleId(it),0) then
call DestroyEffect(LoadEffectHandle(h,GetHandleId(it),0))
call RemoveSavedHandle(h, GetHandleId(it), 0)
endif
endmethod
static method addAttachment takes item it, unit u, string sfx ,string where returns nothing
call SaveEffectHandle(h,GetHandleId(it), 0, AddSpecialEffectTarget(sfx,u,where))
endmethod
endstruct
endlibrary
its easier to attach a model via triggers/code but you must destroy it when unit dies...
if you dont want to remove it, simply remove and add it again, no harm done...and you can remove your attachment if item is dropped just like in the sample trigger...I dont think he needs to destroy an Item after a unit dies - maybe he could set like ---Unit---Dies---Drop---Item---On POINT---of---Dead Unit---