HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Ability Help (Is this possible?)

08-08-2006, 09:42 AM#1
Azhag
Hello.
Okay, so I was wondering if it was possible to make an ability, like spellbook, but is a item bag, and will hold items and stuff. But the reason I am asking this, is because I want to know if it is possible to make an item bag, that stays in the heroes list, where the commands (Attack, Hold, Stop, etc.) are, and the hero abilities are. So it looks like it is a spell, and then you click on it, and a window opens, just like spellbook, but all the items you have purchased are in there.
I was wondering this because I want to have all 6 inventory slots for equipment for my heroes, and I wanted a potion bag. I was also wondering, when you buy a potion, would it get added to the potion bag skill onto your hero?
The only items that would get added to the potion bag, would be of course potions.
Is this possible?
If it isn't possible, is there any solution that could help my problem?

Thanks for any help.
08-08-2006, 10:06 AM#2
Wyvernoid
In my opinion impossible^^
But you can use alternatives: make all the potions power-ups. Set their "Stats - Use Automatically when Acquired" to true. And remember to set the Abilities to None (that is, to make it with no effect)
Then... Make a set of units corresponding to the potions, named "UnitPotionxx" (or something like this), based on sheep.
And make a set of abilities corresponding to the potions, like an ability named "Potion of Healing" based on the right item ability. Set "Techtree - Requirements" to corresponding units. And OK, we're about to start now...
Trigger:
Potion Acquired
Collapse Events
Unit - A unit Uses an Item
Conditions - As you like
Collapse Actions
Collapse If (All Conditions are true) Then (do Actions) Else (do Actions)
Collapse If - Conditions
(Item being Manipulated) Equal To (Potion of Healing)
Collapse Then - Actions
Unit - Create 1 UnitPotionHealing for (Owner of (Triggering Unit)) at {a unreachable region} facing 0.00 degrees
Collapse Else - Actions
If/Then/Else............
Trigger:
Potion Used
Collapse Events
Unit - A unit Begins Casting an ability
Conditions - As you like
Collapse Actions
Collapse If (All Conditions are true) Then (do Actions) Else (do Actions)
Collapse If - Conditions
(Ability being cast) Equal To (Potion of Healing)
Collapse Then - Actions
Unit - Remove (Random Unit from (Units Owned by (Owner of (Triggering Unit)) of Type UnitPotionHealing)) from the game
Collapse Else - Actions
If/Then/Else............

Disadvantages:
1) Looks messy ^^
2) You can only have 11 constant potion types for each item bag.
3) You can't see how many potions you have now. (Unless you look at the sheeps)
08-08-2006, 10:48 AM#3
Captain Griffen
Bad triggering there. Leaky and inefficient, and not really that great.

I actually made a system for this.

Potential issues:

- You cannot drop stuff, only use it up.
- It has no protection against going over the limit of 11 spells in a spell book, but if you do, it'll probably just reappear when you come back below it.

Features:

- GUI initialisation trigger if you want for ease of use.
- As many different item types as you want with no loss of efficiency.

The documentation isn't completely finished though. If you have any problems with it, just say.
Attached Files
File type: w3xItem Abilities.w3x (21.4 KB)
08-08-2006, 06:14 PM#4
Azhag
Thank you Captain Griffen, that is exactly what I wanted.
Rep added.