![]() |
![]() |
|
Go
![]() |
New
![]() |
Find
![]() |
Notify
![]() |
Tools
![]() |
Reply
![]() |
|
It might sound like a stupid question, but I've been trying to make a script for 1st day messages. I couldn't find any good scripting resource, only stuff that didn't work for some reason. And I always get "function <blah> isn't defined" or whatever... looks like I just don't do something right, I used the example provided in one of the guides and it didn't pass a "check", same problem.
Anyway, I was wondering if anyone knows a good resource for HOMMV scripts or can post the script for daily txt messages. P.S. I have very little lua experience, but I do know some of the basics. Thanks in advance. |
|||
|
The "check" button and the non-sense error messages that it gives are there just to confuse you. Ignore them and verify script correctness by playing the map. |
||||
|
I'll do that,
Thanks. |
||||
|
I can well understand your frustration. Be patient you are in for much more. I started using the editor about a week ago and have learned a ton, but there are many buggy features. Sorry if I give you too much info, but I would rather assume you know less than leave something out. Most of the examples on the forums are incorrect or just don't have all the info you need, so here is how to create and display a day 1 message.
1 Create your message by selecting on the menu view/map properties tree this will display the MAP properties on the left side instead of the objects properties. In that tree find the node for resources and under that find SavesFilenames Click on that then right click and select Add. That will put a node under there with a sequential number. Expand that new node and click over under the name column. You should see three little buttons appear [...][new][edit] Click the new button and give it a name - say MyMessage for example. Click Ok and you will be in a text editor. Type in your message to display there and click OK and save it. Highlight the full path and name of it in the properties tree and copy it. 2. Open your script with View/Map Properties [script tab] and enter your messagebox command just like the real example below pasting in your path and filename in place of the one here. MessageBox("Maps/SingleMissions/BK-School19/AltarMessage5.txt"); 3. **** very important *** The name you pasted will have backslashes '\' not the forward ones in this example. CHANGE THEM TO FORWARD SLASHES! The back slashes are because of a bug in the editor. Don't worry about the resource file itself, the editor will change that one when you close it and then restart it. If you have done all this your message should display on day 1. |
||||
|
| Powered by Eve Community |
| Please Wait. Your request is being processed... |
|

