Triggered Item Drop, problems

TwoHeadedBoy

New Member
Reaction score
6
I already have a basic item drop trigger for a quest item. It goes as follows:


Event:
Unit - A unit dies

Condition:
Owner of (Killing unit) equal to Player 1
Unit type of dying unit equal to Spider

Action:
Set Questlootp1 = (Random integer number between 1 and 4)
- If Then, Else:
Condition:
If Questlootp1 equal to 1
Then:
Create [Quest Item] at (Position of Dying unit)



ok so all that looks good. the problem is that i am getting more of a 1 in 10 chance to get the item, rather than a 1 in 4 chance. For the quest you need to get 4 of these items, so you should have to kill an average of 16 spiders for this quest. For the last 3-5 times ive tested the map I have had to kill 25+ spiders in order to get the 4 item i need.

Does anyone have any idea what is going on?



And just another general question: Is this the best non-JASS item drop trigger that i can be using? I can't use item tables because I have a creep revive trigger... or can I? Are there better triggers that allow you to be more precise with the % chances without having to do something like this:
Set VARIABLE = random # between 1 and 100
Or Condtions:
If variable equal to 1
If variable equal to 2
if variable equal to 3
...etc
 

ShadowInTheD

Active Member
Reaction score
12
There's nothing wrong with that trigger. Remember, it's based off chance, you may have to kill 500230923509283590283 spiders in order to get all 4 items, or you may need just 4. As for better triggers, your trigger is about as short as it can be.
 

Zurtrogx

Active Member
Reaction score
24
Open the map.
Go to file => Preference => Test Map

Uncheck "Use Fixed Random Seed"

That may make a difference.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top