HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Making destructables only destroyable when you have an item?

07-13-2006, 07:06 AM#1
Sardius
I have destroyable rock chunks that I want to be undestroyable unless the hero is in possession of a certain quest item, once the hero has that item he can destroy the rock chunks, unless you drop the item... How would I do this?
07-13-2006, 07:09 AM#2
PipeDream
There are several ways. You needn't even trigger, I'm sure.

Try:
If the hero tries to attack the rocks, check if he has the item in his inventory. If he does not, cancel the order.

You may need similar provisions for spells. Those with out targets you might ban from being casted in a region.
07-13-2006, 08:10 AM#3
King Klear
Or you could simply make those chunks invincible from the begining and whenever the hero drops the item.

It would also help the player realize that those chunks will be vulnearable once he does something...
07-13-2006, 09:34 AM#4
Na.Zar.Rul
I think you can remove, his ability to attack destructable. (in OE)

And then make the item from Orb of Fire. and set the item to be able to attack destructable things.

Hope you understand me.
07-13-2006, 09:50 AM#5
King Klear
I was thinking about this sloution, but that would prevent the hero from attacking any other destructibles (ie crates etc.)
07-13-2006, 12:03 PM#6
The)TideHunter(
Trigger:
Invinc destruct
Collapse Events
Unit - A unit Is issued an order targeting an object
Collapse Conditions
(Destructible-type of (Target destructible of issued order)) Equal to 'Your Destructable'
((Triggering unit) has 'Your Item') Equal to True
Collapse Actions
If (((Target destructible of issued order) is dead) Equal to True) then do (Destructible - Resurrect (Target destructible of issued order) with (Max life of (Target destructible of issued order)) life and Hide birth animation) else do (Destructible - Set life of (Target destructible of issued order) to (Max life of (Target destructible of issued order)))