HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

item bonus trigger?

08-13-2003, 02:47 AM#1
311
how would I make a trigger where if I have a certain 6items I get a bonus? I cant think of the event, there's no event that says has item, also when 1event happens the trigger just starts, so I cant just add aquires 6different items into the event. I want somthing like this

event
condition: has set items 1 2 3 4 5 6
action: add +20 to all stats

also I will need a trigger from abusing this somehow, as in I cant drop the items then get +20again and again, I would need it so you only get the bonus when you have them on, hope someone can help, I cant think of the event at all :( thanks.
08-13-2003, 02:54 AM#2
badomen
periodic-every0.5 sec of a game

would be the event
make the item undropable to avoid xploit...

this may not be what your looking for though.... if not i need more info to answer it..
08-13-2003, 02:57 AM#3
badomen
event:time-periodic event (every -5 sec)
cond: has set items 1,2,3,4,5,6
boolean (unit is in unit group XXX = false)

action: add + 20 stat
add unit to unit group XXX(unitgroup XXX is variable)
08-13-2003, 03:04 AM#4
311
ok that would almost work, however if I remove the items I will still have the bonus. So I could just get the bonus then drop em all then get some other set, get the bonuses frm that thanks, its comming close :)
08-13-2003, 03:14 AM#5
badomen
could you do this

A1
event:unit drops item
cond item of type (1-6)
action:if- unit in unitgroup XXX
then-remove +20 all stats
else-do nothing
unit:remove from unit group XXX

and to the other trigger add "turn on trigger (A! trigger)

something like that
08-13-2003, 03:18 AM#6
311
ok cool thanks........... however I have a small problem on condition now lol, on the unit has item, what unit is it? There is no triggering unit so what do I put as (?unit has items 1-6). btw thanks 4 helping so fast :)
08-13-2003, 03:26 AM#7
badomen
item comparison

value(1)- equal to -(2)value

(1)item carryed by unit of type....help?
08-13-2003, 03:41 AM#8
311
I still dont get it unit of type what? I have like 12heros you can choose from, do I needa put alot of or conditions or somthing?

event: every 2secs
condition: hero has item 1
and hero has item 2
and hero has item 3
and hero has item 4
and hero has item 5
and hero has item 6
condition: hero is xxxvarriable = to false
action: add 20str
action: set hero as xxxvariable


k now the word hero^, who is that? i cant do unit of type, because there are many units that could carry these items, like 12 different heros that could possbly get the sets. Also I notcied in the has item trigger, it says has item in slot 1, is there a way to make it any slot? I dont want to need to arrange them a certain way that sounds kinda dumb
08-13-2003, 03:45 AM#9
badomen
when they choose there hero could you add it to some kinda veriable? you could send me you map (if you trust me :) and i will c what i can do...
08-13-2003, 08:43 AM#10
Krakou
I would do it that way:

First after the hero is choosen put it in a variable called Hero.

Trigger1:

E:
A unit acquires an item
C:
Triggering unit = Hero
Item beeing manipulated = item1 or item2 or... item6
Action
Set custom value of Hero = custom value of Hero + 1
If custom value of Hero = 6 then do add 20 to all stats

Trigger2:

E:
A unit lost an item
C:
Triggering unit = Hero
Item beeing manipulated = item1 or item2...
A
Set custom value of Hero = custom value of hero - 1
If custom value of Hero = 5 then do add -20 to all stats

I use the value of 5 to decrease the stats because if after loosing an item the value is 5 that means he had 6 items right before and had received the bonus.

You should also add some checks to avoid that the hero carries more than one item1 or item2...