~ Forums of Enroth ~
Would you like to react to this message? Create an account in a few clicks or log in to continue.

~ Forums of Enroth ~

The Enroth diehard fan community
 
HomeHome  Latest imagesLatest images  SearchSearch  RegisterRegister  Log inLog in  
Latest topics
» [H3SW v0.8.2] Witch Hunt
[Ironfist ver 1.3.0] Bug with Teleport in lua script Icon_minitimeby GodRage Yesterday at 22:56

» 5Kings1Ring
[Ironfist ver 1.3.0] Bug with Teleport in lua script Icon_minitimeby GodRage Yesterday at 22:54

» Polskie powitanie
[Ironfist ver 1.3.0] Bug with Teleport in lua script Icon_minitimeby rrravyn 2024-11-15, 09:53

» loading simplification
[Ironfist ver 1.3.0] Bug with Teleport in lua script Icon_minitimeby badtoper 2024-11-15, 04:37

» Easier Troop Management Between Garrison and Hero in Town
[Ironfist ver 1.3.0] Bug with Teleport in lua script Icon_minitimeby badtoper 2024-11-15, 04:05

» Improvements for Hero Management and Turn Confirmation
[Ironfist ver 1.3.0] Bug with Teleport in lua script Icon_minitimeby badtoper 2024-11-15, 01:57

» [H3SW v0.8.2] Desert Isle
[Ironfist ver 1.3.0] Bug with Teleport in lua script Icon_minitimeby Sir Albe 2024-10-31, 07:56

Poll
Global announcements should be:
Everlasting, 1 for each project.
[Ironfist ver 1.3.0] Bug with Teleport in lua script Redbar110%[Ironfist ver 1.3.0] Bug with Teleport in lua script Redbar12
 0% [ 0 ]
Temporary, when there is something new to announce.
[Ironfist ver 1.3.0] Bug with Teleport in lua script Redbar11100%[Ironfist ver 1.3.0] Bug with Teleport in lua script Redbar12
 100% [ 6 ]
Holalala... No idea where the Ultimate artifact is.
[Ironfist ver 1.3.0] Bug with Teleport in lua script Redbar110%[Ironfist ver 1.3.0] Bug with Teleport in lua script Redbar12
 0% [ 0 ]
Total Votes : 6
Most Viewed Topics
H3SW: General Graphics discussion
Ragoon's Graphics For HoMM3SW
Introduce yourself
H3SW General Discussion
H3SW Map List: Work in progress
H3SW: Dwelling Development
The Floody Land
Forum Admins Feed
Enrothian Fan Art
Heroes III: The Succession Wars v0.8.2 Beta

 

 [Ironfist ver 1.3.0] Bug with Teleport in lua script

Go down 
2 posters
AuthorMessage
Unknown_Hero
Mage
Mage
Unknown_Hero


Messages : 780
Quality Points : 78
Registration Date : 2015-09-06

[Ironfist ver 1.3.0] Bug with Teleport in lua script Empty
PostSubject: [Ironfist ver 1.3.0] Bug with Teleport in lua script   [Ironfist ver 1.3.0] Bug with Teleport in lua script Icon_minitime2018-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.

[Ironfist ver 1.3.0] Bug with Teleport in lua script WWTGc5m
Back to top Go down
Darmani
Master Modder
Master Modder
Darmani


Messages : 289
Quality Points : 47
Registration Date : 2014-12-27

[Ironfist ver 1.3.0] Bug with Teleport in lua script Empty
PostSubject: Re: [Ironfist ver 1.3.0] Bug with Teleport in lua script   [Ironfist ver 1.3.0] Bug with Teleport in lua script Icon_minitime2019-01-01, 18:02

For convenience, can you paste the script that you used here?
Back to top Go down
Unknown_Hero
Mage
Mage
Unknown_Hero


Messages : 780
Quality Points : 78
Registration Date : 2015-09-06

[Ironfist ver 1.3.0] Bug with Teleport in lua script Empty
PostSubject: Re: [Ironfist ver 1.3.0] Bug with Teleport in lua script   [Ironfist ver 1.3.0] Bug with Teleport in lua script Icon_minitime2019-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;
Back to top Go down
Darmani
Master Modder
Master Modder
Darmani


Messages : 289
Quality Points : 47
Registration Date : 2014-12-27

[Ironfist ver 1.3.0] Bug with Teleport in lua script Empty
PostSubject: Re: [Ironfist ver 1.3.0] Bug with Teleport in lua script   [Ironfist ver 1.3.0] Bug with Teleport in lua script Icon_minitime2019-01-02, 12:44

The player is purple, and blue is the hero being teleported, right? I think I see how this is happening.
Back to top Go down
Unknown_Hero
Mage
Mage
Unknown_Hero


Messages : 780
Quality Points : 78
Registration Date : 2015-09-06

[Ironfist ver 1.3.0] Bug with Teleport in lua script Empty
PostSubject: Re: [Ironfist ver 1.3.0] Bug with Teleport in lua script   [Ironfist ver 1.3.0] Bug with Teleport in lua script Icon_minitime2019-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.
Back to top Go down
Darmani
Master Modder
Master Modder
Darmani


Messages : 289
Quality Points : 47
Registration Date : 2014-12-27

[Ironfist ver 1.3.0] Bug with Teleport in lua script Empty
PostSubject: Re: [Ironfist ver 1.3.0] Bug with Teleport in lua script   [Ironfist ver 1.3.0] Bug with Teleport in lua script Icon_minitime2019-01-03, 17:10

How can you tell? Is the violet player also human?

Back to top Go down
Unknown_Hero
Mage
Mage
Unknown_Hero


Messages : 780
Quality Points : 78
Registration Date : 2015-09-06

[Ironfist ver 1.3.0] Bug with Teleport in lua script Empty
PostSubject: Re: [Ironfist ver 1.3.0] Bug with Teleport in lua script   [Ironfist ver 1.3.0] Bug with Teleport in lua script Icon_minitime2019-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. Smile
Why not just try it? It will take less than a minute and fifteen seconds. Very Happy
Back to top Go down
Darmani
Master Modder
Master Modder
Darmani


Messages : 289
Quality Points : 47
Registration Date : 2014-12-27

[Ironfist ver 1.3.0] Bug with Teleport in lua script Empty
PostSubject: Re: [Ironfist ver 1.3.0] Bug with Teleport in lua script   [Ironfist ver 1.3.0] Bug with Teleport in lua script Icon_minitime2019-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.
Back to top Go down
Unknown_Hero
Mage
Mage
Unknown_Hero


Messages : 780
Quality Points : 78
Registration Date : 2015-09-06

[Ironfist ver 1.3.0] Bug with Teleport in lua script Empty
PostSubject: Re: [Ironfist ver 1.3.0] Bug with Teleport in lua script   [Ironfist ver 1.3.0] Bug with Teleport in lua script Icon_minitime2019-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. Smile
Back to top Go down
Darmani
Master Modder
Master Modder
Darmani


Messages : 289
Quality Points : 47
Registration Date : 2014-12-27

[Ironfist ver 1.3.0] Bug with Teleport in lua script Empty
PostSubject: Re: [Ironfist ver 1.3.0] Bug with Teleport in lua script   [Ironfist ver 1.3.0] Bug with Teleport in lua script Icon_minitime2019-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.
Back to top Go down
Darmani
Master Modder
Master Modder
Darmani


Messages : 289
Quality Points : 47
Registration Date : 2014-12-27

[Ironfist ver 1.3.0] Bug with Teleport in lua script Empty
PostSubject: Re: [Ironfist ver 1.3.0] Bug with Teleport in lua script   [Ironfist ver 1.3.0] Bug with Teleport in lua script Icon_minitime2019-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.
Back to top Go down
Unknown_Hero
Mage
Mage
Unknown_Hero


Messages : 780
Quality Points : 78
Registration Date : 2015-09-06

[Ironfist ver 1.3.0] Bug with Teleport in lua script Empty
PostSubject: Re: [Ironfist ver 1.3.0] Bug with Teleport in lua script   [Ironfist ver 1.3.0] Bug with Teleport in lua script Icon_minitime2019-01-05, 04:24

Yes, Google Drive is more sustainable in time. Smile
Thanks for the explanation and fix.
Back to top Go down
Sponsored content





[Ironfist ver 1.3.0] Bug with Teleport in lua script Empty
PostSubject: Re: [Ironfist ver 1.3.0] Bug with Teleport in lua script   [Ironfist ver 1.3.0] Bug with Teleport in lua script Icon_minitime

Back to top Go down
 
[Ironfist ver 1.3.0] Bug with Teleport in lua script
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
~ Forums of Enroth ~ :: Modding Guild :: Heroes of Might and Magic II: Project Ironfist :: Bug Reports-
Jump to: