PDA

View Full Version : trigger help me plz


eg-muffin
12-06-2004, 7:22 PM
how do u make it so when two items are in your inventory that when u buy lets say a scroll it will transmute the items that it needs into a new item.

like as it is in enfos 2004 and some of the dota maps.

Sry if there is already one of these threads up i couldnt find one.

Thx ahead of answers.

xWinterBattleix
12-07-2004, 9:40 AM
sounds like diablo 2's cube transmussion.

XZminX
12-07-2004, 5:03 PM
Yes, it does sond like diablo :)

That is done very easily:
Create a trigger:
Events: Unit uses an item
Conditions: Item being manipulated equal to <your scroll>
Actions: Item - Remove <first item> from triggering unit
Item - Remove <socond item> from triggering unit
item - create <new item> for triggering unit

first item and second item are items that you want to remove from the prefered unit and the new item is the one to be "created" form the two items combined .......

You get it?

eg-muffin
12-07-2004, 6:18 PM
ya i do thank you.

XZminX
12-08-2004, 5:32 PM
.....np....

zunthor
12-09-2004, 11:49 PM
u dun have to make a condition for the items to be in ur backpack??

XZminX
12-10-2004, 7:14 AM
of course you have to, what's the use of the scroll then (if you have defined quantaty of scroll, you'd just waste it)
if the quantaty is unlimited, then if hero doesnt have needed items, nothing will occur

Before you replace items, you have to check if hero has needed items so that switch can be valid.

eg-muffin
12-11-2004, 10:24 PM
ok im having another problem now if u can help plz do


This is my trigger as it is:
--------------------------------------------------------------------------
heavy rocket launcher
Events
Unit - A unit Acquires an item
Conditions
(Item-type of (Item being manipulated)) Equal to Heavy rocket launcher formula
Actions
Item - Remove (Item carried by (Triggering unit) of type Rocket launcher)
Item - Remove (Item carried by (Triggering unit) of type Rocket launcher)
Item - Create Heavy Rocket launcher at (Position of (Triggering unit))
--------------------------------------------------------------------------
I would like it to automaticly put the created itme (Heavy rocket launcher) into an empty slot in heros inventory instead of on ground.

zunthor
12-12-2004, 1:13 AM
well.. it might not be the right way but works :P
ill write here as i made... just change the items...
(and think u should make different items to make a new)
--------------------------------------------------------------------------
Trigger For Transmute
Events
Unit - A unit Acquires an item
Conditions
((Item type of(Item being manipulated)) Equal to Gerard's Lost Ledger) and ((((Item carried by (Triggering unit) of type Mask of Death) is owned) Equal to True) and (((Item carried by (Triggering unit) of type Orb of Frost) is owned) Equal to true))
Actions
Item - Remove (Item carried by (Triggering unit) of type Mask of Death)
Item - Remove (Item Carried by (Triggering unit) of type Orb of Frost)
Item - Remove (Item carried by (Triggering unit) of type Gerard's Lost Ledged)
Item - Create Killmaim at (Position of (Triggering unit))
Unit Group - Order (Units owned by (Owner of (Triggering unit)) of type (Unit-type of (Triggering unit))) to Right Click (Last Created Item)
--------------------------------------------------------------------------

well... u have to make the condition that ur unit has the items otherwise the new item will be made even if u dun have the items... and i put it to delete the item 2.. and as u see... the unit will get the item.. it wont be created in his backpack... im not thinkin very well at this time... but it works :)
hope it helps !!!
:D
(ps: i used the first items i saw :P )

eg-muffin
12-12-2004, 11:56 AM
Thank you i will try it to c if it works


P.S teh items i put where just to test it and get it to work b4 i actually make the real ones.

XZminX
12-12-2004, 2:53 PM
Item - Create Heavy Rocket launcher at (Position of (Triggering unit))
--------------------------------------------------------------------------

That't the mistake.
It should be action:
<<<< Item - Create item for hero >>>> and at last it shoul look something like this:

Item - Create Heavy Rocket Launcher and give it to Triggering unit (your hero)

eg-muffin
12-12-2004, 4:03 PM
ok thx