• 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] Item to spell

Status
Not open for further replies.
Level 3
Joined
Mar 2, 2012
Messages
35
Hey guys, im making an "Dungeon" map where i want the players them selves to buy thier own spells. So i guess Item -> Spell is the best way of doing it. But how do i code/trigger it?

Details

1. You buy an item: Spell 1 item (name of the item)
1.1 If the hero got 2 of the same item, the last equipped/picked up drops.
2. you go in to an region (Region 1)
3. If the hero got "Spell 1 item" he learns the spell "Spell 1" and destroys the item "Spell 1 item"

I would be very thankfull if someone could help me with this. Thanks. :)

/Chris
 
Last edited:
Level 14
Joined
Jun 27, 2008
Messages
1,325
- Use an event to detect when the player enters the region (unit enters area event).
- Check if TriggeringUnit has an item of the respective itemtype, if so: Add the Ability to the TriggeringUnit

You might wanna check a few things:
- what happens if the unit has more than one of the item
- what happens if the unit already knows the spell
- do you want the item removed after learning the spell?
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
3. If the hero got "Spell 1 item" he learns the spell "Spell 1" and destroys the item "Spell 1 item"
So, after the item is destroyed, what happens if that unit picks up the same item that causes the unit to learn the same ability ?

Will this happen;
1.1 If the hero got 2 of the same item, the last equipped/picked up drops.

Meaning that if the unit already learned the ability from a certain item, the certain item of the same item type can't be picked up anymore, right ?
 
Level 3
Joined
Mar 2, 2012
Messages
35
The idea i had in mind:
You have one hero. That hero starts at a place that you cant get to anymore. So a little section in the corner of the map. When inside that place there is 1 item shop. In the item shop you can buy different items (i call them spell items) But you can only hold 1 of each items. So you cant hold for example 2 "Spell item 1". and every item costs 1 gold and you start with 6. So max 6 items. When the hero enters a region or a circle of power, he will learn all the spells that the items hold. (Example, Spell 1 belongs to spell item 1 and spell 2 belongs to spell item 2) And after learining the spells he will be teleported away from the starting area (item shop area) and all his items will be destroyed. So he won't have any items left in his inventory and have learnt all the spells.

Hope this clear up some tings..

Basically,

-Buy 6 items from itemshops in itemshop area
-go to an teleportion region/circle
-learns 6spells thats designated to the items
-teleports out from itemshop area
-all items are destroyed
 
Status
Not open for further replies.
Top