|
Thread: How to add events to make text box in map? | |
|
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?
|
|
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
|
|
Vlaad
Admirable
Legendary Hero
ghost of the past
|
posted May 05, 2009 07:53 PM |
|
|
|
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;
-----------------------------------------------------------
-----------------------------------------------------------
|
|
Warmonger
Promising
Legendary Hero
fallen artist
|
posted May 20, 2009 08:48 PM |
|
|
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.
|
|
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
|
|
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
|
|
|