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

Slamming my keyboard out of rage - please help!!

Status
Not open for further replies.
Level 4
Joined
Jul 25, 2007
Messages
71
Since you guys were so helpful in helping me fix my other problem..

I have 3 items. In an RPG.
-Demon Blood
-Demon Shaman Blood
-Empty Flask

For mixtures in potions, and other things, Once you kill a "Demon", their corpse will be laying there. Correct? Well, if you have an "Empty Flask", and you click it in your inventory, if you are standing on the corpse of a dead "Demon", the flask will be replaced by "Demon Blood", appearing to the user.. as being filled with the blood. But if you are standing over a "Demon Shaman" you can fill it with his blood instead, with the same flask. And this will also come in use with several other monsters in my map. Not just these 2. I cant figure it out to save my life people.. Please help me? =)
 

EPW

EPW

Level 4
Joined
Feb 27, 2009
Messages
60
Can you be lazy and change everything from undead to demon, and then when you have an empty flask you can use it on a "undead" unit like holy light and fill it...try that? :p
 
Level 4
Joined
Jul 25, 2007
Messages
71
Thanks for the replys but they wont help.

Remember, this unit that is being killed is one of hundreds. I cant make a variable for each of them, or even an integer variable. Due to respawning issues.

I also cannot simply "check for dead units of unit type in radius of casting hero" i wish i could.

Please help me =(
 
  • Replace Potions
  • Events
    • A unit starts the effect of an ability (or a Unit uses an item)
  • Conditions
    • Ability being cast Equal to [The ability that your item has] (or Item-type of (Item being manipulated) Equal to Empty Flask)
  • Actions
    • Set Temp_Point = (Position of (Hero Manipulating Item/Triggering unit))
    • Set Temp_Detector = (Units within 500.00 of (Point1) matching (((Unit-type of (Matching unit)) Equal to Demon) and (((Matching unit) is dead) Equal to True))
    • Unit Group - Pick up every unit in (Temp_Detector) and do (Actions)
      • Loop - Actions
        • If/ Then/ Else
          • If (Conditions)
            • (Number of units in (Temp_Detector)) Greater than or Equal to 1
          • Then (Actions)
            • For each (Integer A) from 1 to 6
              • Loop - Actions
                • If/ Then/ Else
                  • If (Conditions)
                  • (Item-type of (Item carried by (Hero manipulating Item/Triggering unit) in slot (IntegerA))) Equal to Empty Flask
                  • Then (Actions)
                    • Hero - Drop the item from slot (InetegerA) from (Hero Manipulating Item/Triggering unit)
                    • Item - Remove (Last dropped item)
                    • Hero - Create Demon Blood and give it to (Hero Manipulating Item/Triggering unit)
                  • Else (Actions)
            • Else (Actions)
    • Custom script: call RemoveLocation (udg_Temp_Point)
    • Custom script: call DestroyGroup (udg_Temp_Detector)
Notice the "Hero Manipulating Item/ Triggering unit". If you have the event "Uses an item", then have the "Hero Manipulating Item". If you use "Starts the effect of an ability" event, have the "Triggering unit". I think triggering unit would go to both ocassions, but for sure, have it that way.
 
Status
Not open for further replies.
Top