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

A rather complex spell, think you can help?

Status
Not open for further replies.
Level 3
Joined
Oct 4, 2004
Messages
22
In my AOS map I have an ability I'm working on called Camouflage. The ability is supposed to turn the hero into a randomly picked doodad that’s close by. For example, you go next to a patch of trees and use it, it will turn into a tree, if you go near some rocks and use it, it will turn into a rock, etc. I also intend to have the "camouflaged" unit undetectable by the enemy unless it is detected by Truesight. So far, this is what I've done: The spell is based off of bear form. The transformed unit has the trueshot aura model with a scale of 0.25, and it has the "ghost" ability. I have a trigger for the ability that looks like this:
Code:
Destructible - Creat a (Descructible-type of (Random destructible in (Rect centered at (Position of (Triggering unit)) with size (3000.00,3000.00)))) at (Position of (Triggering unit))

So basically, I want it to create a destructible, say a tree, directly on top of the transformed unit. This should completely cover up the trueshot model. So if an ally or the owning player holds their cursor over the tree, they will see the selection circle, and can click on the unit, however if an enemy sees the tree, they see nothing because the transformed unit with the trueshot model under the tree has the ghost ability. But say the enemy brings in a unit with truesight, now the tiny trueshot model is “visible” however since it is covered by the tree, all they will see when they hold their cursor over the tree is the red selection circle, and if they send a unit to attack it, it will look like the unit is attacking the tree. I hope this makes sense, it’s difficult to explain.

My problem, however, is that I cannot get the tree (or other doodads) to appear directly on top of the unit. I've tried everything...making the unit fly, setting it's collision size to 0, using a trigger to turn it's collision off before creating the doodad, but still the tree or whatever is always appearing off to the side of the unit, thus you see the small trueshot aura model on the ground next to the tree and it just looks silly. I need the tree to be directly on top of the unit, covering the model.

Are there any other ways I can make this ability to fix this problem? Or anything I can change with the unit?
 
Level 9
Joined
Oct 28, 2004
Messages
533
ok, im no good with triggers, but ive got an idea, you need weu for the trees, but you can create custom units which still have ghost

what you do is check for the doodads, and then say it finds a tree, order a dummy caster to morph the target unit to a tree or something, this will only work for one though

This is only a solution until someone who knows something about triggers can help
 
Level 6
Joined
Dec 13, 2004
Messages
320
The problem is in where the program creates the doodad. It is programed to place it slightly off. This connot be changed, however there is still hope, I suggest you make one more line of code in the trigger.

Doodad - Move 'Last created Doodad' to position of triggering unit.

that should clear it up. 8)
 
Status
Not open for further replies.
Top