• 🏆 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!

Using normal Immolation on an item and unable to disable it.

Status
Not open for further replies.
Level 11
Joined
Jul 25, 2005
Messages
573
I'm currently experimenting around with WE for some ideas on a new map I'm brainstorming for, it would be a map style similar to battleships in which you control a unit and your weapons do the attacking (through phoenix fire of course).

However I came up with my own little idea of having the player need to activate the weapons themselves at times. I did this by giving the items an Immolation as a dummy spell, upon activating the Immolation the unit is given the "Phoenix Fire" dummy attack spell for the weapons on it. The reason the immolation is there is to drain the unit's mana, acting as though it's using up power/energy supplies to activate and use the weapons.

At the moment it works near perfect, the issue is that for some reason I'm unable to disable the Immolation on the items =/ the only way it disables is if the unit completely runs out of mana. Does anyone know a way to fix it so the player can disable the weapons manually without completely using up their mana pool.
 
Hm, you might want to do this (don't know if it works):
  • Trigger1
  • Events
    • Unit - A unit uses an item
  • Conditions
  • Actions
    • Set Integer[Player Number of (Owner of (Triggering unit))] = 1
    • Trigger - Turn off (This trigger)
    • Trigger - Turn on (Trigger2 <gen>)
  • Trigger2
  • Events
    • Unit - A unit uses an item
  • Conditions
  • Actions
    • If/ Then/ Else
      • If (Conditions)
        • Integer[Player Number of (Owner of (Triggering unit))] Equal to 1
      • Then (Actions)
        • Unit - Order (Triggering unit) to Night Elf Demon Hunter - Deactivate Immolation
        • Set Integer[Player Number of (Owner of (Triggering unit))] = 0
        • Trigger - Turn on (Trigger1 <gen>)
If this doesn't work, then, make a trigger:
  • Trigger1
  • Events
    • Unit - A unit uses an item
  • Conditions
    • ((Item-type of (Item being manipulated)) Equal to X)
  • Actions
    • Trigger - Turn off (This trigger)
    • Set Unit1 = (Triggering unit)
    • Trigger - Turn on (Trigger3 <gen>)
    • Set Integer[Player Number of (Owner of (Triggering unit))] = 1
    • Trigger - Turn on (Trigger2 <gen>)
  • Trigger2
  • Events
    • Time - Every 1.00 second of game-time
  • Conditions
  • Actions
    • Unit - Set mana of (Unit1) to ((Mana of (Unit1) - X)
  • Trigger3
  • Events
    • Unit - A unit uses an item
  • Conditions
    • (Triggering unit) Equal to Unit1
    • Integer[Player Number of (Owner of (Triggering unit))] Equal to 1
  • Actions
    • Trigger - Turn off (Trigger2 <gen>)
    • Set Integer[Player Number of (Owner of (Unit1))] = 0
    • Set Unit1 = No unit
 
Level 11
Joined
Jul 25, 2005
Messages
573
Gotta love when you suddenly get an idea when you post something huh lol.

I just had the idea of instead of having the items use immolation as the dummy using some tweaked Channels, and instead of just giving the weapon ability it will give a spellbook with a hidden icon containing the weapon ability and a permanent immolation that does the mana drain. This way they can use the ability again to disable the weapon and my trigger will remove the spellbook.



Edit: Except now i can't remember how to hide the icon for the spellbook xD
 
Status
Not open for further replies.
Top