• 🏆 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] Is this posible?

Status
Not open for further replies.
Level 7
Joined
Nov 13, 2007
Messages
244
Well what I just want to know if this is posible and if I would required Jass to get it working correctly.

What I want is you have a spell book with abillities inside in this case we will use Frost Nova as an example when you click in the abillity inside of the spell book it will apear in your regular spell bar where the attack and defend commands are at hope I explained myself better.
 

Attachments

  • spell book 1.jpg
    spell book 1.jpg
    12.5 KB · Views: 94
  • spell book 2.jpg
    spell book 2.jpg
    40.4 KB · Views: 93
  • spellbook 3.jpg
    spellbook 3.jpg
    31.6 KB · Views: 87
Level 24
Joined
May 9, 2007
Messages
3,563
Hmmm, what do you mean?

Ohh, so that it cancels.


I can think of a couple of ways to do it.

Will post triggs in one sec.

They might not work.

  • Spell Book
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Ability being cast) Equal to Spell Book 1
          • (Ability being cast) Equal to Spell Book 2
          • (Ability being cast) Equal to Spell Book 3
          • (Ability being cast) Equal to Spell Book 4
    • Actions
      • Unit - Order (Triggering unit) to Stop
or

  • Spell Book
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Ability being cast) Equal to Spell Book 1
          • (Ability being cast) Equal to Spell Book 2
          • (Ability being cast) Equal to Spell Book 3
          • (Ability being cast) Equal to Spell Book 4
    • Actions
      • Set TempPoint1 = (Position of (Triggering unit))
      • Unit - Order (Triggering unit) to Move To TempPoint1
      • Custom script: call RemoveLocation(udg_TempPoint1)

Spell book 1,2,3 and four are the abilities in your spell book.

What he wants is to be able to close the spell book menu when a skill from it is cast.
 
Level 7
Joined
Nov 13, 2007
Messages
244
GhostWolf your not nice at all but I'll explain my self better. What I want is you have a spell book with abillities inside in this case we will use Frost Nova as an example when you click in the abillity inside of the spell book it will apear in your regular spell bar where the attack and defend commands are at hope I explained myself better.
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
GhostWolf your not nice at all but I'll explain my self better. What I want is you have a spell book with abillities inside in this case we will use Frost Nova as an example when you click in the abillity inside of the spell book it will apear in your regular spell bar where the attack and defend commands are at hope I explained myself better.

I'm not nice because too many people ask questions this way "oh lul plieze help me to mak a str fooling spellz :grin::grin::grin::grin::grin:".

Anyway, you need for this two abilities, one for the spell book and one for the command panel.
When a unit starts to cast an ability, if it is an ability in the spell book (make it instant cast of course) you simply add the one out side and do whatever you want with the one inside.

You might want to read this nice tutorial about spell books.
 
Yes it is possible.

KEY: frostnova_SPELLBOOK - The spell you cast in the spellbook (Needs to be a spell like warstomp that when you cast it it casts without asking for a target or a target point so you can click it and cast it)

frostnova_INACTIONBAR - The spell that is added to your infocard when you cast it in the spellbook


  • example
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to frostnova_SPELLBOOK
      • (Level of frostnova_INACTIONBAR for (Casting unit)) Equal to 0
    • Actions
      • Unit - Add frostnova_INACTIONBAR to (Casting unit)
 
Well you cant replace it but you can modify it to do this


  • Untitled Trigger 001
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • (Issued order) Equal to (Order(attack))
      • (Level of frostnova_INACTIONBAR for (Ordered unit)) Greater than 0
    • Actions
      • Unit - Order (Ordered unit) to Undead Lich - Frost Nova (Target unit of issued order)
 
Level 24
Joined
May 9, 2007
Messages
3,563
Yes. . .


That I know. YOur trig leaks though.


  • Untitled Trigger 001
  • Events
  • Unit - A unit Is issued an order targeting an object
  • Conditions
  • (Issued order) Equal to (Order(attack))
  • (Level of frostnova_INACTIONBAR for (Ordered unit)) Greater than 0
  • Actions
  • Set TempPoint = Location(of target unit of issued order.
  • Unit - Order (Ordered unit) to Undead Lich - Frost Nova (TempPoint)
  • Call RemoveLocation(udg_TempPoint)
This is not perfect just a mod of yours.
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
Yes. . .


That I know. YOur trig leaks though.


  • Untitled Trigger 001
  • Events
  • Unit - A unit Is issued an order targeting an object
  • Conditions
  • (Issued order) Equal to (Order(attack))
  • (Level of frostnova_INACTIONBAR for (Ordered unit)) Greater than 0
  • Actions
  • Set TempPoint = Location(of target unit of issued order.
  • Unit - Order (Ordered unit) to Undead Lich - Frost Nova (TempPoint)
  • Call RemoveLocation(udg_TempPoint)
This is not perfect just a mod of yours.

Ok please start actually looking at a comment BEFORE commenting on it. You are making this stupid mistakes over and over again and it is annoying.
 
Level 5
Joined
Jan 15, 2007
Messages
199
He wants it so when you click an ability in the spellbook, it adds that spell to your main command card.. Kinda like learning abilities with a hero.
 
Level 5
Joined
Jan 15, 2007
Messages
199
Ok please start actually looking at a comment BEFORE commenting on it. You are making this stupid mistakes over and over again and it is annoying.

I was referring to that, telling the people what the person wants with this thread understandably.
 
Level 5
Joined
Jan 15, 2007
Messages
199
Anyways, just add the ability to the unit.

Custom Script - call UnitAddAbility( GetTriggerUnit(), GetSpellAbilityId() )

And remove the ability of the spellbook, look for a spellbook tutorial if you don't know how.
 
Level 24
Joined
May 9, 2007
Messages
3,563
Hmmm, it is true that Frost Nova has to target a unit. On the other hand mine did NOT leak. See "Things That Leak" for more information. You should have used a unitgroup and cleared it.

Please try to keep calm.
You have 7 posts no rep.
I have 500 post 7 rep.
I have as much rep as you have posts.


You seem to be reasonable and smart. Try to remain so. No insults are necessary (or intended on my part).


To GhostWolf:


Although I respect you greatly, sorry I do not know what you are talking about. I realize that it was not relevant to the post but as earlier stated was trying to show Afterlife Avenger a little about leaks.
 
Level 5
Joined
Jan 15, 2007
Messages
199
bobo not leaking and not working is the same thing as no trigger at all

If you leak and the trigger doesn't work, you get lag.

If you don't leak and the trigger doesn't work, nothing happens (usually).

Lag < Nothing at all
 
Status
Not open for further replies.
Top