|
||
|
|||||||
| Script Support Get support for modifying RunUO Scripts, or writing your own! |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Newbie
Join Date: Jul 2008
Age: 18
Posts: 72
|
Say i use:
Code:
writer.Write( (BaseDoor) m_Target );
__________________
"I remember the time i was kidnapped and they sent a piece of my finger to my father, He said he wanted more proof." |
|
|
|
|
|
#2 (permalink) | |
|
Forum Novice
Join Date: Sep 2007
Posts: 367
|
Quote:
|
|
|
|
|
|
|
#3 (permalink) |
|
Newbie
Join Date: Jul 2008
Age: 18
Posts: 72
|
Wow thanks for the useless reply, before throwing links at me read them first. My question was how can i deserialize a BaseDoor i mean something like:
Code:
m_Target = reader.ReadBaseDoor();
__________________
"I remember the time i was kidnapped and they sent a piece of my finger to my father, He said he wanted more proof." |
|
|
|
|
|
#4 (permalink) |
|
Forum Expert
|
I don't think you need to declare it a BaseDoor on serialization, try just serializing/deserializing it as an item, that should do the trick (although I am not sure on this so proceed with caution). If you look at the BaseCamp.cs script it uses a Item list to serialize doors for the banker camp, so Im assuming if you serialize a functional door as an item it will load as a functional door (seeing as the camps do). Again just an assumption, I have no hard proof on this.
![]()
__________________
Father Time Life's journey is not to arrive at the grave safely in a well preserved body, but rather to skid in sideways, totally worn out, shouting "Holy Hell......What a ride!!!" Server: UO: Extinction ICQ: 146563794 FatherTime@UOExtinction.com UO: Extinction homepage UO: Extinction forum |
|
|
|
|
|
#5 (permalink) | |
|
Newbie
Join Date: Jul 2008
Age: 18
Posts: 72
|
Quote:
+ Customs/SecretStatue.cs: CS0266: Line 66: Cannot implicitly convert type 'Server.Item' to 'Server.Ite ms.BaseDoor'. An explicit conversion exists (are you missing a cast?)
__________________
"I remember the time i was kidnapped and they sent a piece of my finger to my father, He said he wanted more proof." |
|
|
|
|
|
|
#6 (permalink) |
|
Forum Expert
|
It would help to know more about the script, and why it's serializing a door. Are you willing to show the project, or atleast explain it? Is it an addon?
__________________
Father Time Life's journey is not to arrive at the grave safely in a well preserved body, but rather to skid in sideways, totally worn out, shouting "Holy Hell......What a ride!!!" Server: UO: Extinction ICQ: 146563794 FatherTime@UOExtinction.com UO: Extinction homepage UO: Extinction forum |
|
|
|
|
|
#7 (permalink) | |
|
Newbie
Join Date: Jul 2008
Age: 18
Posts: 72
|
Quote:
Code:
public class SecretStatue : Item
{
private BaseDoor m_Target;
[CommandProperty( AccessLevel.GameMaster )]
public BaseDoor Target
{
get
{
return m_Target;
}
set
{
m_Target = value;
}
}
__________________
"I remember the time i was kidnapped and they sent a piece of my finger to my father, He said he wanted more proof." |
|
|
|
|
|
|
#9 (permalink) |
|
Newbie
|
What soteric said should do the trick, I was to slow in responding. Read it back in as an item then cast it to a door.
__________________
My script library so far |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|