• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Illusion Problem

Status
Not open for further replies.
Level 37
Joined
Aug 14, 2006
Messages
7,601
Hi!

I'm creating an illusion spell. When hero is attacked an illusion will come to help the hero. But after few tries I have not made any succes. Can you perhaps little help?

I have attached the map to the post. This should be easy, but I don't know how to do this correctly.

The one who help me will have some rep. Thanks beforehand.
 

Attachments

  • Illusion.w3x
    14.6 KB · Views: 45
Level 3
Joined
Mar 12, 2007
Messages
62
Not sure if the spell will respond if all you did was change the Order String, but im not an expert in this section xD, maybe you could base it of another spell?
 
Level 37
Joined
Aug 14, 2006
Messages
7,601
Ooh, now it works. I have never been thinking that this could be done like this.

Thanks, really. Now my eyes are open to item abilities also.

+rep

EDIT: But... I still have one problem. The ability have 10 levels, how I do those levels when it's cast? I have attach the newest version of the map to post.
 

Attachments

  • Illusion 3.w3x
    15.2 KB · Views: 46
Level 25
Joined
Jun 5, 2008
Messages
2,572
First modify an Item Illusion Ability into an unit ability,add it to your dummy unit then add this in you trigger:
  • Actions - Unit set level of ability of last created unit to level of *ability* of attacked unit
Add this after you create your dummy but before you issue the order.
 
2nd way

Another way is the same.. create 10 items..

Use loop to make variable of 10 arrays in map initialization

Variables
========
Name: Item
Type: Item Type
Array size: 10

  • Map Initialization
  • Set udg_Item(1) = Item Illusion(1))
  • Set udg_Item(2) = Item Illusion(2))
  • Set udg_Item(3) = Item Illusion(3))
  • Set udg_Item(4) = Item Illusion(4))
  • Set udg_Item(5) = Item Illusion(5))
  • Set udg_Item(6) = Item Illusion(6))
  • Set udg_Item(7) = Item Illusion(7))
  • Set udg_Item(8) = Item Illusion(8))
  • Set udg_Item(9) = Item Illusion(9))
  • Set udg_Item(10) = Item Illusion(10))
  • Your Spell
  • Unit - create unit ...
  • Item - Give udg_Item(Level of Ability of Attacked Unit) to ....
 
Level 37
Joined
Aug 14, 2006
Messages
7,601
Okay... perfect! Now I start to edit the spell.

+rep +credits added

EDIT: Hmmhmmhmm! It seems like it still bugs. After a while, items starts to appear middle of the map. I have attached the map and a picture. Perhaps you can fix it?
 

Attachments

  • bug.JPG
    bug.JPG
    188 KB · Views: 92
  • Illusion 4.w3x
    17.2 KB · Views: 33
Last edited:
If I'm not wrong, I think the bug is fixed.
It is caused by the dummy, the trigger creates the dummy and gives it the item and use it .. but the item has 3 number of charges.. and maybe some problem, the unit drops the items in it's inventory. So, I set the number of charges to 1 and the bug was fixed. :thumbs_up:

Here you go!
 

Attachments

  • Illusion.w3x
    17.1 KB · Views: 38
Status
Not open for further replies.
Top