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

[Trigger] Warlock voidwalker summon, please help!

Status
Not open for further replies.
I am trying to make a spell that summons a voidwalker and consumes a soul shard (item) from your inventory. It would reduce the charges of the soul shard in your inventory by one. I want to make it so if you don not have any soul shards in your inventory it will stop you from casting that spell and tell you that you need a soul shard for that. The problem is, I can't figure out which triggers i need to make the game check if the hero has the item in his inventory or not. Could anyone help please
 
Level 22
Joined
Dec 31, 2006
Messages
2,216
Do this:
  • Events
    • Unit - A unit Begins casting an ability
  • Conditions
    • (Ability being cast) Equal to YOUR SPELL
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • ((Casting unit) has an item of type Soul Shard) Equal to True
      • Then - Actions
        • .........................
      • Else - Actions
        • Game - Display to (Player group((Owner of (Casting unit)))) the text: You need a soul shard to use this!
        • Unit - Order (Casting unit) to Stop
The condition
  • ((Casting unit) has an item of type Soul Shard) Equal to True
is under "boolean comparison".
 
Level 3
Joined
Feb 24, 2008
Messages
67
  • Melee Initialization
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Summon Voidwalker
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Charges remaining in (Item carried by (Triggering unit) of type Shard)) Greater than or equal to 1
        • Then - Actions
          • Item - Set charges remaining in (Last created item) to ((Charges remaining in (Item carried by (Triggering unit) of type Shard)) - 1)
        • Else - Actions
          • Unit - Order (Triggering unit) to Stop
          • Game - Display to (Player group((Owner of (Triggering unit)))) the text: Your Text Here.
 
Its not over yet, If you set the charges remaining to 0 then you can keep casting the spell with no effect on the item.
  • Voidwalker
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Summon Voidwalker
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Casting unit) has an item of type SoulShard) Equal to True
        • Then - Actions
          • Item - Set charges remaining in (Item carried by (Casting unit) of type SoulShard) to ((Charges remaining in (Item carried by (Casting unit) of type SoulShard)) - 1)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Charges remaining in (Item carried by (Casting unit) of type SoulShard)) Equal to 0
            • Then - Actions
              • Item - Remove (Item carried by (Casting unit) of type SoulShard)
            • Else - Actions
          • Set TempLocA = (Position of (Casting unit))
          • Set TempLocB = (TempLocA offset by 100.00 towards (Facing of (Casting unit)) degrees)
          • Unit - Create 1 Voidwalker for (Owner of (Casting unit)) at TempLocB facing (Facing of (Casting unit)) degrees
        • Else - Actions
          • Game - Display to (Player group((Owner of (Casting unit)))) for 10.00 seconds the text: You need a |c008000...
 
Level 3
Joined
Feb 24, 2008
Messages
67
Ok guys, thanks so much for the help. I have another question. How do I put in custom numberss into the sections in the object?
-example:
|Health Regeneration: -50|
Some people said that you hold shift or something when you press it, but that doesn't seem to work. I have a mac, so would it be something different than on a pc?

Please explain more in detail, custom numbers into the sections in the object? I don't get you.

Its not over yet, If you set the charges remaining to 0 then you can keep casting the spell with no effect on the item.
  • Voidwalker
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Summon Voidwalker
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Casting unit) has an item of type SoulShard) Equal to True
        • Then - Actions
          • Item - Set charges remaining in (Item carried by (Casting unit) of type SoulShard) to ((Charges remaining in (Item carried by (Casting unit) of type SoulShard)) - 1)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Charges remaining in (Item carried by (Casting unit) of type SoulShard)) Equal to 0
            • Then - Actions
              • Item - Remove (Item carried by (Casting unit) of type SoulShard)
            • Else - Actions
          • Set TempLocA = (Position of (Casting unit))
          • Set TempLocB = (TempLocA offset by 100.00 towards (Facing of (Casting unit)) degrees)
          • Unit - Create 1 Voidwalker for (Owner of (Casting unit)) at TempLocB facing (Facing of (Casting unit)) degrees
        • Else - Actions
          • Game - Display to (Player group((Owner of (Casting unit)))) for 10.00 seconds the text: You need a |c008000...

My trigger works perfectly as far as I can see. Your trigger is more complicated... Might be confusing to some.. I prefer to keep it simple yet effective. :confused: It has leaks too... :sad:
 
Level 20
Joined
Oct 21, 2006
Messages
3,231
Ok guys, thanks so much for the help. I have another question. How do I put in custom numberss into the sections in the object?
-example:
|Health Regeneration: -50|
Some people said that you hold shift or something when you press it, but that doesn't seem to work. I have a mac, so would it be something different than on a pc?

Hmm... Negative numbers? Hold shift and double click on a field. Then enter -50 as value.
 
Level 4
Joined
Dec 16, 2007
Messages
134
Ok guys, thanks so much for the help. I have another question. How do I put in custom numberss into the sections in the object?
-example:
|Health Regeneration: -50|
Some people said that you hold shift or something when you press it, but that doesn't seem to work. I have a mac, so would it be something different than on a pc?

Use Unholy Aura ability and change life regeneration into -50.

To use negative numbers, just simply hold shift and double click a field.
 
Level 3
Joined
Feb 24, 2008
Messages
67
Ok guys, thanks so much for the help. I have another question. How do I put in custom numberss into the sections in the object?
-example:
|Health Regeneration: -50|
Some people said that you hold shift or something when you press it, but that doesn't seem to work. I have a mac, so would it be something different than on a pc?

preferenceswy8.gif


Removes the hassle of holding the Shift button everytime you want to insert a negative value in a field.
 
Level 4
Joined
Dec 16, 2007
Messages
134
How to put?
To choose only 1 Hero per 2 teams(like in DotA)?
Please P.M me and i will +rep you.

  • Untitled Trigger 001
    • Events
      • Time - Elapsed game time is 1.00 seconds
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Player - Limit training of Heroes to 1 for (Picked player)
preferenceswy8.gif


Removes the hassle of holding the Shift button everytime you want to insert a negative value in a field.

Shift is always better. It is already discussed on previous topics that holding shift is better.
 
Level 3
Joined
Feb 24, 2008
Messages
67
  • Untitled Trigger 001
    • Events
      • Time - Elapsed game time is 1.00 seconds
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Player - Limit training of Heroes to 1 for (Picked player)


Shift is always better. It is already discussed on previous topics that holding shift is better.

If you know what you're doing, you won't need to worry about checking the box.

I know you're concerned about making the game crash if you insert negative values in the wrong field, but really, you won't have to worry if you know what you're doing.
 
Uh, okay. Thanks. Yeah, i just checked the box. Holding shift doesn't seem to work for my computer. Hey, by any chance do you guys know how to make a unit "freeze" ? What i mean is, well in Dota they had a spell called 'Chronosphere' which froze all units in an area, they're stunned and stand completely still in the position they were in, no animations. I've seem this in other things such as a few campaign missions on Reign of Chaos and Frozen Throne. Does anyone know how to do this?
 
Level 3
Joined
Feb 24, 2008
Messages
67
  • Melee Initialization
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to <Your Spell Here>
    • Actions
      • Set Target_Unit = (Target unit of ability being cast)
      • Unit - Pause Target_Unit
      • Animation - Change Target_Unit's animation speed to 0.00% of its original speed
      • Wait <Your Time Here> seconds
      • Unit - Unpause Target_Unit
      • Animation - Change Target_Unit's animation speed to 100.00% of its original speed
You get the idea; this can be expanded to include something like "pick every units" functions. This isn't MUI though.
 
Level 4
Joined
Dec 16, 2007
Messages
134
Love to... how do you do it?

Maybe I will show you the pic If I am dead already. :grin: It will ruin the thread.

  • Melee Initialization
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to <Your Spell Here>
    • Actions
      • Set Target_Unit = (Target unit of ability being cast)
      • Unit - Pause Target_Unit
      • Animation - Change Target_Unit's animation speed to 0.00% of its original speed
      • Wait <Your Time Here> seconds
      • Unit - Unpause Target_Unit
      • Animation - Change Target_Unit's animation speed to 100.00% of its original speed
You get the idea; this can be expanded to include something like "pick every units" functions. This isn't MUI though.

Also create another trigger that checks entering units inside the cronoshpere and pause them.
 
Level 3
Joined
Feb 24, 2008
Messages
67
Maybe I will show you the pic If I am dead already. :grin: It will ruin the thread.

Uh oh. Don't promise something that you cannot do oo... Still got the pic? You can edit it with Photoshop for the sake of the thread lolz...

By the way shamanyouranus, I would not advise you to trigger it in GUI because it can invite many problems like bugs, not being MUI and not working and so... Try making it in JASS if possible.
 
Level 4
Joined
Dec 16, 2007
Messages
134
Uh oh. Don't promise something that you cannot do oo... Still got the pic? You can edit it with Photoshop for the sake of the thread lolz...

By the way shamanyouranus, I would not advise you to trigger it in GUI because it can invite many problems like bugs, not being MUI and not working and so... Try making it in JASS if possible.

Here is a video for you...

http://www.youtube.com/watch?v=oMtYt1tAIrk

Download it with Sothink or download it manually to see the numbers clearly.
 
Level 3
Joined
Feb 24, 2008
Messages
67
Here is a video for you...

http://www.youtube.com/watch?v=oMtYt1tAIrk

Download it with Sothink or download it manually to see the numbers clearly.

Wow, a vid with my name on it!! wah tq, tq, actually you don't have to make a vid or something ooo.... jz say i believe u ok? Those texts blocks everything by the way, so I just saw your mouse moving over to spells and stuffs, editing values only... can't see properly the number lolz...
 
Level 4
Joined
Dec 16, 2007
Messages
134
Well whatever.... We should go back to the topic now instead of doing and talking about those stupid things that are discussed already and proved.
 
Status
Not open for further replies.
Top