Page 1 of 1
studio stuff
Posted: Fri Aug 29, 2003 5:18 pm
by colarob
I'm working on a patch for si using the studio and was wondering about switches and doors. Can you say.. have a lever operate a sliding door in the area just by having their quality values the same? Or do you need to do event handling with usecode. If the former is true are there criteria for quality assignments if merely doing a patch for si?
Re: studio stuff
Posted: Fri Aug 29, 2003 5:26 pm
by colarob
Also, in triggering a usecode egg using the "something on" criteria, can the key object be determined via quality?
Re: studio stuff
Posted: Tue Sep 02, 2003 9:52 am
by drcode
It's been a while since I've really studied the usecode, so I'm a bit rusty. I'm pretty sure the answer to your first question is 'yes', but you should look at the disassembled code for 'lever' to see.
For the second question: You need to get the actual object placed on the egg. I can't remember if that's the 'item' passed to the usecode function, or if you have to find it (by looking for the closest object to the egg, I'd guess).
Re: studio stuff
Posted: Tue Sep 02, 2003 9:15 pm
by Colourless
The 'something on' criteria is one thing that Ultima 8's usecode vastly improves upon from Ultima 7.
In U7, only Eggs could be triggered by a something on criteria, and if that was a usecode egg, then the item isn't passed to the usecode, you have to search for it, using an awkward method (find_nearby).
U8 improves on that in 3 ways:
1) Every item can be triggered by something being placed on it
2) The item is passed to the usecode function that is called
3) U8 usecode has the ability to search for all the items on top of another item.
-Colourless Dragon
Re: studio stuff
Posted: Wed Sep 03, 2003 11:09 am
by colarob
Thank You. It had finally occured to me that i had read that shapes have their own predetermined usecode in the beginning of the u-codefile and started reading it shortly after I posted. I have one more question please.
In writing to my own faces file with ipack (using the gimp to edit) I was using hi-res images and scaling them to the common resolution for a face
file and using 256 indexed coloring, but got a garbled (but somwhat distinguishable image in studio's browser. I tried then dragging the new image onto an extracted face and it seemed to pick up its' palette, but seemed to lose some pixels. I noticed though too, that custom palettes (or the file name anyway) doesn't show up in the studio's tree although the custom faces file does.
Re: studio stuff
Posted: Wed Sep 03, 2003 11:21 am
by colarob
I am, too, using winXP and I understand there are NT issues?
Re: studio stuff
Posted: Wed Sep 03, 2003 11:36 am
by Dominus
Xp wasn't having those issues, only NT 4.x and Windows 2000.