• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Instant buildings upgrade

Status
Not open for further replies.
Level 4
Joined
Nov 19, 2009
Messages
78
hello

i have 2 small issues:

1) two years ago, on my old PC, had a small trigger so that any player on map, computer or human, any race, would start directly with castle ( 3rd capital building upgrade )

i tried to re-create that trigger....but no chance :(
it was small, using just standard triggers and it worked great

can someone pls aid me with it ?

2) the file attached is a custom hero unit, named ,,Legion Warlock'' (derived off Eredar Diabolist )
he uses standard ability Drain Mana, standard ability Drain Life, Rain of Fire (modified) and standard ability Doom
by default, the ability ,,Rain of Fire'', when chosen, is placed in first position of the three buttons
i tried copying it, and changing its xy numbers, so it is displayed in the 3rd postion
thus, i would have:
Drain Life - 1st position
Drain Mana - 2nd position
Rain of Fire - 3rd position
Curse of Doom - 4th position

the standard abilities work great, they are all in their designated positions, regardless if they are chosen or not, and work great

BUT Rain of Fire is giving me headachaes!
When not chosen, it stays greyed out, nice, at 3rd position, as supposed to.
When chosen, it also stays in 3rd position, BUT when casted, it causes my hero to suicide !!!!!
why ?! EXCEPT xy numbers, havent ticked or changed anything!
 

Attachments

  • EredarWarlockH.mdx
    140.3 KB · Views: 55
1)
  • Trigger
  • Events
    • Time - Elapsed time is 0.00 seconds
  • Conditions
  • Actions
    • Player Group - Pick every player in (All players) and do (Actions)
      • Loop - Actions
        • Custom script: set bj_wantDestroyGroup = true
        • Unit Group - Pick every units in (Units owned by (Picked player) matching ((Matching unit) is a town-hall-type unit) Equal to True) and do (Actions)
          • Loop - Actions
            • If (All conditions are true) then do (Actions) else do (Actions)
              • If - Conditions
                • (Unit-type of (Picked unit)) Equal to Town Hall
              • Then - Actions
                • Unit - Replace (Picked unit) with a Castle, using the new unit's life and mana
              • Else - Actions
                • If (All conditions are true) then do (Actions) else do (Actions)
                  • If - Conditions
                    • (Unit-type of (Picked unit)) Equal to Tree of Life
                  • Then - Actions
                    • Unit - Replace (Picked unit) with a Tree of Eternity, using the new unit's life and mana
                  • Else - Actions
It should look like this.
 
Level 4
Joined
Nov 19, 2009
Messages
78
niiice :D

only one tiny problem !
with the Night Elves, once the Tree of Eternity appears, the gold mine is de-haunted, and reverts back to a not entangled state !

how do i re-entangle it instant, so it is just like when the NE start with Tree of life ? :D

many thanks
 
De-entangled you mean :p
Well, issue your unit to entangle it.
  • Set Point1 = (Position of (Last replaced unit))
  • Set TempGroup = (Units within 500.00 of Point1 matching ((Unit-type of (Matching unit)) Equal to Gold Mine)
  • Unit - Order (Last replaced unit) to Night Elf Tree of Life - Entangle (Random unit from TempGroup)
  • Custom script: call RemoveLocation (udg_Point1)
  • Custom script: call DestroyGroup (udg_TempGroup)
Reference for the custom script and their meaning:
http://www.hiveworkshop.com/forums/triggers-scripts-269/things-leak-35124/
 
Level 4
Joined
Nov 19, 2009
Messages
78
i tried what you said .... but it didnt worked :(

few questions, if i may ...

how did you defined Point1 and TempGroup ? what parametres ?

and ..... where do i place those last triggers ?
i tried putting them after the ,, Unit - Replace (Picked unit) with a Tree of Eternity, using the new unit's life and mana '' and nothing ...

tried putting them before too ....and still nothing !!!

so where does the last fragment of trigger go to be placed ? :(

thanks
 
In the Night Elf branch, under the replace action:
  • If (All conditions are true) then do (Actions) else do (Actions)
  • If - Conditions
    • (Unit-type of (Picked unit)) Equal to Tree of Life
  • Then - Actions
    • Unit - Replace (Picked unit) with a Tree of Eternity, using the new unit's life and mana
    • Set Point1 = (Position of (Last replaced unit))
    • Set TempGroup = (Units within 500.00 of Point1 matching ((Unit-type of (Matching unit)) Equal to Gold Mine)
    • Unit - Order (Last replaced unit) to Night Elf Tree of Life - Entangle (Random unit from TempGroup)
    • Custom script: call RemoveLocation (udg_Point1)
    • Custom script: call DestroyGroup (udg_TempGroup)
  • Else - Actions
You said it didn't work, but you are asking how the variables were set. Tell me, how did you set them? Point1 is a variable of type Point and TempGroup of type Unit Group.
 
Level 4
Joined
Nov 19, 2009
Messages
78
THATS exactly how i thought they are ! and made them !!!!

did you checked Array too ? i didnt

i have attached a screen-shot of the trigger !

you see the postion and the next text
 

Attachments

  • toplevel.jpg
    toplevel.jpg
    307.7 KB · Views: 55
Level 4
Joined
Nov 19, 2009
Messages
78
no

no :(

i attached a screen shot (just above your reply) and the map itself in this reply

it still wont work !!!!!
 

Attachments

  • (10)RagingStream - Night Elf Rule 1.w3x
    917.4 KB · Views: 23
Ok, I tested it and it now works. What I changed are:
1)
  • Set UnitGroup = (Units within 700.00 of Point1 matching ((Unit-type of (Matching unit)) Equal to Gold Mine))
As you can see, I increased the radius from 500.00 to 700.00.

2) Instead of Unit - Order (Last replaced unit) to Night Elf Tree of Life - Entangle (Random unit from UnitGroup), I used this:
  • Set Unit = (Random unit from Group)
  • Custom script: call IssueTargetOrder (GetLastReplacedUnitBJ(), "entangle", udg_Unit)
Notice, the gold mine must be visible to the player, otherwise it can't work.
 
Level 4
Joined
Nov 19, 2009
Messages
78
,,Set Unit = (Random unit from Group)''

in here... Unit is a new variable, type Unit, right ?
group ... is the old variable group, right ?

i m getting an error ... expected ,,end if'' and it disables the trigger
 
Level 4
Joined
Nov 19, 2009
Messages
78
YOUR custom script !

this is how the triggers look like now
i copy/ pasted what you wrote at that custom script WITH THAT unitBJ !!!!!

( i ran some tests, with and without it .... )

screen shot lacks it, but in reality it also has it .... it returns same error though
 

Attachments

  • toplevel.jpg
    toplevel.jpg
    310.2 KB · Views: 154
Level 4
Joined
Nov 19, 2009
Messages
78
i allready said i tested WITh BJ and WITHOUT

same thing happened !


EDIT: i restarted the editor ! now it no longer gives error, but the mine does not re entangle
 

Attachments

  • (10)RagingStream - Night Elf Rule 1.w3x
    917.4 KB · Views: 31
Status
Not open for further replies.
Top