• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

I need help with a drop system!

Status
Not open for further replies.
Level 8
Joined
Apr 6, 2009
Messages
254
Hey guys, i need help with a system i made.

Before i used the normal WC3 drop thing where you can make a item table and choose it, but all the creeps in my map revives, and when they revive their table gets cancelled (no idea if i said that right :O).

I made a system, where i made Creeps from 1 - 15 have a "Weak" buff, so every time a unit with "Weak" buff died i made it like this (I cant make triggers.. i allways do it wrong :O):

Event:
Unit Dies


Conditions:
Unit has "Weak" buff equals to true
Unit is owned by Player Hostile


Actions:

Make DropNumber[1] (Dropnumber[1] + 1)
Set DropIntenger[DropNumber[1]] is a random number between 1 - 150
Set DropPoint[DropNumber[1]] Possition of dying unit.

If: DropIntenger[DropNumber] is random number between 1 - 5
Then: then drop Claws of Attack +15 on DropPoint[DropNumber[1]]
Create a Special Effect
Destroy Effect
Else:


----------------

I did this with over.. 40 item chances and it simply wont work, i have looked around if somebody else did another system but i cant find one..

Did i trigger something wrong, or is there a much easier way? Please help =)
+red for help :p
 
Level 8
Joined
Apr 6, 2009
Messages
254
Sorry, there isnt mistakes in the Arrays.. i kinda failed when i wrote the post :O

I fixed it now (the post), and there is over 20 dropable chances that is only 1 number, like 22 and 26.

Btw i also remove Location leak ofc.
 
Level 8
Joined
Jan 8, 2010
Messages
493
hmmm. i still think it's because of the if line. why not try something like, if you want a 20% to drop an item.

set DropInteger[DropNumber[1]] = Random Integer between 1-100
if DropInteger[DropNumber[1]] = Less than or equal to 20
drop Claws Of Attack +15
 
Level 8
Joined
Jan 8, 2010
Messages
493
oh, i get now what you said when you had 40 item chances. XD

you can try to use these triggers. i used that on a map. (i run the drop initialization on map initialization that's why i didn't put an event on it) :D
  • Drop Initialization
    • Events
    • Conditions
    • Actions
      • Set Item[0] = Crown of Kings +5
      • Set Item[1] = Mask of Death
      • Set Item[2] = Ring of Protection +5
  • Drop
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Owner of (Triggering unit)) Equal to Neutral Hostile
    • Actions
      • Set DropChance = (Random integer number between 1 and 100)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DropChance Less than or equal to 15
        • Then - Actions
          • Set DropItem = (Random integer number between 0 and 2)
          • Item - Create Item[DropItem] at (Position of (Triggering unit))
        • Else - Actions
 
Status
Not open for further replies.
Top