Absolutely Baffling Problem (+Rep, please help)

Denegoth

New Member
Reaction score
18
In my map I have a hero selection area with many taverns. There has never been a single problem with it until now. I recently added another hero (With nothing strange that should have caused a bug). Now in a 5v5 game, whenever I select the hero, it appears to not be getting stored in the Hero variable, meaning it cannot be manipulated using that variable. This causes problems as I use the variable a lot. +rep to whoever can tell me the problem.

PS: The code probably leaks, but I don't particularly give a damn.

Trigger:
  • Hero Sale
    • Events
      • Unit - A unit Sells a unit
    • Conditions
      • ((Sold unit) is A Hero) Equal to True
    • Actions
      • Wait 0.10 seconds
      • Unit Group - Pick every unit in (Units owned by (Owner of (Sold unit)) of type Hero Selection) and do (Actions)
        • Loop - Actions
          • Unit - Remove (Picked unit) from the game
      • Unit - Move (Sold unit) instantly to ((Owner of (Sold unit)) start location)
      • Camera - Pan camera for (Owner of (Sold unit)) to ((Owner of (Sold unit)) start location) over 0.00 seconds
      • Selection - Select (Sold unit) for (Owner of (Sold unit))
      • Set Hero[(Player number of (Owner of (Sold unit)))] = (Sold unit)
      • Special Effect - Create a special effect attached to the origin of (Sold unit) using GeneralHeroGlow.mdx
      • Unit - Change color of (Sold unit) to (Color of (Owner of (Sold unit)))
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Player - Make (Unit-type of Hero[(Player number of (Owner of (Sold unit)))]) Unavailable for training/construction by (Picked player)
 

Squirel

New Member
Reaction score
13
Few questions:

Did you make sure the new unit is a hero?

Have you considered reworking your event so that the hero is stored at a different time, like say the first time the hero leaves the town or when the hero enters an area?

Can you upload some sort of map for me to look at and see if there is a different problem outside the trigger you have there?

Also, you might try isolating that trigger and seeing if it is buggy on its own. The problem could be a trigger for one of that hero's spells or something.
 

Denegoth

New Member
Reaction score
18
Few questions:

Did you make sure the new unit is a hero?

Have you considered reworking your event so that the hero is stored at a different time, like say the first time the hero leaves the town or when the hero enters an area?

Can you upload some sort of map for me to look at and see if there is a different problem outside the trigger you have there?

Also, you might try isolating that trigger and seeing if it is buggy on its own. The problem could be a trigger for one of that hero's spells or something.

1) Definately is a hero. I played a whole 2 games with it.

2) The baffling thing is about the trigger, all other heroes work, so I can't see if it would be this.

3) Perhaps. It is quite big and my internet sucks though.

4) If I play the map single player, it works fine, and as I said the trigger worked fine previously.
 

Squirel

New Member
Reaction score
13
Disable every other trigger in the map completely, make a trigger that will tell you what the variable is when you type something, then test to see if the trigger works.
 

Denegoth

New Member
Reaction score
18
Trigger:
  • Comet
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Comet
    • Actions
      • Wait 0.75 seconds
      • Unit - Cause (Casting unit) to damage (Target unit of ability being cast), dealing (Random real number between 100.00 and ((Real((Level of (Casting unit)))) x 50.00)) damage of attack type Chaos and damage type Normal


The only related trigger
 

Tom Jones

N/A
Reaction score
437
So let's start by determing how far the trigger executes:

Does the hero selector get removed?
Is the unit and camera moved/panned?
Is the unit selected?
Is the special effect created?
And lastly, is the unit disabled for further training?

To test the last use this:
Trigger:
  • Test
    • Events
      • Unit - A unit Sells a unit
    • Conditions
      • (Unit-type of (Sold unit)) Equal to Footman
    • Actions
      • Custom script: call IssueNeutralImmediateOrderById(Player(0),GetTriggerUnit(),GetUnitTypeId(GetSoldUnit()))
Copy/paste the custom script, and make sure that Player Red can afford buying the hero twice; give him double gold, double lumber, and double hero tickets.
 

Denegoth

New Member
Reaction score
18
So let's start by determing how far the trigger executes:

Does the hero selector get removed?
Is the unit and camera moved/panned?
Is the unit selected?
Is the special effect created?
And lastly, is the unit disabled for further training?

Yes
Yes
Yes
Yes
Yes

The baffling part is everything works except that specific hero.

Edit: Could it have anything to do with the length of the name? The hero's name is Lenna Charlotte Tycoon, and its hero type is Time Mage.
 

Igor_Z

You can change this now in User CP.
Reaction score
61
I don't get what this trigger is for but...
Leak: Unit Group - Pick every unit in (Units owned by (Owner of (Sold unit)) of type Hero Selection) and do (Actions)
Don't leave leaks behind they'll make lags in the game. I don't say this cuz I've read about it, I say this cuz i had leaks and they made the game lag as hell
About the trigger: The trigger worked fine and all of a sudden you added a new hero and it didn't? Very strange
 

Tom Jones

N/A
Reaction score
437
So let's start by determing how far the trigger executes:

Does the hero selector get removed?
Is the unit and camera moved/panned?
Is the unit selected?
Is the special effect created?
And lastly, is the unit disabled for further training?

Yes
Yes
Yes
Yes
Yes

Trigger:
  • Player Group - Pick every player in (All players) and do (Actions)
    • Loop - Actions
      • Player - Make (Unit-type of Hero[(Player number of (Owner of (Sold unit)))]) Unavailable for training/construction by (Picked player)
This means that your variable works.
 

Denegoth

New Member
Reaction score
18
This means that your variable works.

I decided to work around it with a trigger, and make a trigger to test it.

Trigger:
  • Hero Var
    • Events
      • Unit - A unit enters Region 013 Copy <gen>
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Set Hero[(Player number of (Owner of (Triggering unit)))] = (Triggering unit)



And the checking trigger..

Trigger:
  • Check
    • Events
      • Player - Player 1 (Red) types a chat message containing -herocheck as An exact match
    • Conditions
    • Actions
      • Game - Display to (All players) the text: Heroes:
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • Game - Display to (All players) the text: ((Name of (Player((Integer A)))) + <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" /> + (Proper name of Hero[(Integer A)])))


Thanks to everyone who helped. +repping you all now
 
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