Ownership changes

  • Thread starter Thread starter Vilham
  • Start date Start date
V

Vilham

Guest
Event:
-Unit - Castle 0040 <gen>'s life becomes Less than 300.00
Conditions:
-None
Actions:
-Unit Group - Pick every unit in (Units owned by (Owner of Castle 0040 <gen>) matching (((Picked unit) is A structure) Equal to True)) and do (Unit - Change ownership of (Picked unit) to (Owner of (Attacking unit)) and Change colour

This trigger isnt working for some reason could some one please tell me why it isnt working. I have tried changing all the 'Picked unit'/'Attacking unit' parts to other possible things. Thank you
 
Vilham said:
Event:
-Unit - Castle 0040 <gen>'s life becomes Less than 300.00
Conditions:
-None
Actions:
-Unit Group - Pick every unit in (Units owned by (Owner of Castle 0040 <gen>) matching (((Picked unit) is A structure) Equal to True)) and do (Unit - Change ownership of (Picked unit) to (Owner of (Attacking unit)) and Change colour

This trigger isnt working for some reason could some one please tell me why it isnt working. I have tried changing all the 'Picked unit'/'Attacking unit' parts to other possible things. Thank you

You could make it Owner of attacked unit <gen> that might work :)
 
how about u do that:
-Unit - Castle 0040 <gen>'s life becomes Less than 300.00
COndition
Action:
Add Event Castle 0040 gen is attacked
set attack = attacking unit
them actions
 
You realize this only runs once right?

It will only run one time when your castle drops below 300. It will not continue doing it for as long as the tower is below 300. It is a one time conversion.

ThySpektre

Vilham said:
Event:
-Unit - Castle 0040 <gen>'s life becomes Less than 300.00
Conditions:
-None
Actions:
-Unit Group - Pick every unit in (Units owned by (Owner of Castle 0040 <gen>) matching (((Picked unit) is A structure) Equal to True)) and do (Unit - Change ownership of (Picked unit) to (Owner of (Attacking unit)) and Change colour

This trigger isnt working for some reason could some one please tell me why it isnt working. I have tried changing all the 'Picked unit'/'Attacking unit' parts to other possible things. Thank you
 
Actually, it will run every time something happens to its life. If, of course, the life is still less than 300.

However, he uses "picked unit" instead of "matching unit" inside his "matching ...".
And, there simply is no "attacking unit" for the given event.


Imagine 10 different player beating at that castle.
Once it's below 300, it'll change owner on every hit... ;)
Together with every building owned by the current castle owner.
 
AceHart said:
Imagine 10 different player beating at that castle.
Once it's below 300, it'll change owner on every hit... ;)
Together with every building owned by the current castle owner.


that ='s lagggg :eek:
 
AceHart said:
Actually, it will run every time something happens to its life. If, of course, the life is still less than 300.

I didn't know that! Thanks for the correction AceHart.

ThySpektre
 
AceHart said:
Actually, it will run every time something happens to its life. If, of course, the life is still less than 300.

However, he uses "picked unit" instead of "matching unit" inside his "matching ...".
And, there simply is no "attacking unit" for the given event.


Imagine 10 different player beating at that castle.
Once it's below 300, it'll change owner on every hit... ;)
Together with every building owned by the current castle owner.

So i need to change the 'picked to matching' but how do i make it so that it changes ownership to the attacking player and will that stop the units attacking when it changes, cause if loads of allies are attacking it will keep chaging.
 
Restore the health of the tower when the owner changes.
Maybe turning off the trigger when it fires would do.
 
Something like this maybe:

Code:
Events
    Unit - Castle <gen> Is attacked
Conditions
    (Life of (Attacked unit)) Less than 300.00
    (Owner of (Attacked unit)) Not equal to (Owner of (Attacking unit))
    (Attacking unit) Not equal to No unit
Actions
    Trigger - Turn off (This trigger)
    Unit Group - Pick every unit in (Units owned by (Owner of (Attacked unit)) matching (((Matching unit) is A structure) Equal to True)) and do (Actions)
        Loop - Actions
            Unit - Change ownership of (Picked unit) to (Owner of (Attacking unit)) and Change color

With an event that actually has an "attacking unit", and it only runs once.
 
AceHart said:
Something like this maybe:

Code:
Events
    Unit - Castle <gen> Is attacked
Conditions
    (Life of (Attacked unit)) Less than 300.00
    (Owner of (Attacked unit)) Not equal to (Owner of (Attacking unit))
    (Attacking unit) Not equal to No unit
Actions
    Trigger - Turn off (This trigger)
    Unit Group - Pick every unit in (Units owned by (Owner of (Attacked unit)) matching (((Matching unit) is A structure) Equal to True)) and do (Actions)
        Loop - Actions
            Unit - Change ownership of (Picked unit) to (Owner of (Attacking unit)) and Change color

With an event that actually has an "attacking unit", and it only runs once.

Cheers!

PS how do i do the code thingy??
 
The code "thingy" is the "#" button at the top of the message window.
Or, just type it by hand: [ code ] and [ /code ] (without the spaces).

To copy a trigger, right-click its name, "copy as text", then paste it here.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    got it
  • The Helper The Helper:
    Happy Thursday!
  • The Helper The Helper:
    Check out the new Featured Content feature we apparently got with the forum software upgrade! https://www.thehelper.net/featured/
  • The Helper The Helper:
    Also on the bottom right side bar we now have a Trending Content Box!
    +1
  • The Helper The Helper:
    Not on the Headline News page just on the Forums page can we get that Featured and Trending on the home page?
  • Ghan Ghan:
    Since the home page is technically a forum, it now shows on all forum views. Still in the sidebar.
    +1
  • The Helper The Helper:
    Happy Friday! Hope everyone has a fantastic day and an even better weekend!
  • The Helper The Helper:
    Happy Sunday!
  • The Helper The Helper:
    I lovc that I can post webp and X links now! :)
  • The Helper The Helper:
    Happy Thursday!
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    we were down for a minute - think a log file or something got too big
    +1
  • Ghan Ghan:
    The alerts say it was down for a while unfortunately.
  • Ghan Ghan:
    Didn't know what was going on while I was at work.
  • Ghan Ghan:
    Disk filled up with logs. Fixed now.
    +1
  • The Helper The Helper:
    not a problem at all thanks for getting us back up
  • The Helper The Helper:
    I think the bots are finding a way to get through the anubis
  • The Helper The Helper:
    Happy Wednesday Everyone! Hope everyone has a Fantastic Day!
    +1
  • The Helper The Helper:
    Yeah, stats are showing big bot influx like 12k page views.
  • Wizard Wizard:
    :wave:
    +1
  • Ghan Ghan:
    TH changed his avatar again. 6 more weeks of summer.
    +3
  • Wizard Wizard:
    lol
    +1
  • The Helper The Helper:
    Guys just a heads up I am going to be shutting the site down soon. I am just waiting on the NUON people to decide whether they want to transfer forum data and keep the discord. My email is [email protected] for anyone that wants to keep in touch and I have a facebook too. I will make an official post later. Love you guys and will miss everyone!
    +1
  • V-SNES V-SNES:
    Sent a pm @The Helper

The Helper Discord

Members online

Affiliates

Hive Workshop NUON Dome World Editor Tutorials
Back
Top