• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • ✅ Time to vote for the top 3 models! The POLL for Hive's 6th HD Modeling Contest: Mechanical is now open! 📅 Poll close on July 16, 2024! 🔗 Cast your vote now!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

Gold Pick-Up system?

Status
Not open for further replies.
Level 10
Joined
Apr 22, 2010
Messages
421
Hi, i was wondering how i can create a automatic gold-pickup system. Basicly, when an enemy unit is killed i need the following effects:

-Drops gold coins (50% chance for Creeps/100% for Boss)
-When you walk over the gold, it is automatically picked up, then used.
-The gold gives a random amount between: Minimum amount equal to [(Level of Killed)-2] to a Maximum amount equal to [(Level of Killed)+3]
-Floating Text that shows how much gold you got

Also, ill prefer it if you can create a test map for this, so I can learn how the system works.

Thanks and +rep in advance!
:ogre_haosis:

(Of course, ill credit you for the system in my map release)
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
what u mean under "automatic gold-pickup"?

order your hero for pick up the item or use a dummy unit what periodical check if have gold around you?

i made a order type pick

  • Melee Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- turn off the normal bounty for neutral hostile --------
      • Player - Turn Gives bounty Off for Neutral Hostile
create item if the random gold amount higher than 0
  • Mob die
    • Events
      • Unit - A unit owned by Neutral Hostile Dies
    • Conditions
    • Actions
      • Set p = (Position of (Triggering unit))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Dying unit) is A Hero) Equal to True
        • Then - Actions
          • Set creepLv = (Hero level of (Triggering unit))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • creepLv Less than 2
            • Then - Actions
              • Set creepLv = 2
            • Else - Actions
          • Set Gold = (Random integer number between (creepLv - 2) and ((Hero level of (Triggering unit)) + 2))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Gold Greater than 0
            • Then - Actions
              • Item - Create Gold Coins at p
              • Item - Set the custom value of (Last created item) to Gold
              • Unit - Order (Killing unit) to Right-Click (Last created item)
            • Else - Actions
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Random integer number between 0 and 99) Less than 50
            • Then - Actions
              • Set creepLv = (Level of (Triggering unit))
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • creepLv Less than 2
                • Then - Actions
                  • Set creepLv = 2
                • Else - Actions
              • Set Gold = (Random integer number between (creepLv - 2) and ((Level of (Triggering unit)) + 2))
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Gold Greater than 0
                • Then - Actions
                  • Item - Create Gold Coins at p
                  • Item - Set the custom value of (Last created item) to Gold
                  • Unit - Order (Killing unit) to Right-Click (Last created item)
                • Else - Actions
            • Else - Actions
      • Custom script: call RemoveLocation(udg_p)
      • Wait 10.00 seconds
      • Set p = (Position of (Triggering unit))
      • Unit - Create 1 (Unit-type of (Triggering unit)) for (Triggering player) at p facing (Facing of (Triggering unit)) degrees
      • Custom script: call RemoveLocation(udg_p)
  • Picked Gold
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Gold Coins
    • Actions
      • Set Gold = (Custom value of (Item being manipulated))
      • Floating Text - Create floating text that reads (+ + (String(Gold))) above (Triggering unit) with Z offset 50.00, using font size 13.00, color (100.00%, 100.00%, 10.00%), and 0.00% transparency
      • Floating Text - Set the velocity of (Last created floating text) to 75.00 towards 90.00 degrees
      • Floating Text - Change (Last created floating text): Disable permanence
      • Floating Text - Change the lifespan of (Last created floating text) to 3.50 seconds
      • Floating Text - Change the fading age of (Last created floating text) to 1.40 seconds
 

Attachments

  • gold system.w3x
    18.5 KB · Views: 49
Status
Not open for further replies.
Top