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

Store Bought Spells Trouble

Status
Not open for further replies.
Level 2
Joined
Aug 8, 2008
Messages
17
I need some help with some triggers :confused: I need to find out how to buy a item to learn a spell and then destroy the item once the spell is learned. BUT.............

Ok.. there are 3 spells in a store. One is called 1, second one is called 2, and third one is called 3. To learn 1 you need to buy it from store. To learn 2 you need to buy it from store AND ALREADY KNOW 1. to learn 3 you need to buy it from a store AND ALREADY KNOW 2. You cant buy 1 again if you have 2 or 3, and you cant buy 2 if you have 3. and once you know the next abiilty the other ability would be lost. So any help cause I have scanned triggers for days and none seem to work :cry:
 
Level 12
Joined
May 4, 2008
Messages
1,111
lol yeah use a tome that has no ability set to him :F or attached to a dummy ability with 0 str/agi/int/lvl/exp gotten
here is something i would do
(wrote it by hand so may have mistakes)
  • Learn1
  • Events
    • Unit - A unit aquires an item
  • Conditions
    • (Item-type of (item being Manipulated)) is Equal to ''1''
    • (Hero Manipulating item) is in ''1Aquired'' is False
  • Actions
    • Unit - Learn ''1'' to (Hero Manupulating item)
    • Unit Group - Add (Hero Manipulating item) to ''1Aquired''
  • Learn2
  • Events
    • Unit - A unit aquires an item
  • Conditions
    • (Item-type of (item being Manipulated)) is Equal to ''2''
    • (Hero Manipulating item) is in ''1Aquired'' is True
    • (Hero Manipulating item) is in ''2Aquired'' is False
  • Actions
    • Unit - Learn ''2'' to (Hero Manupulating item)
    • Unit - Remove ''1'' to (Hero Manupulating item)
    • Unit Group - Add (Hero Manipulating item) to ''2Aquired''
  • Learn3
  • Events
    • Unit - A unit aquires an item
  • Conditions
    • (Item-type of (item being Manipulated)) is Equal to ''3''
    • (Hero Manipulating item) is in ''2Aquired'' is True
    • (Hero Manipulating item) is in ''3Aquired'' is False
  • Actions
    • Unit - Learn ''3'' to (Hero Manupulating item)
    • Unit - Remove ''2'' to (Hero Manupulating item)
    • Unit Group - Add (Hero Manipulating item) to ''3Aquired''
that should be it
 
Level 2
Joined
Aug 8, 2008
Messages
17
wow thanks! But for Learn 1 it should be Unit hasn't acquired 3 or something like that. Thanks!

EDIT: First off.. The units I want learning the spells ARENT heros.. and second off the item wouldn't be destroyed once I got it.
 
Last edited:
Level 8
Joined
May 21, 2008
Messages
218
the better way to do this is just make it so players buy units that spawn by the shop then-

event-unit is created
condition-unit equel to spell 1
action- set spell array 1 = 1
unit add ability (spell 1)

event-unit is created
condition-unit equel to spell 2
-spell array 1 = 1
action- set spell array 2=2
unit add ability (spell 2)

event-unit is created
condition-spell array 1=1
-spell array 2=2
-unit equel to spell 3
Action- Unit add ability (spell 3)

I was lazy and didnt bother using world editor
This requires 1 variable named in this case spell make it an array size 2 of type integer.
 
Status
Not open for further replies.
Top