Exec Command

Discussions about Coding and Scripting
Post Reply
User avatar
comoestas
Average
Posts: 36
Joined: Tue Jan 04, 2011 12:33 am

Exec Command

Post by comoestas »

Does anyone have any documentation on this type of command:

Code: Select all

#exec NEW <factoryclass> PACKAGE=<packagename> Name=<newobjectname> [Factory-specific parameters follow]
What are these factory-specific parameters? Is there some long lost info on this? I looked everywhere where I know to look, so now I must ask the community. It seems like this command could have big implications on what is possible with UScript, so I hope someone knows. :noidea
JackGriffin
Godlike
Posts: 3774
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

Re: Exec Command

Post by JackGriffin »

You should ask wormbo, he loves to flex his knowledge on stuff like this.
So long, and thanks for all the fish
User avatar
Sp0ngeb0b
Adept
Posts: 376
Joined: Wed Feb 13, 2008 9:16 pm
Location: Cologne
Contact:

Re: Exec Command

Post by Sp0ngeb0b »

The only thing I know about it is that you are able to import Music into a .u package with it:

Code: Select all

#exec NEW MUSICFACTORY FILE="path\to\file.it" NAME="MusicName"
Website, Forum & UTStats

Image
******************************************************************************
Nexgen Server Controller || My plugins & mods on GitHub
******************************************************************************
JackGriffin
Godlike
Posts: 3774
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

Re: Exec Command

Post by JackGriffin »

Whoa SB, I didn't know that one. Nice :tu:
So long, and thanks for all the fish
User avatar
Feralidragon
Godlike
Posts: 5493
Joined: Wed Feb 27, 2008 6:24 pm
Personal rank: Work In Progress
Location: Liandri

Re: Exec Command

Post by Feralidragon »

Here's another:

Code: Select all

#exec NEW TRUETYPEFONTFACTORY NAME=FontName_in_UT FONTNAME="FontName_as_installed_in_the_system" HEIGHT=32 ANTIAlIAS=TRUE
User avatar
comoestas
Average
Posts: 36
Joined: Tue Jan 04, 2011 12:33 am

Re: Exec Command

Post by comoestas »

Thanks guys.

Another, more powerful one:

Code: Select all

#exec NEW MODELFACTORY NAME=ModelName FILE=Path\To\File.t3d
I have used this to import .t3d brush into my project as a model object. Now, I haven't figure out how to use this object successfully, but its there. I might need to use some of the other params.

And looking at the public headers for UFactory class, nothing really pops out:

Code: Select all

StaticImportObject( UClass* Class, UObject* InOuter, FName Name, DWORD Flags, const TCHAR* Filename=TEXT(""), UObject* Context=NULL, UFactory* Factory=NULL, const TCHAR* Parms=NULL, FFeedbackContext* Warn=GWarn );
Just a Flags field, and Parms for most likely all other params. I wish Epic had released the full cpp source.
User avatar
Creavion
Godlike
Posts: 4497
Joined: Sun Feb 17, 2008 7:23 pm
Personal rank: About to be non-act.
Location: Germany, Lower Saxony

Re: Exec Command

Post by Creavion »

comoestas wrote:Thanks guys.

Another, more powerful one:

Code: Select all

#exec NEW MODELFACTORY NAME=ModelName FILE=Path\To\File.t3d
So, this is how Meshmaker is working then?
About to be non-active
My very last UT map project: CTF-FacePalm (tropical CTF-Face remake)
Why do I leave? click here
What I want to do next: Joining an UDK team (uncertain however) and improve 3D modelling and texture editing skills
Thanks to those who visibly supported me until/at the end!
My reactivated account on indiedb.com.
User avatar
Feralidragon
Godlike
Posts: 5493
Joined: Wed Feb 27, 2008 6:24 pm
Personal rank: Work In Progress
Location: Liandri

Re: Exec Command

Post by Feralidragon »

comoestas wrote: Another, more powerful one:

Code: Select all

#exec NEW MODELFACTORY NAME=ModelName FILE=Path\To\File.t3d
I have used this to import .t3d brush into my project as a model object. Now, I haven't figure out how to use this object successfully, but its there. I might need to use some of the other params.
I didn't know that import existed at exec level (makes sense it exists though), very nice find. :mrgreen:
As for model usage, perhaps:

Code: Select all

var model SomeModel;
[...]
SomeModel = Model'ModelName';
I guess you know what I mean by "SomeModel" :wink:
User avatar
comoestas
Average
Posts: 36
Joined: Tue Jan 04, 2011 12:33 am

Re: Exec Command

Post by comoestas »

Feralidragon wrote:

Code: Select all

var model SomeModel;
[...]
SomeModel = Model'ModelName';
If only it was this easy. When I apply it to a mover, if the mover is hidden, I don't even know if it worked(no collision, nothing). If I apply when it visible, it crashes:

Code: Select all

Critical: FMovingBrushTracker::ForceGroupFlush
Critical: FMovingBrushTracker::ForceGroupFlush
[...]
Critical: FMovingBrushTracker::Update
Critical: URender::SetupDynamics
Critical: URender::OccludeFrame
Log: URender::DrawWorld anomaly
Critical: URender::OccludeBsp
Critical: URender::OccludeFrame
Log: URender::DrawWorld anomaly
[...]
Log: URender::DrawWorld anomaly
This is exactly the same error I got when I tried using a 'cloned' UModel object through native code.
JackGriffin
Godlike
Posts: 3774
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

Re: Exec Command

Post by JackGriffin »

Thanks again SpongeBob for that tip! I just used this and it works so nice :tu:
So long, and thanks for all the fish
User avatar
Sp0ngeb0b
Adept
Posts: 376
Joined: Wed Feb 13, 2008 9:16 pm
Location: Cologne
Contact:

Re: Exec Command

Post by Sp0ngeb0b »

You are welcome ;) Although credits should go to Wormbo cause I just read that little secret somewhere on unreal wiki ...
Website, Forum & UTStats

Image
******************************************************************************
Nexgen Server Controller || My plugins & mods on GitHub
******************************************************************************
User avatar
comoestas
Average
Posts: 36
Joined: Tue Jan 04, 2011 12:33 am

Re: Exec Command

Post by comoestas »

Well I found the list of factories, haven't found out what they all do:

Image

ClassFactory and LevelFactory look intriguing.
Post Reply