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)
 
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.
 
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.
 
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.
 
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
 
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.
 
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.
 
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
 
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.
 
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 The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:
  • The Helper The Helper:
    What do you think Tom?
  • tom_mai78101 tom_mai78101:
    I will have to get used to this.
  • tom_mai78101 tom_mai78101:
    The latest news feed looks good
  • The Helper The Helper:
    I would like to see it again like Ghan had it the first time with pagination though - without the pagination that view will not work but with pagination it just might...
  • The Helper The Helper:
    This drink recipe I have had more than a few times back in the day! Mind Eraser https://www.thehelper.net/threads/cocktail-mind-eraser.194720/

      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