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

Demote Detonated Fire Trap

Status
Not open for further replies.
Level 8
Joined
Oct 8, 2005
Messages
409
I found this spell here: http://www.hiveworkshop.com/resources_new/spells/299/

It was not what I was looking for, but it was close enough to edit a bit...
The original spell was a land mine that detected hero movement a shot bolts at enemies when they came too close to it.

What I want is a trap that is remote detonated. So far, this is what I want the spell to do:

1) a summoning spell is casted
2) the spell summons a unit with the Locust spell, and a custom fireshot spell
3) when the spell is casted, a detonate spell is added to the caster's spell list
4) when the detonate spell is casted the summoned unit targets random units and casts fire shot on them

  • Firetrap summon
    • Events
      • Unit - A unit Spawns a summoned unit
    • Conditions
      • (Unit-type of (Summoned unit)) Equal to Flametrap (Level 1)
    • Actions
      • Unit - Kill Flametrap_unit[(Player number of (Triggering player))]
      • Set Flametrap_unit[(Player number of (Owner of (Summoning unit)))] = (Summoned unit)
      • Unit - Set level of Firetrap Shot for (Summoned unit) to (Level of Firetrap for (Summoning unit))
      • Unit - Remove Detonate from (Summoning unit)
      • Unit - Add Detonate to (Summoning unit)
  • Firetrap fire
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to Detonate
    • Actions
      • Unit - Remove Detonate from (Casting unit)
      • Unit Group - Remove all units from Fire_Trap_Vic_UG[(Player number of (Owner of (Casting unit)))]
      • Set Fire_Trap_Vic_UG[(Player number of (Owner of (Casting unit)))] = (Units in (Region centered at (Position of Flametrap_unit[(Player number of (Owner of (Casting unit)))]) with size (600.00, 600.00)))
      • For each (Integer FT_int[(Player number of (Owner of (Casting unit)))]) from 1 to 10, do (Actions)
        • Loop - Actions
          • Unit - Order Flametrap_unit[(Player number of (Owner of (Casting unit)))] to Human Mountain King - Storm Bolt (Random unit from Fire_Trap_Vic_UG[(Player number of (Owner of (Casting unit)))])
          • Wait 0.50 seconds
      • Wait 1.00 seconds
      • Unit - Kill Flametrap_unit[(Player number of (Owner of (Casting unit)))]
The problem is, the unit is not casting fire shot.
 
Level 2
Joined
Aug 9, 2007
Messages
12
How are the other actions in the 'firetrap fire' trigger? How far does it make it into the trigger before it stops working? For instance, is the Detonate ability being removed after it has been cast?

In situations like these, I'll make copies of the trigger and delete individual actions until I find the problem area. If it helps, I had a similar problem with a spell (it is now working) which I will post here due to the changes I've made since the other thread.

  • Disaster Area Copy 2
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Disaster Area
    • Actions
      • Custom script: local effect udg_unluckyMark
      • Set Unlucky1 = (Target unit of ability being cast)
      • Special Effect - Create a special effect attached to the overhead of Unlucky1 using Objects\RandomObject\RandomObject.mdl
      • Set unluckyMark = (Last created special effect)
      • For each (Integer A) from 1 to 5, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Random integer number between 1 and 2) Equal to 1
            • Then - Actions
              • Set RANDOM = (Random integer number between 1 and 5)
              • Trigger - Run Trigger[RANDOM] (checking conditions)
              • Wait 10.00 seconds
            • Else - Actions
              • Wait 10.00 seconds
      • Special Effect - Destroy unluckyMark
  • Bad Luck Earthquake
    • Events
    • Conditions
      • (Unlucky1 is alive) Equal to True
    • Actions
      • Custom script: local unit udg_fated1
      • Custom script: local unit udg_casterFrog
      • Set fated1 = Unlucky1
      • Set tempPoint = (Position of fated1)
      • Unit - Create 1 Cursed Frog (dummy) for Player 3 (Teal) at tempPoint facing 0.00 degrees
      • Set casterFrog = (Last created unit)
      • Unit - Order casterFrog to Orc Far Seer - Earthquake (Position of fated1)
      • Custom script: call RemoveLocation( udg_tempPoint )
      • Wait 9.00 seconds
      • Unit - Remove casterFrog from the game
      • Trigger - Turn off (This trigger)
I am new here, so this is mostly my attempt to actually contribute. Please forgive me if I fail to be helpful here.

Edit: The purpose of the spell was to create a unit after a certain amount of time which cast a spell before being destroyed, based on chance. There are actually five separate possible spells to be cast based on the dice roll, so to speak.
 
Level 4
Joined
Nov 18, 2007
Messages
79
Keep in mind that if your Fire Trap unit is not a Hero, then it cannot use Hero abilities. If you gave your Fire Trap unit a standard Mountain King Storm Bolt, then it cannot cast it because the Fire Trap unit is not a Hero (I am assuming this fact.)

The easiest way to to fix this is to make a copy of the Mountain King Storm Bolt, set "Stats - Hero Ability" to false, then give that copied ability to the Fire Trap. Since the copied ability is now a Unit ability, your Fire Trap unit can use it.
 
Level 8
Joined
Oct 8, 2005
Messages
409
Q: Is the Detonate ability being removed after it has been cast?
A: Yes

Quote: "If you gave your Fire Trap unit a standard Mountain King Storm Bolt, then it cannot cast it because the Fire Trap unit is not a Hero "
Reply: It works for this spell and I already have "Hero ability" set to FALSE http://www.hiveworkshop.com/resources_new/spells/299/

1. effects - None
2. spells - Have 2 of them coppied
3. units - I am using my own units
4. triggers - I have changed the triggers to meet my needs
 
Status
Not open for further replies.
Top