HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Item Custom Value

03-17-2006, 05:14 PM#1
kaldoreielf
Is there any way to change the custom value of an item, when the item isnt in the map yet?
03-17-2006, 09:00 PM#2
BBDino
So you want to change the custom value of an item that doesn't yet exist?

It should be fairly obvious that that is not going to work...
03-17-2006, 09:14 PM#3
karukef
As BBDino says, it's hard to set a custom value for an item that doesn't exist.

Until you actually create an item, all you have are item types. You cannot set a custom value for an item-TYPE, only for a specific EXISTING item.

What are you trying to do btw?
03-17-2006, 09:40 PM#4
kaldoreielf
lol, ok the item DOES exist, its just that I dont want it to be placed on the map then set the custom value. what I am trying to do is, I have a fishing system, and a Real Variable, which is the level of the ability and if you are lvl 10 there are 3 kinds of fish you can catch, I was wondering how to go about giving the lvl1 fish a higher chance to get than the lvl10 fish, and someone mentioned custom values...
03-17-2006, 09:46 PM#5
Captain Griffen
You're making no sense.

You could use item HP for a sort of custom value for all items of that type.
03-17-2006, 10:26 PM#6
PerfectlyInsane
well you will first need to have a Interger variable array for the hero level of the fisherman


Best to set the default value to 1 , so you wont be so confused but using 0 is fine as well


Each time a hero levels you would set that array

Value = Value + 1 for the leveling player


you'd need a second trigger now that does the calcuations of what fish you catch


Event
------

COnditions

Action
--------------
If then else
If Value = 1 then
Do
blah blah
Else
DO nothing

and do it for all the other Hero Levels



As for the Blah Blah. you'd need an item array. I reckon you can use one for all levels. You would then add..

LvL1 fish say for 1-50 (You can add each type of fish say (starfish) more than once
Lvl2 fish say for 51-80
Lvl3 fish say for 81 -100

Now if your Level 1 the random number you generate would be say 1-61. So you have a small chance of catching a lvl2 fish as the if your random number is > than 50, and you have have a no chance of cathicng a level 3 fish

You might add in 1 fish thats out of its place. say make 60 a lvl3 fish. so you have a very tiny chance of catching a level 3.

If your Hero is level two you might want to use a larger random number say 1-100

Either way all you have to do is create an item and give it to the triggering hero.
03-17-2006, 10:37 PM#7
Lucavixp
This is easy! Alls you need to do is make some simple triggers (I am working on this very system for my own game "Azeroth Crossing", see the map projects forum).

Basically, you have to set the variable (like you have) but make it an interger for simplicity's sake. Now you need the following variables:

"f_level" - integer - This is the level of the fish caught
"f_percent" - integer - This is used to determine what fish is caught

You need to make the following triggers:

Trigger - Go Fishing
Event: [unit] begins casting a skill
Conds: [triggering skill] is of type = Fishing Skill
Actions:
if/then/else multiple
IF

level of [triggering skill] = 1
THEN

set variable "f_percent" = random(0-100)
if/then/else
IF

"f_percent"<= 25
THEN

"f_level" = 1
ELSE

do nothing
if/then/else
IF

"f_level" = 1
THEN

give [triggering unit] 1 Level 1 Fish item
ELSE

do nothing
skip remaining actions
ELSE


Obviously, add more if/then/elses for each fish level. Should I write a better tutorial and submit it with a map?
03-17-2006, 10:59 PM#8
kaldoreielf
too many if/then/else :S hmm Ill try them later. Maybe you should make a tutorial...
03-17-2006, 11:05 PM#9
Thunder_Eye
Lucia, please use the trigger tags