Regional Superman Trigger Trouble

SilverScreen

New Member
Reaction score
2
MERRY CHRISTMAS and HAPPY HOLIDAYS EVERYONE!

M'kay, I've been agonizing over this for two days, and either it can't be done, or, more than likely, it just requires someone who knows what they're doing.

I've created ArthasX--a beefed up, leveled up version of Arthas. The game starts with Arthas, but when he dies, he is revived in Region C...as ArthasX! (Names are a work in progress.) But once ArthasX leaves Region C, he is supposed to revert back to normal Arthas.

...It's not happening that way at all.

I've been able to handle the simple task of having Arthas revive in Region C, and I've even been able to convert him into ArthasX after that--but it's not region-based. Once he leaves the region, he remains ArthasX.

I tried doing a trigger for the resurrection, then a trigger that says when a unit is in Region C, it is replaced by a ArthasX (Region C cannot be accessed by any other unit--it's a resurrection-accessible only area), but for some reason it creates a TON of ArthasX's instead of just one.

I tried working it so that when Arthas was down to 25 (or less) hitpoints he would be replaced by Arthas X, but then I can't do anything with ArthasX 'cause he's not in the game yet.

That seems to be my main problem thus far. Everything I want to do requires me to select the unit from the map, which is an issue for ArthasX since he doesn't exist unless a condition later in the game is met. Every option I've tried is screwed by this.

Any thoughts? Revive Arthas at Region C, replace him with ArthasX as long as he's in Region C, and then have him revert back to Arthas when he leaves Region C.

Doable? Something simple I'm missing?
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
i would recommend following method.

i guess your arthas is a hero. heroes got exp, items, buffs maybe etc. replacing heroes or copying them is much work. a simple solution for this is the chaos ability. this ability is being made for exactly this purpose (remember the orc campaign when grom is being possessed).

1). create 1 copys of the chaos ability both without techtree requirements. the first one will morph the unit into arthasX the second one into the regular arthas.

2). create a trigger which will make arthas revive when he dies and move him to the centre of region C.

3). create another trigger which fires whenever a unit enters region C. add the chaos(1) ability to the triggering unit

4). create a trigger which fires whenever a unit leaves region C. add the chaos(2) ability to the triggering unit

trigger 1 example:
Trigger:
  • Untitled Trigger 001
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Arthas
    • Actions
      • Set TmpPnt = (Center of RegionC)
      • Hero - Instantly revive (Triggering unit) at TmpPnt, Hide revival graphics
      • Custom script: call RemoveLocation (udg_TmpPnt)


trigger 2 example:
Trigger:
  • Untitled Trigger 002
    • Events
      • Unit - A unit enters RegionC
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Arthas
    • Actions
      • Unit - Add Chaos(1) to (Triggering unit)


trigger 3 example:
Trigger:
  • Untitled Trigger 003
    • Events
      • Unit - A unit leaves RegionC
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to ArthasX
    • Actions
      • Unit - Add Chaos(2) to (Triggering unit)
 

SilverScreen

New Member
Reaction score
2
Wow! That's some thorough triggering for sure! Now I don't feel so bad about not figuring it out on my own.

Thank you a bunch! I'll work on it and see if I can't duplicate it on my end. I'll letcha know how it turns out.

I appreciate you being so specific too--I'm too new to the whole thing to get general ideas.

Terrific! Kudos to you all!
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
if you are new to warcraft III coding you may wonder about this part:
Trigger:
  • Untitled Trigger 001
    • Events
      • ...
    • Conditions
      • ...
    • Actions
      • Set TmpPnt = (Center of RegionC)
      • ...
      • Custom script: call RemoveLocation (udg_TmpPnt)


i am setting a point variable called TmpPnt (you can create variables in the variable Editor, its a golden X in the toolbar) instead of directly using the center of the region as a point.
this is to prevent memory leaks. thats why i also use the line of custom script (basically Jass script taken into the GUI interface) to remove that variable again.

if you dont know about memory leaks you should really start reading some turtorials about it, like this one.


its important to prevent memory leaks in all triggers which are running numerous times in the game. if you dont take care of them your game might start to lag and eventually lag that hard that the game freezes.

good luck with your triggers.
 

canons200

New Member
Reaction score
50
To Accname,
what is this chaos ability does? some people say it exist doesn't make any different =.='
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
open the ability editor. open the "human" tab on "unit abilitys" and there it is, chaos of the siege tank.

the chaos ability is pretty simple, it got only a single effect. if a unit gains it the unit will be transmorphed into another unit, the new unit type is declared by the chaos ability. the morphed unit will still have the same exp, items, hitpoints (not max hitpoints), attributes, main attribute, abilitys, hero points, position, facing, and so on and so on.
its basically the best way of replacing a unit type with another because thats the purpose this ability has been made for.

if you played the reign of chaos campaign you will most likely remember the orc mission in which grom and his orcs are drinking the demonic blood. they all turn red and become powerhouses and such.
this is done using the "chaos" ability.
 

SilverScreen

New Member
Reaction score
2
M'kay...I've got some of it to work, which is great--the chaos was a swell idea. I think my trouble is with regions. For some reason, they aren't doing what their supposed to. I started experimenting with them, and I think I'm doing something wrong. Just as a test, I tried to add "Heavy Rain" to a region in the properties section, and it shows up in the editor, but not when I play the map.

I also tried to assign some very easy triggers to the region and those didn't work. I can revive the hero in the region, but the enter/leave region triggers don't do anything. Is there something I need to change to "activate" the regions or something?

Thanks again to everyone for their help--I'm gett'in close!
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top