Travelling Merchant

D

Deviant Sin

Guest
*Light-Bulb Effect*

What I was thinking is that you could make this into a multi-trigger function.

A: Every 30 seconds
C:
E: Move "Unit(Preset Merchant)" instantly to "Region1"

A: Every 50 Seconds
C:
E: Move "Unit(Preset Merchant)" instantly to "Region2"

A: Every 80 Seconds
C:
E: Move "Unit(Preset Merchant)" instantly to "Region3"

Something like that, You'd have to figure out what time variables to use to give desired effect but, in theory, this should work. 30 seconds pass, he moves to R1. 50 seconds pass, he moves to R2. 10 seconds after that, he'd move back to R1. 20 seconds later he'd move to R3.
Catch my drift? This simulates a somewhat random effect to the problem.
 

DM Cross

You want to see a magic trick?
Reaction score
567
Um, thanks deviant, but i've already gotten that problem solved...however, the current problem is the following:
The merchant sells 5 artifacts
i want these 5 artifacts to be part of a set
if a hero owns all 5, he turns into the 'avatar' a very strong hero

However, it isn't working too well, as I can't get the goddamned thing to transform into the avatar!
 
D

Deviant Sin

Guest
Hrm.... :) Sorry I couldn't come up with the solution to the moving of the merchant before but, I've got alot on my plate playing with the triggers in my map :D . I'll work on your problem some more soon.
 

DM Cross

You want to see a magic trick?
Reaction score
567
Bumping this up because I don't want to have to go looking for it, I still need my question answered, and because it's getting off the page...

So bump bump bump

Alexander

_-_Edit-_-

Yay, 100+ posts! Woo, go me! ... Yeah, alright, I'm done -.- Stop looking at me like that!
 

Rinpun

Ex TH Member
Reaction score
105
SilverHawk said:
You can't say triggering unit, because it refers to the triggering unit of an event, which you don't have. I would rewrite it like this:

E:
Unit acquires an item.
C:
Triggering unit has item of type <armor piece 1>
Triggering unit has item of type <armor piece 2>
Triggering unit has item of type <armor piece 3>
Triggering unit has item of type <armor piece 4>
Triggering unit has item of type <armor piece 5>
A:
Replace triggering unit with Avatar.

This should work, just remember to put those conditions in an And. Just in case, I also suggest making a condition before the And that the triggering unit is a hero. Aka:

Code:
AvatarChange
    Events
        Unit - A unit Acquires an item
    Conditions
        ((Hero manipulating item) is A Hero) Equal to True
        And - All (Conditions) are true
            Conditions
                ((Hero manipulating item) has an item of type Armor1) Equal to True
                ((Hero manipulating item) has an item of type Armor2) Equal to True
                ((Hero manipulating item) has an item of type Armor3) Equal to True
                ((Hero manipulating item) has an item of type Armor4) Equal to True
                ((Hero manipulating item) has an item of type Armor5) Equal to True
    Actions
        Item - Remove (Item carried by (Hero manipulating item) of type Armor1)
        Item - Remove (Item carried by (Hero manipulating item) of type Armor2)
        Item - Remove (Item carried by (Hero manipulating item) of type Armor3)
        Item - Remove (Item carried by (Hero manipulating item) of type Armor4)
        Item - Remove (Item carried by (Hero manipulating item) of type Armor5)
        Unit - Replace (Hero manipulating item) with a NewAvatar using The old unit's relative life and mana

You might need to consider just creating a unit at the position of the triggering unit and deleting the triggering unit.

I think the error is in that the game doesn't know what to do with the items already on the hero and so just cancels the whole thing.

Right now, I'm trying to think what to do with that 6th item on the hero...I think it'd be best if you changed it to needing 6 pieces of equipment, not 5, lest you bug the thing.
 

DM Cross

You want to see a magic trick?
Reaction score
567
Hmm, could i make a variable for the items? so that i could do something similiar to:

unit has item1 of array
unit has item2 of array
unit has item3 of array
unit has item4 of array
unit has item5 of array

Turn unit into avatar

also, where is this "Triggering unit has item of type <armor piece 1>" like condition? the closest i can find is the "Item Comparison" condition (value equal to value) which has done nothing but confuse the living hell out of me!

Grr, i feel like such an idiot, why can't i FIGURE THIS OUT?!
 

Rinpun

Ex TH Member
Reaction score
105
That's because it's a Boolean comparison. Look there :D:D:D

Alright, try this:

Code:
AvatarChange
    Events
        Unit - A unit Acquires an item
    Conditions
        ((Hero manipulating item) is A Hero) Equal to True
        And - All (Conditions) are true
            Conditions
                ((Hero manipulating item) has an item of type TheSpecialItems[0]) Equal to True
                ((Hero manipulating item) has an item of type TheSpecialItems[1]) Equal to True
                ((Hero manipulating item) has an item of type TheSpecialItems[2]) Equal to True
                ((Hero manipulating item) has an item of type TheSpecialItems[3]) Equal to True
                ((Hero manipulating item) has an item of type TheSpecialItems[4]) Equal to True
    Actions
        For each (Integer A) from 0 to 4, do (Item - Remove (Item carried by (Hero manipulating item) of type TheSpecialItems[(Integer A)]))
        For each (Integer B) from 1 to 6, do (Hero - Drop (Item carried by (Hero manipulating item) in slot (Integer B)) from (Hero manipulating item))
        Unit - Replace (Hero manipulating item) with a No unit-type using The old unit's relative life and mana

TheSpecialItems is a 0 to 4 item type variable array. At Initialization, set each number to whichever piece of special armor you like. Either way, this trigger should work.

In case you're wondering, then second For loop drops whatever item (should do nothing if the slot is blank) from every slot the unit has on him.

Voila, the game will no longer be wondering what it has to do with the items from the old unit.
 

DM Cross

You want to see a magic trick?
Reaction score
567
actually, i tried your first one...and it WORKED! though, i feel the need to apologize to everyone who's been helping me and it not working because i'm an idiot who was using the wrong conditions -.- anyway, THANK YOU THANK YOU THANK YOU! Ringpun, for you're help, you're officially 'father of the avatar' in the credits, lol... (btw, i already wrote those, look at that thread to see)
 

Rinpun

Ex TH Member
Reaction score
105
Heheh, no problem :D

Try the second trigger. It'll work and it's much more clean...if you spare the bother of 5 lines in the initialization trigger like I mentioned.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top