~ Forums of Enroth ~

An Enroth diehard fan community
 
HomeHome  FAQFAQ  SearchSearch  RegisterRegister  Log inLog in  
Latest topics
» Project Ironfist announcements
[Ironfist ver 1.3.0] Bug with Teleport in lua script Icon_minitimeby Unknown_Hero Today at 09:55

» Czech language
[Ironfist ver 1.3.0] Bug with Teleport in lua script Icon_minitimeby Kattnienika Yesterday at 19:16

» Introduce yourself
[Ironfist ver 1.3.0] Bug with Teleport in lua script Icon_minitimeby GodRage 2019-05-24, 01:22

» [Unknown Mod] General Informations
[Ironfist ver 1.3.0] Bug with Teleport in lua script Icon_minitimeby Unknown_Hero 2019-05-23, 06:17

» [Heroes 2 Bugs] Crash or/and View Puzzle map corrupted when visiting an obelisk
[Ironfist ver 1.3.0] Bug with Teleport in lua script Icon_minitimeby Unknown_Hero 2019-05-18, 02:46

» Enroth's History & Stories
[Ironfist ver 1.3.0] Bug with Teleport in lua script Icon_minitimeby Orzie 2019-05-13, 17:39

» [H3SW v0.8.1] Necromancer castles cause my game to crash (Sometimes)
[Ironfist ver 1.3.0] Bug with Teleport in lua script Icon_minitimeby Orzie 2019-05-13, 17:22

Poll
"Wait" in HoMM2?
Yes
[Ironfist ver 1.3.0] Bug with Teleport in lua script Redbar1180%[Ironfist ver 1.3.0] Bug with Teleport in lua script Redbar12
 80% [ 55 ]
No
[Ironfist ver 1.3.0] Bug with Teleport in lua script Redbar1120%[Ironfist ver 1.3.0] Bug with Teleport in lua script Redbar12
 20% [ 14 ]
Total Votes : 69
Most Viewed Topics
H3SW: General Graphics discussion
Ragoon's Graphics For HoMM3SW
H3SW General Discussion
H3SW: Dwelling Development
Heroes of Might and Magic 3: The Succession Wars - General info & Announcements
H3SW Map List: Work in progress
Welcome fellow Enrothians!
Enrothian Fan Art
Commanders?
H3SW Recruitment Point - Enroth Needs You!

Share
 

 [Ironfist ver 1.3.0] Bug with Teleport in lua script

Go down 
AuthorMessage
Unknown_Hero
Vampire
Vampire
Unknown_Hero

Messages : 465
Quality Points : 60
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 : 238
Quality Points : 38
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
Vampire
Vampire
Unknown_Hero

Messages : 465
Quality Points : 60
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 : 238
Quality Points : 38
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
Vampire
Vampire
Unknown_Hero

Messages : 465
Quality Points : 60
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 : 238
Quality Points : 38
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
Vampire
Vampire
Unknown_Hero

Messages : 465
Quality Points : 60
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 : 238
Quality Points : 38
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
Vampire
Vampire
Unknown_Hero

Messages : 465
Quality Points : 60
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 : 238
Quality Points : 38
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 : 238
Quality Points : 38
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
Vampire
Vampire
Unknown_Hero

Messages : 465
Quality Points : 60
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: