bukary on 25/2/2006 at 12:21
What would I like to do? I want Garrett to frob particular object and "read" some "map" (graphic file only). Events:
1) Frob object (it can have book properties, but it will have different mesh).
2) New screen appears: without open book background; with custom graphics only.
I can easily make Garrett frob some object and read some text (book background). I also know that it is possible to insert images into the text. But how can I make a map (not exactly map, but some custom graphics) appear instead of book background (or image on book background)?
Rantako on 25/2/2006 at 14:09
In the Inn OM, scripting was used to make the instructions appear from a book file with no book background (just that blue mist stuff). You could do the same thing, but make the file it opens contain your image instead of text. I don't know what action they used, but you could look at the OM scripts to find out.
bukary on 25/2/2006 at 16:00
I suppose it would be better to check scripts on objects that activate a help message when object is frobbed for the first time. Here's what I found out:
CONDITIONS
- When I am frobbed by player
- Query if flag [FLAG NAME] is set to [FALSE]
ACTIONS
- Set flag [FLAG NAME] to [TRUE] expires on map change [FALSE] expires on mission [20]
- Popup a window with text from the file [FILE_NAME.txt]
So it works pretty much the same as books. So the question is: has anyone succedeed in placing some image in text file? How can it be done? In "example.sch" file I found such tags:
Quote:
< insert a picture, l = left justifed, r = right, c = center -->\n < img=METAbutNO_D c > \n\n
< ! -- insert a map of level -- >\nthe map at 50%\n< map=first floor,50 >\n
Does it work? Where (in which folder?) should I place the image that will be displayed?
Thanks in advance for any help!
[EDIT]
I tried placing some image in the book in many different ways. No luck. :(
bukary on 25/2/2006 at 21:52
So... has anyone ever tried inserting images? Perhaps Krypt knows if it is possible at all...
I tried different tags with no result. I'm certain there is some easy way to make image appear on screen. It's always easy once you know what to do. ;)
Krypt on 25/2/2006 at 23:17
Hmm. I never did a lot of work with creating text stuff, but I think those tags should work assuming your texture is a properly formatted DDS in the content\T3\Textures directory. If your picture's filename is Blarf.dds, the format for the tag should be < img=Blarf l> (minus that space before the img). I think this would work with the "Popup a window with text from the file [FILE_NAME.txt]" trigger action, which is what you really should use if you don't want the image to show up in a book. There is a weird quirk with this action though. The filename is actually not a .txt file, but a .sch file, even though it has you put a .txt in the action. So if you reference Blarftext.txt in your action, the actual file would be content\T3\Books\English\BlarfText.sch. Don't ask me why that is.
Rantako on 26/2/2006 at 09:12
There was an image in one of the books in 'The Crypt', so you could ask whoever made that how they did it. Looking in the zip file, there doesn't seem to be a book with an image in it, though. They must have made it some other way.
bukary on 26/2/2006 at 09:35
Thank you! It works! I have only one problem...
Here's what I did:
1) I made some object frobbable (Frob>IsFrobbable/FrobBias; Highlight>HighlightDist).
2) I made a script:
CONDITIONS
- When I am frobbed by player.
ACTIONS
- Popup a window with text from the file [FILE_NAME.txt].
3) I added the script to the object.
4) I edited SCH file in content\T3\Books\English\:
Quote:
lang_english 2004-02-21 12:32:00 "< img=DDS_FILE_NAME l>"
lang_french 2004-04-19 12:18:54 ""
lang_german 2004-04-13 13:01:05 ""
lang_italian 2004-05-03 12:36:29 ""
5) I placed the DDS file in T3\PCTextures and T3\Textures
When I frob the object, the image appears on the screen. :thumb:
BTW, this tag (< img>)also works with books. We can easily have books with images.
But... It only happens once. And I want the image appear each time I frob the object. What conditions and actions should I add to the script?
(This is my first contact with scripts in T3Ed, so... please, forgive my ignorance.)
Crispy on 26/2/2006 at 10:15
You need another action in the script: "Reset conditions and actions". It must be placed at the end of the script; otherwise the actions that follow it won't happen.
bukary on 26/2/2006 at 10:39
Thank you, Crispy! :thumb: