Regional Dispute

SilverScreen

New Member
Reaction score
2
Hello again, all!

In my map, I have four regions set up; two of them are set up to be revive points for fallen heroes. One of them is a "leave region" thing, the last one is supposed to be a waygate transport point.

Everything behaves exactly as it is supposed to, until I add the waygate region. Once I do that, the heroes get revived at the waygate location! Sometimes you'll see them flicker in the correct location...then they are gone.

Once I remove the waygate region, everything works right again.

Is this typical? Can there only be so many regions before the computer gets all confused?

As I said, without the waygate region, the triggers n' all work fine and the Heroes revive where they're supposed to.

Thanks for the help!
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
Post your triggers, maybe your values are overwritten by each other.
 

Nenad

~Choco Coronet~ Omnomnom
Reaction score
137
RightClick On the Trigger in the Trigger Editor and go Copy as text, then wrap the a
Trigger:
  • tag around it ^^
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
In the trigger area, right at the top, right click that blank paper image and select copy as text. Then over here, include [noparse]
Trigger:
[/noparse] tags at the start and end of the pasted text. Like this

Trigger:
  • Copied text


Edit: Answered a few seconds late. o well. And the image is
wc3tag.gif
 

SilverScreen

New Member
Reaction score
2
Aha! Thanks!

Well, here goes...


Trigger:
  • Jaina
    • Events
      • Unit - Jaina 0226 <gen> Dies
    • Conditions
    • Actions
      • Wait 3.00 game-time seconds
      • Hero - Instantly revive Jaina 0226 <gen> at (Center of Jainas revival <gen>), Show revival graphics
    • Jaina Revival
      • Events
        • Unit - A unit enters Jainas revival <gen>
      • Conditions
        • (Unit-type of (Triggering unit)) Equal to Jaina
      • Actions
        • Wait 2.00 game-time seconds
        • Unit - Replace (Triggering unit) with a Revived Jaina using The new unit's default life and mana


I use the same triggers for the other Hero, except that the revival point is a different region.

I don't have a trigger for the waygate because I just selected the target region (named "waygate destination") in the waygate property menu.

If I need to include anything else, just lemme know. Thanks for taking a gander.
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
Post different triggers in different [noparse]
Trigger:
  • tags[/noparse] like that
    • <div class="bbCodeBlock bbCodeBlock--screenLimited bbCodeBlock--code"><div class="bbCodeBlock-title">Trigger:</div><div class="wc3trigger"><ul class="wc3" id="wc3_5">
    • <li class="lasttree"><span class="default">Yo</span></li>
    • </ul>
    • </div></div>
    • <div class="bbCodeBlock bbCodeBlock--screenLimited bbCodeBlock--code"><div class="bbCodeBlock-title">Trigger:</div><div class="wc3trigger"><ul class="wc3" id="wc3_6">
    • <li class="lasttree"><span class="default">Hi</span></li>
    • </ul>
    • </div></div>
    • Why do you have to replace the unit? Reviving it is just fine.
 

Rushhour

New Member
Reaction score
46
Just to help you: If you have or plan to have more heroes than 1-3 than you'd better change some basic things. It will be a hell lot work to have this "system" for 20+ heroes and what happens if you want to change for example the revive time?

So create an point array variable and a unit (type) array variable. At initialization you set for example
(point array variable)
set RevivalPoints[1]=Center of (Jainas revival)
set RevivalPoints[2]=Center of (Whatevers revival)

and then when the heroes are created you either do
(unit array variable)
set Heroes[1]=lastCreatedUnit() or SoldUnit when a jaina is created via triggers or sold via a tavern
or if the spawn points depend on the type then you do this
(unit type array variable)
set HeroType[1]=Jaina
...

Then you just need to check which hero type the dying/entering hero is and use the same index for the revival points.
May sound more complicated, but you only need one trigger and it's by far easier to edit.
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
We'll see what he wants then. And yours leaks. Well, it is the proper way, but it leaks. Instead of putting it at initialization, just set it to the points just before creating the unit, etc.


Set Point[1] = Position of Whatever
Create 1 unit at Point[1]
call RemoveLocation (udg_Point[1])
 

SilverScreen

New Member
Reaction score
2
Thanks for the extensive feedback--admittedly some of it is over my head, but I'm working through it.

Yeah, the "system" is only for three heroes, not all of them. I replace them upon revival because their resurrection takes them to a previously-inaccessible part of the map where they need different skills and abilities to deal with the enemies and obstacles I have there. Nothing complicated--right now I'm just trying to get the mechanics down and then I'll let my creativity run free.

However, I think I'm gonna have to wait until I get a better computer. I applied some of the changes you recommended and tried to actually play the game all the way through. Alas, my five-year-old Vaio doesn't have the juice to keep the game running and it slows down until it all-but freezes. Maybe it's because of what I'm trying to do with revivals n' such.

Phooey. Anywho, the language is new to me, so I've copied your suggestions and I'll try to work through them when I can. Hopefully I can get a new computer or something soon so I can enjoy it!
 

tommerbob

Minecraft. :D
Reaction score
110
If your game progressively runs slower and slower, its probably memory leaks do to triggers you are using. Try looking up some tutorials on how to prevent memory leaks. Just a thought. :)
 
General chit-chat
Help Users

      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