- Joined
- Mar 21, 2007
- Messages
- 88
now if i want to attach a gun to a model how would i do that in JASS?
native AddSpecialEffectTarget takes string modelName, widget targetWidget, string attachPointName returns effect
native DestroyEffect takes effect whichEffect returns nothing
Widgets are items, units, and destructables.
call AddSpecialEffectTarget("bleh/bleh.mdx", GetTriggerUnit(), "hand left")
call AddSpecialEffectTarget("bleh/bleh.mdx", GetTriggerUnit(), "hand left")
native AddSpecialEffectTarget takes string modelMWP_Minigunattachment, widget targetdDevastatorMarine, string attachRightHand returns effect
call AddSpecialEffectTarget(MWP_MinigunAttachment.mdx, GetTriggerUnit(), left hand)
native DestroyEffect takes effect whichEffect returns nothing
native AddSpecialEffectTarget takes string modelMWP_Minigunattachment, widget targetdDevastatorMarine, string attachRightHand returns effect
call AddSpecialEffectTarget(MWP_MinigunAttachment.mdx, GetTriggerUnit(), left hand)
native DestroyEffect takes effect whichEffect returns nothing
call DestroyEffect( GetLastCreatedEffect )
set udg_SomeEffect = AddSpecialEffectTarget("MWP_MinigunAttachment.mdx", GetTriggerUnit(), "hand left")
native AddSpecialEffectTarget takes string modelName, widget targetWidget, string attachPointName returns effect
call AddSpecialEffectTarget("MWP_Minigun.mdx", GetTriggerUnit(), "hand right")
native DestroyEffect takes effect whichEffect returns nothing
call DestroyEffect( GetLastCreatedEffect )
set udg_SomeEffect = AddSpecialEffectTarget("MWP_MinigunAttachment.mdx", GetTriggerUnit(), "hand left"
DestroyEffect(udg_SomeEffect)
JASS:set udg_SomeEffect = AddSpecialEffectTarget("MWP_MinigunAttachment.mdx", GetTriggerUnit(), "hand left"
set udg_SomeEffect = AddSpecialEffectTarget("MWP_MinigunAttachment.mdx", GetTriggerUnit(), "hand left"
set udg_SomeEffect = AddSpecialEffectTarget("MWP_MinigunAttachment.mdx", GetTriggerUnit(), "hand left")
native AddSpecialEffectTarget takes string modelDevastation Marine, widget targetWidget, string attachPointName returns effect
call AddSpecialEffectTarget("MWP_Minigun.mdx", GetTriggerUnit(), "hand right")
native DestroyEffect takes effect whichEffect returns nothing
call DestroyEffect( GetLastCreatedEffect )
set udg_SomeEffect = AddSpecialEffectTarget("MWP_MinigunAttachment.mdx", GetTriggerUnit(), "hand right")
DestroyEffect(udg_SomeEffect)
set udg_SomeEffect = AddSpecialEffectTarget("MWP_MinigunAttachment.mdx", GetTriggerUnit(), "hand right" )
//later, when you want to destroy it
call DestroyEffect( udg_SomeEffect )
local effect e = AddSpecialEffectTarget("MWP_MinigunAttachment.mdx", GetTriggerUnit(), "hand right" )
//later, when you want to destroy it
call DestroyEffect( e )
set udg_SomeEffect = AddSpecialEffectTarget("MWP_MinigunAttachment.mdx", GetTriggerUnit(), "hand left")
call DestroyEffect(udg_SomeEffect)
1. Yes you have it correct, but don't destroy the effect straight awaynow i need to know what to change to make it attach to a certain unit >.>
so people thought you where asking why you got a leak in those two codes and so forth.i got a leak in this code but i can't figure out what it is.. can someone help me?JASS:native AddSpecialEffectTarget takes string modelMWP_Minigunattachment, widget targetdDevastatorMarine, string attachRightHand returns effect call AddSpecialEffectTarget(MWP_MinigunAttachment.mdx, GetTriggerUnit(), left hand) native DestroyEffect takes effect whichEffect returns nothing
call AddSpecialEffectTarget("MWP_MinigunAttachment.mdx", DevastatorMarine, "left hand")
native AddSpecialEffectTarget takes string modelMWP_Minigunattachment, widget targetdDevastatorMarine, string attachRightHand returns effect
call AddSpecialEffectTarget("MWP_MinigunAttachment.mdx", GetTriggerUnit(), "left hand")
native DestroyEffect takes effect whichEffect returns nothing
call AddSpecialEffectTarget("MWP_MinigunAttachment.mdx",GetTriggerUnit(), "left hand")
call DestroyEffect(AddSpecialEffectTarget(effect,unit, attachment))
function Trig_AttachModel_Actions
call AddSpecialEffectTarget....blabla
endfunction
function Trig_AttachModel_Actions
call AddSpecialEffectTarget("MWP_MinigunAttachment.mdx", Marine1, "left hand")
call AddSpecialEffectTarget("MWP_MinigunAttachment.mdx", Marine2, "left hand")
call AddSpecialEffectTarget("MWP_MinigunAttachment.mdx", Marine3, "left hand")
//......and so on
endfunction
~ Two threads merged.Erm, didn't you already make a thread that was almost exactly the same as this one?
Umm GUI can do the same thing witout all of the hassle
Mr.Jamaka2 said:i just needed that one code that attaches the model for the whole game.. is it so hard to ask for?