View Full Version : item help plz!!
Eternal255
10-17-2005, 8:22 PM
ok ive tried for a while now and i still cant figure it out!
how do i make item effects not stack with similar items?
Ex:
Sowrd +1
can not stack with
Sword +2
??
ty
XZminX
10-21-2005, 5:02 PM
Make an array with field for each item type (or multiple variables) of type boolean.
When unit acquires an item, you set the coresponding variable to true. When the item is removed from inventory you set it to false.
Event - Unit acquires an item
Condition - Triggering item type Equal to true
Action - Drop triggering item from unit
Eternal255
10-21-2005, 11:42 PM
not really helpful, since itll just waste the persons money if they bought the item, or if they wanna sell it, they cant use it.
that and i have like a 100 items in my map.
anyways i got a different item question:
Random Drops
again remember i have 100+ items
and i dont have units in the map, they get spawnd by triggers. so i cant figure it out.
help asap would be awesome
XZminX
10-22-2005, 11:58 AM
You need to specify Random Drops. What do you want computer to do? You dont need units. You can manage everything with variables. When you create a unit, assign it to a variable and later the variable means that unit.
For 1st question: So you want player to be unable to buy a item of type that he already owns. That cant be done in easy way. (as far as I know) You need to make a trigger that does the following:
Event - Unit purchase an item
Conditions - Purchased item type == True (the variable, it means that you already have an item of that type)
Actions - Remove triggered item from unit
- Give the ammount of money the item costs to player
(if you have a delay in replenishing items, yuo need to iterate the stock value for that item)
it will all happen very fast, so it will look like nothing happened.
Eternal255
10-22-2005, 2:04 PM
well i found a much better way to do it, since my map is an rpg that requires u to have lots of items, but only able to use one at a time, i think my way is best
but thanks alot for the help
but im still kinda confused about the random drops....
not sure i quite understand wat u mean
lets say the game creats a unit after a trigger is activated, then u kill the unit created. how would i make it have like a 20% chance to drop an item, and then if does drop an item, the item that drops has like a 10% chance to be <item 1> and a 5% chance to be <item 2> etc
Zipsco
10-22-2005, 5:27 PM
Well, i don't remember if there is a built in feuture for this, but anyway, you could always make an array, that holds all items, and to make it in percent, you can add an item multiple times, though this does not help if you want some items to have like 0,02 % chance of dropping then i surgest:
set realrandom(var) = random real between 0.00 and creaturemax(var)
// creature max should in this case be the highest this creature is allowed to "roll"...
if (realrandom is less than or equal to 20.00) and (realrandom is greater than or equal to 10.00) create an item(which is this easy to get) else do nothing
//then continue:
if (realrandom is less than or equal to 25.00) and (realrandom is greater than or equal to 20.00(//or maybe if you could get 2 items, the first and this one in a case then for instance: 15.00, so that if you roll 17 you get both, see?) create an item(which is this easy to get) else do nothing
Go on and on :) anyway, with this system(of couse you need some stuffing, but this theory) you can do so that an item is easy to get, and that an item is impossible for low lvl creatures to drop, and also you can drop multiple items, in any case, you can add more things to the system like, make 1 copy of this for each item class you have, like rare, uncommon, common, unique aso. and then decide wether the person rolls on each of those aso.
The only problem with all of this, it's complicated, since you are creating a system from "base".
While writing this iam getting very anoyed... try looking under : Advanced -> item tables.....
Anyway... i have looked alittle at this, and it does not seem so obvious how to work with these tables... you can do what pleases you, but i can garanty a system you have made, will work as you want it, as a diffrence to the built in...
If you find out how to work with the tables, you could explain us ;), besides that, hope you find a solutions you like!
Zipsco
vBulletin® v3.7.2, Copyright ©2000-2008, Jelsoft Enterprises Ltd.