Will not change ownership in this trigger?

troyboy

New Member
Reaction score
5
Hey guys.

I think the problem is that its in a loop?
It does the changing into spiders, but does not change the ownership?
Please Help


Code:
SPider convesion
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Spider Convertion 
    Actions
        Unit Group - Pick every unit in (Units within 600.00 of (Position of (Triggering unit)) matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is A Hero) Equal to False) and ((((Matching unit) is in UndeadRoyals) Equal to False) and (((Matching unit) is in Humanr and do (Actions)
            Loop - Actions
                Unit - Replace (Picked unit) with a Converted Spider using The old unit's relative life and mana
                Unit - Change ownership of (Picked unit) to (Owner of (Casting unit)) and Change color
 
N

night walker

Guest
troyboy im also new at this but u dont know ho to fix my problem with the trigers do u
 

Draphoelix

It's not the wintercold that's killing me
Reaction score
132
Just a wild guess. But try changing (Picked unit) to Last Replaced Unit and then Owner of Trigering unit

Code:
 Unit - Change ownership of (Last Replaced Unit) to (Owner of (Triggering unit)) and Change color
 
N

night walker

Guest
help is needed

i no i do not know many of u but will u find it in your hearts 2 help me with my triggers that get a red cross put through them when ever u try and save them plz:(:(:(:(:(:(:(:(:(:(:(:(
 

Draphoelix

It's not the wintercold that's killing me
Reaction score
132
night walker. Create a new thread and post the triggers, it's not easy to help you like this. Especially not in somebody's else thread.
 

wraithseeker

Tired.
Reaction score
122
Night walker, Do not emotion spam, that is not the purpose lol...

Troyboy,

Code:
Unit - Replace (Picked unit) with a Converted Spider using The old unit's relative life and mana
             [B]   Unit - Change ownership of (Picked unit) to (Owner of (Casting unit)) and Change color[/B]

The picked unit does not carry over to a replaced unit I guess.

You probaby have to do this, Not confirmed! and untested

Code:
set Dummy = Last replaced unit

put it in the middle of the two and try and see if your trigger works.

Or, for the easy and seemly hard way is to pick every unit to replace the unit type and then pick every unit again in the same position to change ownership.
 

Draphoelix

It's not the wintercold that's killing me
Reaction score
132
Code:
set Dummy = Last replaced unit

Why? Why can't you just use Last Replaced Unit directly instead of setting it into a variable?
 

cleeezzz

The Undead Ranger.
Reaction score
268
you can. either one, theres no benefit as setting it as a variable. Its just the idea that picked unit will no longer exist after being replaced. Also, if you just reverse the order of the 2 actions in the loop, it will work. (First change ownership, THEN replace picked unt)
 
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