How would I do this type of thing? -1 reply

Please wait...

mswolfe

I hear voices in my head.....

50 XP

21st July 2006

0 Uploads

12 Posts

0 Threads

#1 12 years ago

I am currently trying to make normal melee maps more RPG-like, by adding extremely rare items that only appear once, randomly after killing an extremely strong monster.

You cannot buy any of these items in a store, and there will be special creeps in each maps that are improved in stats in order to make them appear more like a boss character. For example, in a group of Dire Wolves creeps, I'll change one to be a Pack Leader, with doubled attack power, 33% higher movement speed, and 35% larger then a normal Dire Wolf. The Pack leader would carry one of these rarer items, so that players get more of a bonus for killing these things. Don't worry about the player keeping the item though, because once they pick it up, it's open season on them from every other player to kill that hero and claiming the trophy.

How would I set up the triggers so that once one of these rare items are dropped from a monster, the items will never spawn again?

Secondly, I'm trying to pull off something similar to what I saw in many RPG maps, and try to set up combination item creation triggers.

My idea is for two rare swords, Romulus and Remulus, to be scattered around the map using the method I mentioned previously. If a hero can posess both of these items at once then the two items will merge into (Gemini Blades) one item that is more powerful then if you carried the two seperately.

How would I set the triggers to alert the system that a player has picked up/dropped one of the swords, in order to activate the combination when the other sword is picked up by the same hero?

Hope someone can help me,




beier

TFT

50 XP

15th October 2004

0 Uploads

41 Posts

0 Threads

#2 12 years ago

For the first one i would suggest you make something like this..

Variables

Variable name Variable type Initial Value ItemHasDropped Boolean False

Trigger

Events Unit - A unit dies

Conditions ItemHasDropped Equal False

Actions Set ItemHasDropped = True Item - Create YourOwningItem at (possition of (dying unit)

If you want it to be possible to drop more, just make the variable an integer with the initial value 0, and the condition that that integer must be less then your number for max drops, and in actions you set the integer = the integer +1.

For the second..

Events Unit - A unit Acquires an item

Conditions Or - Any (Conditions) Are true (Item-type of (Item carried by (Triggering unit) in slot 1)) Equal to Sword1 (Item-type of (Item carried by (Triggering unit) in slot 2)) Equal to Sword1 (Item-type of (Item carried by (Triggering unit) in slot 3)) Equal to Sword1 (Item-type of (Item carried by (Triggering unit) in slot 4)) Equal to Sword1 (Item-type of (Item carried by (Triggering unit) in slot 5)) Equal to Sword1 (Item-type of (Item carried by (Triggering unit) in slot 6)) Equal to Sword1

Or - Any (Conditions) Are true (Item-type of (Item carried by (Triggering unit) in slot 1)) Equal to Sword2 (Item-type of (Item carried by (Triggering unit) in slot 2)) Equal to Sword2 (Item-type of (Item carried by (Triggering unit) in slot 3)) Equal to Sword2 (Item-type of (Item carried by (Triggering unit) in slot 4)) Equal to Sword2 (Item-type of (Item carried by (Triggering unit) in slot 5)) Equal to Sword2 (Item-type of (Item carried by (Triggering unit) in slot 6)) Equal to Sword2

Actions Item - Remove (Item carried by (Triggering unit) of type Sword1) Item - Remove (Item carried by (Triggering unit) of type Sword2) Hero - Create Sword3 and give it to (Triggering unit)




mswolfe

I hear voices in my head.....

50 XP

21st July 2006

0 Uploads

12 Posts

0 Threads

#3 12 years ago

thank you thank you thank you thank you!!

:bows::bows::bows:

While still on this question, would that type of coding also work for combination items that require 3 or more items?

thank you again




Eleandor

No User title

50 XP

27th July 2004

0 Uploads

548 Posts

0 Threads

#4 12 years ago

I think yes, but I'd do it this way (because I aint sure this will work... nt completelly sure, at least)

Conditions: And - All conditions are true --> and then both (or all 3) of the "or conditions)

and yes, this should work too with 3 items...

by the way, idk but aint it romulus and remus?




mswolfe

I hear voices in my head.....

50 XP

21st July 2006

0 Uploads

12 Posts

0 Threads

#5 12 years ago
by the way, idk but aint it romulus and remus?

You're most likely right, but I wasn't totally sure. I guess I'll check on wikipedia to find out how it's really spelled.

thank you both so much for the scripting suggestions.

Actually you are right, I just read online that is is Remus, not Remulus.




mswolfe

I hear voices in my head.....

50 XP

21st July 2006

0 Uploads

12 Posts

0 Threads

#6 12 years ago

Lol I just found a condition which I think eliminates the need for conditions checking for which slot the item is in (I read some fine print).

By using these two conditions

1. (Item Type of (Item being manipulated)) equal to *desired item*

2. (Owner of (Hero manipulating item) is equal to user) Or (Owner of (Hero manipulating item) is equal to computer)

The second condition is put in to make sure that creeps don't accidentally trigger these.

So I think these two would eliminate a lot of unnecessary conditions.

Please tell me what you think.




beier

TFT

50 XP

15th October 2004

0 Uploads

41 Posts

0 Threads

#7 12 years ago

you need to make shure he has both items b4 he gets that great 3rd sword.. so just (Item Type of (Item being manipulated)) equal to *desired item* wont work, unless it just need one sword for the trigger to run.. i donno if saying (Item Type of (Item carried by hero of type *desired item*)) equal to *desired item* will work though.. but would say that what i posted earlier is the bedst solution..