HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Personal Cloaking Device

01-18-2006, 03:45 AM#1
mmx2000
I'm trying to create a cloaking device that when activated, slowly drains mana.
My idea was to base it off of the Immolation spell and use triggers to give the unit Permanent Invisibility & Ghost when activated, and remove it when deactivated.
However, not only does it not seem to work, i cant seem to get rid of the immolation art effect.
Here's my triggers:

Code:
===Cloaking On===
EVENTS 
   Unit - A unit begins casting an ability
CONDITIONS
   (Ability being cast) equal to Cloaking Device
ACTIONS
   Unit - Add Permanent Invisibility to (Triggering Unit)
   Unit - Add Ghost to (Triggering Unit)
======


===Cloaking Off===
EVENTS 
   Unit - A unit Finishes casting an ability
CONDITIONS
   (Ability being cast) equal to Cloaking Device
ACTIONS
   Unit - Remove Permanent Invisibility to (Triggering Unit)
   Unit - Remove Ghost to (Triggering Unit)
======


I've also tried "starts the effects of an ability" for the On event, to no avail.
I also don't know the difference between Ghost and Permanent Invisibility or if I even need both.

Any help would be much appreciated^^
01-18-2006, 04:42 AM#2
kumoblade
i'm having the same problem, really, since its a toggle Power, you essentially finish casting it once you begin the effect.

Im trying to end a few special effects myself at the end of a toggle =/
01-18-2006, 08:10 AM#3
Anitarf
I think the only way to work with toggles is to detect orders (there's a different orderstring for turn on and off). Not sure if that works well with stun; while a unit is stunned, you can issue orders and only the last one will carry out when the unit un-stuns. Not sure if that's the same for toggle abilities, or do they activate/deactivate anyway.

But there's another option, I think that while immolation is on, the unit gets a special buff, maybe you could check for that with a periodic trigger.
01-18-2006, 08:15 AM#4
qwertyui
Hmmm

Okay first of all i think ghost ability makes a unit transparent without flagging it as invisible. If this is correct, then you only need permanent invis.

Second - is the "immolation effect" a problem with immolation graphical effect or something else?
Immolation graphics are modified via the buffs immolation gives.

Third - for immolation removal detection you can use unit is issued an order with no target event (unimmolation has its own order string). Just make sure it works correctly when the unit is stunned :/

EDIT: Anitarf is fast :)
01-18-2006, 02:45 PM#5
Peekaboo
I just finished making an ability like this (it gave bonus speed instead of invisibility), to get rid of the immolation effect you need to give immolation a blank buff, if you just remove the buffs from the ability it uses the default buff art for some reason. Just make a buff based off tornado spin (so it doesn't appear in the buff bar) with no art and put it in the buffs fields.

In order to detect when it is turned off you need three triggers:
Trigger:
Cloaking Device End Order
Collapse Events
Unit - A unit Is issued an order with no target
Collapse Conditions
((Triggering unit) is alive) Equal to True
(Level of Cloaking Device for (Triggering unit)) Greater than 0
(Issued order) Equal to (Order(unimmolation))
Collapse Actions
Unit - Remove Permanent Invisibility (Neutral Hostile) from (Triggering unit)
Unit - Remove Ghost from (Triggering unit)
Set TempInt = (Level of Cloaking Device for (Triggering unit))
Unit - Remove Cloaking Device for (Triggering unit)
Unit - Add Cloaking Device to (Triggering unit)
Unit - Set level of Cloaking Device for (Triggering unit) to TempInt
If the "((Triggering unit) is alive) Equal to True" condition isn't there the game crashes if the unit dies while immolation is activated.
You need to remove and re-add the ability so that it doesn't screw up when the order is given while stunned, the only 'problem' with this is that it means the ability can be turned off while stunned.
Make sure you check the unit has the cloaking skill so the trigger doesn't run every time a unit turns off immolation
As there is no delay between ordering the unit to stop immolating and actually stopping immolating this can't be abused
Trigger:
Cloaking Device End Mana
Events
Collapse Conditions
(Level of Cloaking Device for (Triggering unit)) Greater than 0
Collapse Actions
Unit - Remove Permanent Invisibility (Neutral Hostile) from (Triggering unit)
Unit - Remove Ghost from (Triggering unit)
In order for this trigger to work you need to add an event for every unit with the cloaking device (in the trigger below it assumes it's a learnt skill, just change it to aquires an item or whatever you need)
Trigger:
Learn Cloaking Device
Collapse Events
Unit - A unit Learns a skill
Collapse Conditions
(Learned Hero Skill) Equal to Cloaking Device
(Learned skill level) Equal to 1 -------- So it only adds the event for this unit once --------
Collapse Actions
Trigger - Add to Cloaking Device End Mana <gen> the event (Unit - (Triggering unit)'s mana becomes Less than or equal to 15.00)
Note: On this trigger make the amount of mana to trigger the event the same as the buffer mana on the immolation skill (one of the fields in the object editor for immolation)

Hope this helps :)

Edit: Urk, read Anitarfs post after I posted, turns out being stunned screws it up, im working on sorting that out

Edit: Sorted :D Just need to remove and re-add the ability, i've added that to the trigger

Edit: The trigger for detecting the order makes the game crash if the unit dies with immolation activated :o Apparently on death the unit gives the 'unimmolation' order (if immolation is activated), added a condition to stop this.
01-18-2006, 03:30 PM#6
Crazy_Panda
I know Vexorian made activate-disable cloak in one of his Caster System Maps (or spellpacks)
01-18-2006, 03:35 PM#7
Anitarf
Quote:
Originally Posted by Peekaboo
Edit: Sorted :D Just need to remove and re-add the ability, i've added that to the trigger
However, you can't do that with hero skills, they can't be readded to the hero skill menu.
01-18-2006, 03:46 PM#8
Peekaboo
Quote:
Originally Posted by Anitarf
However, you can't do that with hero skills, they can't be readded to the hero skill menu.
I tested this with a hero skill, it works. Maybe because there's no delay between removing and re-adding
01-18-2006, 04:28 PM#9
kumoblade
this helped me out greatly, actually. Thanks as well.

I'm having a problem though, and that is, if my character runs out of mana, the mana shield wears off, and he's left still with the changes as if he was in manashield form. is there a way to make it leave in the event that the caster's mana drops to 0?

I have a seperate thread on this, but as mentioned, i figured it would be best to just have 1 thread since the issues are similar.

thanks
01-18-2006, 06:46 PM#10
mmx2000
Wow thanks so much for your detailed reply. When I get home I'll try and implement that, I think I understand everything you're saying. Appreciate you testing things for me, too :D
I figured Vex would have something like this in one of his spell packs but I really don't like using those because I like to learn how to do things on my own so I can take the concepts and apply them to something else. You guys rock! ^_^
01-18-2006, 06:58 PM#11
Peekaboo
kumoblade I included triggers for when the unit's mana drops too low, read my post again. I think you should actually make it so when the unit's mana drops to 0, the buffer mana field doesn't actually seem to do anything.