Heroes of Might and Magic Community
visiting hero! Register | Today's Posts | Games | Search! | FAQ/Rules | AvatarList | MemberList | Profile


Age of Heroes Headlines:  
5 Oct 2016: Heroes VII development comes to an end.. - read more
6 Aug 2016: Troubled Heroes VII Expansion Release - read more
26 Apr 2016: Heroes VII XPack - Trial by Fire - Coming out in June! - read more
17 Apr 2016: Global Alternative Creatures MOD for H7 after 1.8 Patch! - read more
7 Mar 2016: Romero launches a Piano Sonata Album Kickstarter! - read more
19 Feb 2016: Heroes 5.5 RC6, Heroes VII patch 1.7 are out! - read more
13 Jan 2016: Horn of the Abyss 1.4 Available for Download! - read more
17 Dec 2015: Heroes 5.5 update, 1.6 out for H7 - read more
23 Nov 2015: H7 1.4 & 1.5 patches Released - read more
31 Oct 2015: First H7 patches are out, End of DoC development - read more
5 Oct 2016: Heroes VII development comes to an end.. - read more
[X] Remove Ads
LOGIN:     Username:     Password:         [ Register ]
HOMM1: info forum | HOMM2: info forum | HOMM3: info mods forum | HOMM4: info CTG forum | HOMM5: info mods forum | MMH6: wiki forum | MMH7: wiki forum
Heroes Community > MapHaven Guild > Thread: How to add events to make text box in map?
Thread: How to add events to make text box in map?
archimp
archimp

Tavern Dweller
posted May 03, 2009 07:30 PM

How to add events to make text box in map?

well i have scrolled forum much and here is so snowing much infos same topics so i quit searching now and want direct asnwer because i need this info now.

what i should do to make text box on start of map? how i do it. i have seen script code of it but dont know how map know where it brings that txt file?

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
archimp
archimp

Tavern Dweller
posted May 05, 2009 07:46 PM

anyone cannot help. send a link or something to right topic if u think is already posted... really need help now

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Vlaad
Vlaad


Admirable
Legendary Hero
ghost of the past
posted May 05, 2009 07:53 PM

http://www.celestialheavens.com/forums/viewtopic.php?p=85467&highlight=#85467
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Archimp
Archimp

Tavern Dweller
posted May 20, 2009 04:33 PM

well earlier i get textbox work, but only first day.. now i want make text box other days.. i have so pissed off because i dont know what is wrong this code..

----Paiva tekstit------------------------------------------
-----------------------------------------------------------

MessageBox("Maps/Multiplayer/Orcs Rage/day1.txt");
-- only do this the first day

function NewDayTrigger()
  if GetDate(DAY) == 1 then
     MessageBox("Maps/Multiplayer/Orcs Rage/day1.txt");
  end;
end;
Trigger(NEW_DAY_TRIGGER, "NewDayTrigger");
if GetDate (DAY) == 8 then
     if GetCurrentPlayer () == whoishuman then
 MessageBox (path.."day8.txt");
     end;
      end;
if GetDate (DAY) == 15 then
     if GetCurrentPlayer () == whoishuman then
 MessageBox (path.."day15.txt");
     end;
      end;
if GetDate (DAY) == 30 then
     if GetCurrentPlayer () == whoishuman then
 MessageBox (path.."day30.txt");
     end;
      end;
-----------------------------------------------------------
-----------------------------------------------------------

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Warmonger
Warmonger


Promising
Legendary Hero
fallen artist
posted May 20, 2009 08:48 PM
Edited by Warmonger at 20:52, 20 May 2009.

if GetDate (DAY) == 8 then
    if GetCurrentPlayer () == whoishuman then
MessageBox (path.."day8.txt");
    end;
     end;
if GetDate (DAY) == 15 then
    if GetCurrentPlayer () == whoishuman then
MessageBox (path.."day15.txt");
    end;
     end;
if GetDate (DAY) == 30 then
    if GetCurrentPlayer () == whoishuman then
MessageBox (path.."day30.txt");
    end;
     end;

These events are beyond function body, so trigger on day 1 and theuir conditions are always false.

It should go like this:

MessageBox("Maps/Multiplayer/Orcs Rage/day1.txt");

function NewDayTrigger()
 if GetDate (DAY) == 8 then
    if GetCurrentPlayer () == whoishuman then
          MessageBox (path.."day8.txt");
    end;
 end;
 if GetDate (DAY) == 15 then
    if GetCurrentPlayer () == whoishuman then
          MessageBox (path.."day15.txt");
    end;
 end;
 if GetDate (DAY) == 30 then
    if GetCurrentPlayer () == whoishuman then
          MessageBox (path.."day30.txt");
    end;
 end;
end;
Trigger(NEW_DAY_TRIGGER, "NewDayTrigger");


You can't tigger an event on day 1, so the message has to be outside function body. It tiggers noramlly at game start.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Galev
Galev


Famous Hero
Galiv :D
posted June 10, 2009 10:42 PM
Edited by Galev at 22:47, 10 Jun 2009.

I just wanted to try if I can make simple scripts work. But the answer to that is an explicit NO.

I just wanted to follow the example in the Celestial Heavens guide and made this script. But it won't work. I tried many modifications...
------------------------------------
function lava()
MessageBox("Maps\SingleMissions\map1\lavawarning.txt");
end;

function day2()
if GetDate(DAY)==2 then lava();
end;
end;
-------------------------------------

Also, does the noumber of spaces (things you get by hitting the Space button) matter? If so, then why isn't it explained in that guide, it only talks about rows. Doesn't mentions TABs either
Thanks

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Galev
Galev


Famous Hero
Galiv :D
posted June 11, 2009 10:33 PM

I found out the problem was with the "\"s they should be "/"s

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread »
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.0253 seconds