HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Unit casting custom spells with GUI

05-06-2008, 06:41 AM#1
Runin
Now, I've been working with the GUI for a while because I've always been bad with JASS.

I have a question.

Is there a way for you to use the GUI to make a unit cast a spell that you've created on the object creator? I've only been able to see the built in spells being used. I couldn't choose it as a variable or anything like that.

Don't worry about being technical, just don't overwhelm me lol.
05-06-2008, 06:56 AM#2
The Elite
just get the unit/hero to cast the spell that your custom spell is made from
05-06-2008, 07:17 AM#3
Runin
Quote:
Originally Posted by The_Elite
just get the unit/hero to cast the spell that your custom spell is made from


That was the original idea, but that is very limiting. I was wondering if there was a way to do from a spell that I didn't edit, just one I created myself.

Like right click create new spell. Use those kind.
05-06-2008, 02:20 PM#4
Opossum
Quote:
Originally Posted by Runin
That was the original idea, but that is very limiting. I was wondering if there was a way to do from a spell that I didn't edit, just one I created myself.

Like right click create new spell. Use those kind.

All spells that you create are based on built-in spells. Like The_Elite said just select the base spell from the list. The spells on the list using "Issue Order ..." are rather order strings/ids than actual spells.

If that won't work (which should not be the case) you can still use one of these custom scripts.
Trigger:
Custom script: call IssuePointOrderLoc(unit, order, location)
Custom script: call IssueImmediateOrder(unit, order)
Custom script: call IssueTargetOrder(unit, order, target)
Replace unit with the unit you want to be ordered (something like udg_Unit or GetTriggerUnit() ).
Order is the order string that is listed in the ability editor.
Target can be everything targetable (destructable, unit or item).
05-06-2008, 05:44 PM#5
Runin
Thx much for the custom scripts that was basically what I was after :)
05-10-2008, 03:31 AM#6
Pyrogasm
Yeah... you really don't need JASS for this.

Say you created a spell based off of Storm Bolt and you called it "Laser Beam". If you want a unit to cast that spell you would do this:
Trigger:
Unit - Order (Triggering Unit) to (Human Mountain King - Storm Bolt) (Last Created Unit)
----- Because "Laser Beam" is based on "Storm Bolt" -----
You use the spell that your custom spell is based off of (or has the OrderId of if you based your spell on Channel and changed the base orderid).