How do I make this Work?

XxShadyxX

I abused the rep system.
Reaction score
81
I am trying to make a simple loot and item drop system, but I can not figure out a way to make what I have work.

I made it into a catalog, if you don't know what a catalog is, it looks like this,
set integer = integer + 1
set variable[integer] to something
set integer = integer + 1
set variable[integer] to something else


For my system I want it to check when the trigger runs first the chance of drop, (this works fine)

Next it needs to run a loop from 1 - integer. (Integer as in the catalog integer)

Before i say the next part I have done this:
I set a integer to each item that is suppose to represent its level.

So thirdly i need the loop to check all the items and see if the corrisponding level equals to this formula, (Hero Level) - 5 to (Hero Level) +2
An example of that would be if the hero is lets say level 7 then...
the range of the item levels that would randomly drop would be any level from 2 - 9,

Following me so far?

Next i need the loop to drop a random item from that range of levels.


I know this may be a bit confusing. I will award +rep to whoever helps me!

Many Thanks,
XxShadyxX
 

N2o)

Retired.
Reaction score
51
>I made it into a catalog, if you don't know what a catalog is, it looks like this,

Catalog, basically an array, you could just do
variable[0] = Item
variable[1] = Item
variable[2] = Item

>Next it needs to run a loop from 1 - integer. (Integer as in the catalog integer)

Make an integer variable that equals the total number of items in the array
For Integer A from 1 - NumberOfItems Do actions

>Before i say the next part I have done this:
I set a integer to each item that is suppose to represent its level.

Do you mean you did something like this?
ItemLevel[0] = 1
ItemLevel[1] = 4
 

BlueMirage

Trust, but doubt.
Reaction score
39
What you're missing is the actions that drop the items right?

Then you should simply be able to use this:

Code:
Item - Create (Random level (Random integer number between 2 and 9) item-type) at (Whatever position))
Of course, replace the 2 and the 9 with (Hero level - 5) and (Hero level + 9).

Items can have levels set to them in the Object editor, so I really think you're overcomplicating it if you're giving them Integers through triggers.
 

XxShadyxX

I abused the rep system.
Reaction score
81
I think its more complicating if i have to go into the object editor and change all their levels...

Also I want to drop a random Item that is part of that catalog that is in the range of level.
 

BlueMirage

Trust, but doubt.
Reaction score
39
The object editor has the extra advantage of reducing mapspace and lag, and that's always good.
 
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