| 10-21-2004, 02:36 AM | #1 |
Guest | Code:
function CasterCastAbility takes player owner, integer abilid, string order, widget target, boolean instant returns unit
return CasterCastAbilityLevel( owner, abilid, 1, order, target, instant )
endfunctionPlease explain what "widgest target, boolen instant returns unit." mean? and what values go there? Also what "udg_" means? Please show me how I'd go about using this function to cast an ability. I looked at the spells in CS map but none show this function, they mostly use AOE Ability one. I don't know how to use this yet but the language seems logical and not difficult to learn. Thanks (I hope I made sense.) |
| 10-21-2004, 01:01 PM | #2 |
I could swear there was a rune of bloodlust in my map, but anyways, widget target means to what use the ability, widgets are units, destructables or items, most of the times you'd only use this in units, but anyways put there an unit argument that should be the target of the ability. The instant boolean is the same of the AOE abilities' , when it is true, it will recicle the casters immediatelly, meaning it will be more efficient, thus the problem is that some spells won't work correctly if you recicle the casters immediatelly, in that case use a false there. udg_ means User Declared Globals, when you create a variable in the trigger editor, it is a global variable, the name you give to a variable is not actually the name of the variable in JASS, world editor adds a udg_ preffix for variables created in the trigger editor, so if you want to use a variable in JASS (custom script action) you have to put udg_ |
| 10-21-2004, 07:17 PM | #3 |
Guest | Sorry, because I saw it was a rune I figured it was not the right spell to look into. :\ Thank you for the response though, you've helped to clarify a lot of things. :) |
| 10-21-2004, 09:27 PM | #4 |
Guest | I'm trying to make an AOE Curse spell and am using these functions: Event: Unit - Unit issued an order with no target Cond.: Issued order = Order(howlofterror) Actions: Set PointVar = Position of Triggering Unit Set UnitVar = Triggering Unit CustomScript: call CasterCastAbilityAOELoc( GetOwningPlayer(udg_UnitVar), 'A001', "curse", udg_PointVar, 500, false, true) CustomScript: call removelocation(udg_pointvar) The problem though is when I cast howlofterror, only one unit around me becomes Cursed. |
| 10-22-2004, 06:18 PM | #5 |
Does the curse ability have cooldown / mana cost? in that case make them 0 |
| 11-17-2004, 03:36 AM | #6 |
mebe you should change triggering unit to casting unit or target of ability being cast. btw, why is there a model for the dummy? couldnt you just put .mdl to make the unit invisible? |
| 11-18-2004, 12:26 PM | #7 |
From what it know, the dummy model have attachmentpoints, for moving special effects... But i dunno... |
