Taking over remaining units function ?

Status
Not open for further replies.
Level 3
Joined
Aug 10, 2011
Messages
41
Hey people ! :D

im making a "fantasy life" kinda map. where there is a king etc. etc. just 1 prob is, i need to make this kinda "taking over function" where u get the last kings units.

example if blue has the crown and controlls the units. then red drops by and kill the king, he managed to take the crown and run to this "circle of power" which should change the owner blue units to red. now thats not a prob, the prob is that now red controlls the units. and if blue or teal comes and kills blue and gets the crown, i can´t make a trigger which should say something like this
  • -- Change the owner of units owned by the king to triggering unit---
PLUS ! i need to make sure that when u take the crown and enters the circle of power that you dont take over the "heroes" of the previous king but only the units and structures.

But i just dont how to do this. anyone have any suggestions ?

Regards ^^
 
This simple trigger should do what you want:

  • Actions
    • Custom script: set bj_wantDestroyGroup = true
    • Unit Group - Pick every unit in (Units in (Playable map area) matching (((Owner of (Matching unit)) Equal to playerLoser) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) is Hero) Not equal to True)))) and do (Actions)
      • Loop - Actions
        • Unit - Change ownership of (Picked unit) to playerWinner and Change color
Make sure you set the 'playerLoser' variable to player who actually lost crown, and the 'playerWinner' to one who took the crown.
 
Level 3
Joined
Aug 10, 2011
Messages
41
"simple trigger" :p

i am using the original wc3 editor. is it still possible with that, + do i need to make that "custom" thingy u did at the start ?
 
Custom script is required due to leak removal although you can always do so manually: Things that leak.

The script works and was written in standart wc3 editor :S
To use custom script action go: Actions -> from filter at the top of list choose 'Custom script', write down the code line I gave you - be carefully, it's key sensitive.

For Unit group action -> go Actions, from filter choose Unit Group section, press 'Pick every unit in Region Matching Condition', hold cursor on underlined (in red color) keyword 'Conditions' and double time choose 'And' (on the bottom of condition filter). Fill as written. Rest you probably know. Post me your map if you have troubles with such stuff, so I can do that myself and show you how simple it really is ;)
 
Level 3
Joined
Aug 10, 2011
Messages
41
Think i will just mail u the map. sounds like that this is alot easier to you than it is to me so... ^^

What´s your mail m8 ? i will send it eiter today or tomorrow :)
 
Level 3
Joined
Aug 10, 2011
Messages
41
I have Attached the map ^^ knock your self out m8 ;)

Quick description of the places u need to know ^^
i made a folder in the trigger section called "taking over function" where u can make the trigger. the crown item is in the custom items, and the region/place where the unit needs to go is inside the castle to the right. a small narrow room with fire and statues and a switch in the end of it. which is the one u need to get to WITH the crown in order to get ownership of the previous king units. :)

now your at it can u also make the trigger i have bin trying to make in this topic: http://www.hiveworkshop.com/forums/world-editor-help-zone-98/lose-lumber-over-time-201340/

Any questions then just type :D
 

Attachments

  • Fantasy Life Holmenlund.w3x
    5.2 MB · Views: 38
Last edited:
Next time post test map - not the whole project (map has 5+ mb), it sucks to implement/fix anything to such big map ;/

Anyways, triggers have been added (make sure you customize playerLoser/Winner variables). Additionaly: your map can be cut in half in case you need only 2% variables you are currently using + there is ton of possible improvements in Oject Editor stuff.
 

Attachments

  • Fantasy Life Holmenlund.w3x
    5.2 MB · Views: 31
Level 3
Joined
Aug 10, 2011
Messages
41
Hmm right thx alot m8 :D

those Playerwinner and loser what do i customize them to ?

plus how do i make the action to kill the player hero only and not the units in the lumber function ?

Damn i must admit this is some advanced shit for me haha ^^ im really glad to have you guys to help me ^^
 
Last edited:
Status
Not open for further replies.
Top