• 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.

Spell Attachments

Status
Not open for further replies.
Level 3
Joined
Nov 2, 2008
Messages
38
Ok, I'm trying to make it so that some spells will attach to a certain point on my model. The model I'm using is General Frank's Steam Fortress. I want to make cluster rockets have the missiles come from the rockets on top, and have a firebolt spell launch from the steam cannons. I tried using overhead and head for the cluster rockets attachemtn points, but it didn't work. Can anyone help?
 
Level 3
Joined
Nov 2, 2008
Messages
38
ummm, what? Ok, if you're talknig about the same dummy that you use for spells in the trigger editor, then I gotta let ya know that I never understood what the hell they are. Please explain, maybe an example or sumthing
 
Level 5
Joined
Nov 14, 2007
Messages
161
that's exactly what he's talking about.

Dummies for Dummies: a dummy is simply an invisible (no .mdl) invincible, non-targetable (locust skill) unit with no attack.

for your purposes, your dummy will be invisible, etc but also flying at the same hight that you want your missles to fire out of.

now you will make 2 cluster rocket skills. one will be ment for the building/hero which will have no damage, but the correct mp cost and range. while the other one will have no mp cost but does the damage.

give the no damage one to your building. and the damage one to the dummy.

now make a trigger:
Event: unit starts the effect of an abilty
Condtion: [ability comparasin] ability being cast is equal to "Cluster rockets (the one the building/hero has)"
Action: create the dummy unit at location of triggering unit
order the dummy to cast cluster rockets (the one that he has that does damage)


for other information i highly recomend you reading this tutorial about trigger spells. http://www.hiveworkshop.com/forums/f279/basics-trigger-enhancing-spells-7334/
 
Level 3
Joined
Nov 2, 2008
Messages
38
thanks! But I already read the tutorial, and it's impossible to do that. The fricken editor doesn't let you choose the spell it casts! there's a list of some, but it's very small, and it can't include custom ones! Just to make sure I'm not doing it wrong though, I set the action for that part to unit - issue order targeting a point. Thats the only one I could find that would work..
 
Level 3
Joined
Nov 2, 2008
Messages
38
so, my actions would be:
Unit - Create 1 Dummy for (Triggering player) at (Position of (Triggering unit)) facing (Target point of ability being cast)
Unit - Add (whatever spell I'm casting) to (Last created unit)
Unit - Order (Last created unit) to Neutral Tinker - Cluster Rockets (Target point of ability being cast)
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)

right?
 
Yes, exactly as long as your (whatever spell I'm casting) is based off of cluster rockets.

And I suggest getting rid of those leaks.
Heres the trigger you want:
  • Demo
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Cluster Rockets
    • Actions
      • Set TempLocA = (Position of (Triggering unit))
      • Set TempLocB = (Target point of ability being cast)
      • Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at TempLocA facing (Angle from TempLocA to TempLocB) degrees
      • Unit - Add Cluster Rockets to (Last created unit)
      • Unit - Order (Last created unit) to Neutral Tinker - Cluster Rockets TempLocB
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Custom script: call RemoveLocation(udg_TempLocA)
      • Custom script: call RemoveLocation(udg_TempLocB)
 
Go to advanced and hit the
Trigger.gif
Then your go to the trigger editor, right click the name of your trigger right above the trigger events and then go copy as text. Then you paste between the [TRIGGER][/TRIGGER]
 
Level 3
Joined
Nov 2, 2008
Messages
38
  • Untitled Trigger 002
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Rocket Launcher
    • Actions
      • Set tempLocA = (Position of (Triggering unit))
      • Set TempLocB = (Target point of ability being cast)
      • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at tempLocA facing (Target point of ability being cast)
      • Unit - Add Rocket Launcher [dummy] to (Last created unit)
      • Unit - Order (Last created unit) to Neutral Tinker - Cluster Rockets TempLocB
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
Cool

EDIT1:
look good? Cause I don't know what to put in as the custom script that is called on to get rid of the variables values.

EDIT2:
aww man... For some reason, it doesn't work half the time. It seems like the tank has to be facing the unit before it casts in order for the rockets to be launched. And even then, the rocekts do no damage!

EDIT3:
solved the shooting problem, but still no damage. Maybe I need the effects or the buffs..
 
Last edited by a moderator:
  • Angry
Reactions: Rui
Level 5
Joined
Nov 14, 2007
Messages
161
ummmm dont quad post, they get pissed at 2 in a row under 24 hours, 4 within 40 minutes... yeah (use edit button at the bottom of ur post)

i told you to have 2 skills right, 1 with damage, 1 without. add the one with damage to the unit and have the unit fire it. make sure u are adding the right one.
 
Add the custom script to remove the locations, the whole point in makeing them variables is so that they dont leak. And when you make the dummy unit, make it face TempLocB, because if you dont it will leak a location. And at the end of you trigger, type these lines into to seperate custom scripts, just like in my trigger.
call RemoveLocation(udg_tempLocA)
call RemoveLocation(udg_TempLocB)
 
Last edited:
Level 3
Joined
Nov 2, 2008
Messages
38
Yo_Ma_Ma I DO have two spells. It's all working, cept that for some reason it just doesn't do damage.
  • Rocket Launcher
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Rocket Launcher
    • Actions
      • Set tempLocA = (Position of (Triggering unit))
      • Set TempLocB = (Target point of ability being cast)
      • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at tempLocA facing TempLocB
      • Unit - Add Rocket Launcher [dummy] to (Last created unit)
      • Unit - Order (Last created unit) to Neutral Tinker - Cluster Rockets TempLocB
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
thats what mine looks like. AS for Graystuff, I'll add the custom scripts right now, ty! But I need to know, what to write for the custom script. Cause when you say call (custom script) you have to have a script to be calling on. I need to know what to type in that is called on. Do you understand what I mean, or am I wording it wrong? (I can't think of any way else to say it..)
 
Last edited:
Level 9
Joined
Apr 3, 2008
Messages
700
  • Custom script: call RemoveLocation(udg_TempLocB)
You mean this? Here was called a functions that deletes a point to remove memory leak. So you should write in custom script "call RemoveLocation([variable of your point])"
 
Level 3
Joined
Nov 2, 2008
Messages
38
omg! I know! I mean, WHAT is the function that is called on when you use that custom script! You can't just add the action
  • Custom script: call RemoveLocation(udg_TempLocB)
unless you have already made the function RemoveLocation(udg_TempLocB). I know WHERE to type in the function, and HOW to type in the function. I just need to know WHAT to type in FOR the function.
 
Level 3
Joined
Nov 2, 2008
Messages
38
YOU'RE WRONG! You can't jsut call on them!!!! It's calling on NOTHING, so it DOESN'T WORK! I realize I ned to make two seperate actions, each one being a custom script, the script being 'call RemoveLocation(udg_TempLoc(A or B)' but you have to use jass for that! You gotta write out the function that is called on when you use that! Cause just entering those in alone doesn't work. WHen I saved it, it couldn't cause there were two errors - those two actions! So just PLEASE tell me what the FUNCTIONS are, the ones that are called on once you make a custom script that tells the editor to call on them

Edit

this is what you're script looks like, and it's FINE...
  • Rocket Launcher
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Rocket Launcher
    • Actions
      • Set tempLocA = (Position of (Triggering unit))
      • Set TempLocB = (Target point of ability being cast)
      • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at tempLocA facing TempLocB
      • Unit - Add Rocket Launcher [dummy] to (Last created unit)
      • Unit - Order (Last created unit) to Neutral Tinker - Cluster Rockets TempLocB
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Custom script: call RemoveLocation(udg_TempLocA)
      • Custom script: call RemoveLocation(udg_TempLocB)
...BUT! For the last two actions - the custom script ones - they can't work. BECAUSE, the action that is to be taken is to activate the action "RemoveLocation(udg_TempLocA)" but it can't do that because that action doesn't exist. If you use the custom script, you need to create the action that will be taken when you call on it. THAT is what I need to know. what did you type in as the action that is called on. when you use that custom script, what function is used. Copy and paste the function to me.
JASS:
function GetHost takes nothing returns nothing
    local gamecache g = InitGameCache("Map.w3v")
    call StoreInteger ( g, "Map", "Host", GetPlayerId(GetLocalPlayer ())+1)
    call TriggerSyncStart ()
    call SyncStoredInteger ( g, "Map", "Host" )
    call TriggerSyncReady ()
    set udg_Host = Player( GetStoredInteger ( g, "Map", "Host" )-1)
    call FlushGameCache( g )
    set g = null
endfunction
I'm looking for something that looks like that (that's the GetHost function, I jsut used it as an example)
 
Level 3
Joined
Nov 2, 2008
Messages
38
TYPOE! I apologize man! I just realized that I didn't have the first 't' in either of the variables capitalized. So when I was using the custom script, I was capitalizing the first t's so it wasn't working. That just leaves two questions though: 1.) only some of the custom scripts require you to have a function written that is called on? 2.) my spell still isn't dealing damage, so how do I fix that?
 
Level 5
Joined
Nov 14, 2007
Messages
161
wow..... anger managment? lol and removelocation is a native function already in warcraft itself.

anyway try changing the experation timer longer. it might be removing the unit before the skill finishes. just a thought and worth the try. if the skill is triggering the only thing i can think of is the aoe size or damage isnt set right. oh 1 more thing, if the skill is set for hero use and ur dummy is a unit it never seems to work for me, u might have the same problem.
 
Level 3
Joined
Nov 2, 2008
Messages
38
All good suggestions, thanks a lot! I'll try em out, and hopefully one will work!

Edit

Yeah, I changed the unit expiration timer to 3, added a wait 3 seconds action after the actions but before I call on the scripts (in case it was deleting the locations before it fired and therefore didn't know where to fire) and changed the dummy ability to a unit ability. Just to let ya know, yesterday, it not only stopped dealing damage, but it also stopped firing the projectiles in general...
 
Last edited:
Level 6
Joined
Oct 26, 2007
Messages
211
change projectile launch x,y,z value fields in the unit's entry in the object editor-unit panel, but that will make ALL launched missiles originate from the set offset - including attack animation missiles.
 
Level 5
Joined
Nov 14, 2007
Messages
161
change projectile launch x,y,z value fields in the unit's entry in the object editor-unit panel, but that will make ALL launched missiles originate from the set offset - including attack animation missiles.

going off ur idea, make 2 different dummys with different Z fire heights. and create whichever one for the skill u want to use. i honestly dont know how u arent doing damage if u say you have it correct, then it should work. i got test tomorrow but maybe later ill make it up (or try too).
 
Level 3
Joined
Nov 2, 2008
Messages
38
change projectile launch x,y,z value fields in the unit's entry in the object editor-unit panel, but that will make ALL launched missiles originate from the set offset - including attack animation missiles.

sounds good, cause I'm making a battletank style map. No attacks used. The only problem is the rest of the spells, guess I can always make dummies for those ones, hopefully it'll work tho
 
Level 3
Joined
Nov 2, 2008
Messages
38
ya know, it really isn't the most important thing on the map. I think Ima just let this one go and forget about it for now. Thanks everyone! (+ rep for everyone who gave suggestions!)
 
Status
Not open for further replies.
Top