| [Ironfist ver 1.3.0] Bug with Teleport in lua script | |
|
|
Author | Message |
---|
Unknown_Hero Mage
Messages : 780 Quality Points : 78 Registration Date : 2015-09-06
| Subject: [Ironfist ver 1.3.0] Bug with Teleport in lua script 2018-09-06, 05:45 | |
| Load: "GRWar2.MX2" Play the blue player. Click the "OKAY" button and end the turn (the program seems blocked, but it is not, the waiting time lasts about 15 seconds, it's the autosave file of the scenario). Part of the purple player's fog of war is removed. | |
|
| |
Darmani Master Modder
Messages : 289 Quality Points : 47 Registration Date : 2014-12-27
| Subject: Re: [Ironfist ver 1.3.0] Bug with Teleport in lua script 2019-01-01, 18:02 | |
| For convenience, can you paste the script that you used here? | |
|
| |
Unknown_Hero Mage
Messages : 780 Quality Points : 78 Registration Date : 2015-09-06
| Subject: Re: [Ironfist ver 1.3.0] Bug with Teleport in lua script 2019-01-02, 03:24 | |
| Hello Darmani, Scenario and script: GRWar2.7z The lua script contains only this code: - Code:
-
function OnNewDay(month, week, day) MessageBox("Hello"); player = GetPlayer(0); hero = GetHero(player, 0); TeleportHero(hero, 126, 133); end; | |
|
| |
Darmani Master Modder
Messages : 289 Quality Points : 47 Registration Date : 2014-12-27
| Subject: Re: [Ironfist ver 1.3.0] Bug with Teleport in lua script 2019-01-02, 12:44 | |
| The player is purple, and blue is the hero being teleported, right? I think I see how this is happening. | |
|
| |
Unknown_Hero Mage
Messages : 780 Quality Points : 78 Registration Date : 2015-09-06
| Subject: Re: [Ironfist ver 1.3.0] Bug with Teleport in lua script 2019-01-03, 03:47 | |
| In the example, you must play the blue player, human player, player "0". The first hero of the blue player is teleported. Part of the violet player's fog of war is unveiled. | |
|
| |
Darmani Master Modder
Messages : 289 Quality Points : 47 Registration Date : 2014-12-27
| Subject: Re: [Ironfist ver 1.3.0] Bug with Teleport in lua script 2019-01-03, 17:10 | |
| How can you tell? Is the violet player also human?
| |
|
| |
Unknown_Hero Mage
Messages : 780 Quality Points : 78 Registration Date : 2015-09-06
| Subject: Re: [Ironfist ver 1.3.0] Bug with Teleport in lua script 2019-01-04, 07:35 | |
| I can tell because it's a solo game. I chose the blue player against all other AI players, so the purple player is an AI player. I wrote the script so that the first hero of the blue player is teleported. Why not just try it? It will take less than a minute and fifteen seconds. | |
|
| |
Darmani Master Modder
Messages : 289 Quality Points : 47 Registration Date : 2014-12-27
| Subject: Re: [Ironfist ver 1.3.0] Bug with Teleport in lua script 2019-01-04, 08:15 | |
| ...you said that the purple player's fog of war is removed, right? Do you mean that part of the blue player's fog of war is removed, but of an area showing the purple player?
The link to the savegame is broken, so I can't try it. | |
|
| |
Unknown_Hero Mage
Messages : 780 Quality Points : 78 Registration Date : 2015-09-06
| Subject: Re: [Ironfist ver 1.3.0] Bug with Teleport in lua script 2019-01-04, 08:58 | |
| The link in the third post works, this one. Play the blue player, the purple player is an IA player. At the beginning of the scenario, the script is executed. Just press the "Okay" button of the "Hello" window that appears, it is part of the script, the first hero of the blue player is teleported by the script. Then press the "Okay" buttons of the "Bonus" windows that appear, they are part of the original scenario, not the script. Until then, everything is normal, the fog of war of the blue player, the one you play, is removed normally. Pass the turn. Wait about 15 seconds for the game to give you the hand, the program seems stuck, but it is not the case, it's the waiting time, quite annoying, for the automatic save file of the scenario to take place. Once again the "Hello" window of the script appears, just press the "Okay" button. Now, look in the upper left corner of the minimap, part of the purple player's fog of war, one of the AI players, is removed. | |
|
| |
Darmani Master Modder
Messages : 289 Quality Points : 47 Registration Date : 2014-12-27
| Subject: Re: [Ironfist ver 1.3.0] Bug with Teleport in lua script 2019-01-04, 16:21 | |
| Ah. Sorry for missing that. Thanks for switching to Google Drive; it's a friendlier option for this sort of thing.
Bug confirmed. Holy crap. | |
|
| |
Darmani Master Modder
Messages : 289 Quality Points : 47 Registration Date : 2014-12-27
| Subject: Re: [Ironfist ver 1.3.0] Bug with Teleport in lua script 2019-01-04, 17:49 | |
| The bug was related to calling TeleportHero from OnNewDay. For some reason, the game will reveal a map area around the current *viewing port* when you teleport a hero (we use the same function as portals and the Dimension Door spell). On the second day, the current viewing port is set by whichever player went last.
I have committed a fix. | |
|
| |
Unknown_Hero Mage
Messages : 780 Quality Points : 78 Registration Date : 2015-09-06
| Subject: Re: [Ironfist ver 1.3.0] Bug with Teleport in lua script 2019-01-05, 04:24 | |
| Yes, Google Drive is more sustainable in time. Thanks for the explanation and fix. | |
|
| |
Sponsored content
| Subject: Re: [Ironfist ver 1.3.0] Bug with Teleport in lua script | |
| |
|
| |
| [Ironfist ver 1.3.0] Bug with Teleport in lua script | |
|