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

[Trigger] Trigger Problems

Status
Not open for further replies.
I need some help on some triggering. Summarizing on what I need on:
Item Upgrading by Buying the Same Item
Auto Toming
Possibly Nova Spells.

Item Upgrading by Buying the Same Item
  • Event
  • Unit - Sells an Item (from shop)
  • Conditions
  • Item Type of (Sold Item) equal to (MyItemHere)
  • (Number of Items Carried by Unit) equal to 2
  • Actions
  • Hero - Drop (Sold Item) from (Buying Hero)
  • Item - Remove (Last Dropped Item)
  • Hero - Create (MyItemHere) and give it to (Buying Hero)
I did it like this and it didn't work, it just keeps with the same item over and over.

Auto Toming
  • Event
  • Player - Player 1(Red) types -bt as an exact match
  • Conditions
  • (Player 1 Current Gold) equal to or greater than 300
  • Actions
  • Hero - Create (Tome of Knowledge) and give it to (Hero[1])
I'm assuming it uses an array for 10 players. I'm not sure how it repeats after you type -bt untill you dont have enough money.

The nova triggering i couldn't figure out. Though im going to take a look at a demo spell. I know its based on war stomp, then some kind of element waves out from the caster and stops at a specific spot.
 
Level 4
Joined
Jan 2, 2008
Messages
103
I still don't completely understand your tome and item question, but by nova do you mean frost nova?
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
1. The easiest way would be using charges.

  • Untitled Trigger 001
    • Events
      • Unit - A unit Sells an item (from shop)
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Charges remaining in (Item being manipulated)) Equal to 2
        • Then - Actions
          • Item - Remove (Item being manipulated)
          • Hero - Create Tome of Experience and give it to (Triggering unit)
        • Else - Actions

2.

  • Untitled Trigger 001
    • Events
      • Player - Player 1 (Red) types a chat message containing -bt as An exact match
      • Player - Player 2 (Blue) types a chat message containing -bt as An exact match
      • Player - Player 3 (Teal) types a chat message containing -bt as An exact match
      • Player - Player 4 (Purple) types a chat message containing -bt as An exact match
      • Continue for all your players
    • Conditions
    • Actions
      • For each (Integer A) from 1 to (((Player((Player number of (Triggering player)))) Current gold) / 300), do (Actions)
        • Loop - Actions
          • Hero - Create Tome of Experience and give it to (Triggering unit)
          • Hero - Order (Triggering unit) to use (Last created item) on (Triggering unit)

Set it to your unit variable of course instead of triggering unit.
Im not sure if the "Order ..." is needed.


3. Don't say random sentences and expect us to read your mind and get what you meant.
 
Level 4
Joined
Dec 4, 2007
Messages
76
Ya, about the nova spell, do you mean frost nova, or having like..a ring of <Insert effect here> expand out around the hero? If its the ring around the hero, I can help you, otherwise, please specify what u mean by "Nova spell"

-Edit

Ok I realize your talking about the ring around the hero. So heres one way to do it:

  • Nova
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to War Stomp
    • Actions
      • Set HeroFacing = (Facing of (Casting unit))
      • For each (Integer A) from 1 to 30, do (Actions)
        • Loop - Actions
          • Unit - Create 1 <Effect Dummy Here> for (Owner of (Casting unit)) at ((Position of (Casting unit)) offset by 75.00 towards HeroFacing degrees) facing HeroFacing degrees
          • Unit Group - Add (Last created unit) to Effects
          • Unit - Order (Last created unit) to Move To ((Position of (Casting unit)) offset by 500.00 towards HeroFacing degrees)
          • Set HeroFacing = (HeroFacing + 12.00)
      • Wait 1.80 seconds
      • Unit Group - Pick every unit in Effects and do (Actions)
        • Loop - Actions
          • Unit - Remove (Picked unit) from the game
Now in this trigger you use the variables "Effects" and "HeroFacing".

Effects is a unit group variable with the default as empty unit group.
HeroFacing is a Real variable with default as 0.

Now, this trigger doesn't deal damage to enemy units when the nova hits them, so you will have to make that yourself (if you need help with that you can just ask me again). You can change the distance that the "projectiles" travel, and at which speed they travel(Dummy units movement speed, mine is set to 300), but then you will have to adjust the wait time action.

And btw this trigger was made very quickly by me and I took no effort it removing leaks, so if someone wanted to fix it up, they could. (For the Effect Dummy, make sure to give it the locust ability and change its movement type to "Fly" and remove its shadow.
 
Last edited by a moderator:
Level 4
Joined
Dec 4, 2007
Messages
76
Eh...good point on expiration timers and trigger tags, but Im sure if you look around you will find a MUCH better nova spell than mine, mine was kinda rushed and I didnt bother to do too much with it.
 
Level 4
Joined
Dec 4, 2007
Messages
76
Well, Instead of using Timers put an expiration timer on the dummy, Then figure out how to check when any of the dummies come within range of an enemy, then cause the dummy to damage an area of say..100 around the unit you run into..I'll search for a trigger for it...

Oh also, heres the revised nova code.

  • Nova
  • Events
  • Unit - A unit Starts the effect of an ability
  • Conditions
  • (Ability being cast) Equal to War Stomp
  • Actions
  • Set HeroFacing = (Facing of (Casting unit))
  • For each (Integer A) from 1 to 30, do (Actions)
  • Loop - Actions
  • Unit - Create 1 <Effect Dummy Here> for (Owner of (Casting unit)) at ((Position of (Casting unit)) offset by 75.00 towards HeroFacing degrees) facing HeroFacing degrees
  • Unit Group - Add (Last created unit) to Effects
  • Expiration Timer - Add a 1.80 Generic expiration timer to (Last created unit)
  • Unit - Order (Last created unit) to Move To ((Position of (Casting unit)) offset by 500.00 towards HeroFacing degrees)
  • Set HeroFacing = (HeroFacing + 12.00)
 
Last edited:
Status
Not open for further replies.
Top