HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Illusion Spells - Difficulty

09-14-2006, 07:25 PM#1
Fulla
Having difficulties wit two things>

1 - Wand of Illusion

It has no order string.
Therefore I need to use lame methods of
- Creating a dummy item and making a dummy unit use it.
- Becomes difficult adding levels to it.

How can I make a dummy unit CAST wand of illusion ABILITY.

2 - Moving Illusions

How can I detect when an illusion is made? to do someting with it.

For example.
Like in RisingDusks Illusion spell, moving "last created" illusions into a line


Any help would be greatly appreciated
thx
Fulla



-
09-14-2006, 07:29 PM#2
blu_da_noob
Quote:
Originally Posted by Fulla
How can I make a dummy unit CAST wand of illusion ABILITY.

Order ids.

Quote:
How can I detect when an illusion is made? to do someting with it.

They trigger the 'unit spawns a summoned unit' event.
09-14-2006, 07:41 PM#3
Fulla
Quote:
Originally Posted by blu_da_noob
Order ids.

Wand of Illusion ability has no order ID.

Quote:
Originally Posted by blu_da_noob
They trigger the 'unit spawns a summoned unit' event.

Ill look into this one
09-14-2006, 08:11 PM#4
Vexorian
Quote:
Wand of Illusion ability has no order ID.
Yes, it does.

Trigger:
Rune of Illusions
Collapse Events
Unit - A unit Acquires an item
Collapse Conditions
(Item-type of (Item being manipulated)) == Rune of Illusion
Collapse Actions
-------- We need a caster to cast illusions on the unit that acquired the rune --------
-------- So we'll use CasterCastAbility --------
Set UnitVar = (Triggering unit)
-------- Prepare the value of a variable, not a needed step --------
-------- but makes calling JASS functions easier for non-JASS experienced people --------
-------- -------------------------------- Calling the function: --------------------------------- --------
-------- function CasterCastAbility takes player owner, integer abilid, string order, widget target, boolean instant returns unit --------
-------- To call it use: --------
Custom script: call CasterCastAbility( GetOwningPlayer(udg_UnitVar), 'A00M', "852274", udg_UnitVar, true)
-------- Uses The owner of the UnitVar unit --------
-------- The rawcode of the ability in this map is 'A00M' --------
-------- Illusions doesn't have an order string, so use "852254" (its order id betwen quotes) --------
-------- UnitVar is the target --------
-------- Illusions is instant, so put a true there --------
09-14-2006, 10:09 PM#5
Fulla
mm I tried that, came up when I saved

"Expected a function name".
09-14-2006, 10:16 PM#6
oNdizZ
You do have that function added aswell?
09-14-2006, 10:20 PM#7
Fulla
yes

The variable
Then the function.

Function line has the bug
09-14-2006, 11:13 PM#8
Rising_Dusk
Look at Domino Theory.
If you're capable of reading the code, then you'll find the Order ID of the wand of illusion ability.
It's all there, as well as a little tutorial on how to use them.

Extracted from the code, I felt necessary to note this --
Collapse JASS:
call IssueTargetOrderById(d, 852274, u)
That should be the Order ID of the wand of Illusion, as well as the code used to get it cast.
09-14-2006, 11:18 PM#9
Chuckle_Brother
Not directly related, but Fulla if you are ever in doubt of an orderId, you can always just rig up a display to display the orderid when you cast the spell. Then just cast the ability and see what pops out.
09-14-2006, 11:45 PM#10
Fulla
Quote:
Originally Posted by Rising_Dusk
Look at Domino Theory.
If you're capable of reading the code, then you'll find the Order ID of the wand of illusion ability.
It's all there, as well as a little tutorial on how to use them.

Extracted from the code, I felt necessary to note this --
Collapse JASS:
call IssueTargetOrderById(d, 852274, u)
That should be the Order ID of the wand of Illusion, as well as the code used to get it cast.

K been looking over the code. Unsure wat d + u =?

Collapse JASS:
local unit d = GetTriggeringUnit()
local unit u = GetLastCreatedUnit()
call IssueTargetOrderById(d, 852274, u)

Am I on the right lines? Id make a dummy unit obviously.
09-15-2006, 12:36 AM#11
aquilla
other way around :)
IssueTargetOrderById(a, b, c)
Issue a to target c using orderid b
09-15-2006, 10:42 AM#12
Fulla
Trigger:
Replacement
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Replacement
Collapse Actions
Custom script: local unit b = GetTriggerUnit()
Unit - Create 1 Dummy Unit for (Owner of (Casting unit)) at (Position of (Casting unit)) facing Default building facing (270.0) degrees
Custom script: local unit a = GetLastCreatedUnit()
Unit - Add Illusion [Dummy] to (Last created unit)
Unit - Set level of Illusion [Dummy] for (Last created unit) to (Level of Replacement for (Casting unit))
Custom script: call IssueTargetOrderById(a, 852274, b)
Unit - Add a 2.00 second Generic expiration timer to (Last created unit)

Gah it comes up with errors?
I cant see whats wrong :(
09-15-2006, 11:12 AM#13
CryptWizard
Me neither. Check your Object Editor data?
09-15-2006, 11:41 AM#14
Rising_Dusk
Collapse JASS:
Custom script: local unit b = GetTriggerUnit() 
 Unit - Create 1 Dummy Unit for (Owner of (Casting unit)) at (Position of (Casting unit)) facing Default building facing (270.0) degrees 
 Custom script: local unit a = GetLastCreatedUnit()

You're declaring a local after a call.
That's an illegal action -- It would look like --

Collapse JASS:
local unit b
set b = ...
local unit a
Declare all locals first.
09-21-2006, 07:35 PM#15
aquilla
Yeah, and don't forget to set them = null in the end :)