UScript based custom textures

Discussions about Coding and Scripting
Post Reply
User avatar
Feralidragon
Godlike
Posts: 5493
Joined: Wed Feb 27, 2008 6:24 pm
Personal rank: Work In Progress
Location: Liandri

UScript based custom textures

Post by Feralidragon »

Is it possible to create a new type of texture that runs UScript based code?

I mean, let's say I subclass the class "Texture" or "FireTexture" or "ScriptedTexture", and add some properties and some UScript based code into it, no matter what right now. What I want to know is that is possible to use this texture in the Editor (create new textures based in the custom one) and run its code in some occasions?

I have one or another idea to use this in my own campaign or even in some multiplayer stuff, and if it doesn't work it isn't that bad either, but for now I need to know if it would work.

EDIT: Also it's not that bad, because what I want to do might be quite possible using external code and using the current textures instead, but it would be a more "dirty" way and would only work in single player/practise sessions.
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: UScript based custom textures

Post by Creavion »

Raven from unrealsp.org (over PM) wrote:Never tried to create custom textures. From what .:..: said it's somehow fucked in UT. I don't see possibility of importing new textures into new class other then messing in C++. Anyway what exactly are you planning to do? You can always define .int and use localization to have per-texture properties. Be aware also that AFAIK textures doesn't get ticked (nor any other UScript events are called) so you'd be force to do it yourself.
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: UScript based custom textures

Post by Feralidragon »

Thanks :tu:

I was expecting that was not possible in UT, after trying to check every logical int for this matter to see if I could at least "add" to the Ued, but oh well...

Also, I am aware the textures don't have any events called by the engine which I can use (since most of them are only called from Actor and down, and the class "Texture" comes from "Bitmap" that comes from the big boss class "Object").

I would only place there functions that would be called from other ticked actors (such as triggers, weather controllers, etc).

If I could subclass and create my own texture classes, there are a few I would create that could be used by many mappers, even in multiplayer, since it would most likelly work (since the texture would manage itself each time an actor called any of its functions).

But since it's not possible from what it seems, I have to do it another way (although the other way it's more flexible and needs less space, but it will look more ugly and it won't most likelly work online).
And even so, I am not 100% sure if it's going to work the other way.


Well, thanks for the reply
User avatar
Shadow
Masterful
Posts: 743
Joined: Tue Jan 29, 2008 12:00 am
Personal rank: Mad Carpenter
Location: Germany
Contact:

Re: UScript based custom textures

Post by Shadow »

It is possible, but as already mentioned: objects don't receive actor-related events. This can be achieved by calling these functions from out of a master ACTOR. I'm using that on my software shader stuff.

What exactly are you planning to do with that method ??

Well.. but's a different tale if you want to change a texture's native properties at runtime per UScript, it's mostly read-only (Size, Compression etc.)
Image
User avatar
Feralidragon
Godlike
Posts: 5493
Joined: Wed Feb 27, 2008 6:24 pm
Personal rank: Work In Progress
Location: Liandri

Re: UScript based custom textures

Post by Feralidragon »

I don't want to change sizes, compressions, blending properties, nothing of that actually, I wanted to change other things that might be possible to change dynamically and be very usefull for many features. Although it could work online if I could create new types, while the way I planned will only work in single player/practise.

I know it's possible to write and read on certain variables of each texture, thanks to one of Creavion's requests a long time ago, which lead me to find that out. I just thought if I could do some UScript based textures by subclassing one or another, I could make it more dynamic.
I would need an external actor indeed, but for certain things it would be more simple to accomplish than making everything in a actor only.
But again, I have to check which properties can be changed (write and read) dynamically in a texture like in a normal actor, and how can I use them out in the mapping stage of my SP, since I know some of them can.
User avatar
Shadow
Masterful
Posts: 743
Joined: Tue Jan 29, 2008 12:00 am
Personal rank: Mad Carpenter
Location: Germany
Contact:

Re: UScript based custom textures

Post by Shadow »

Feralidragon wrote:I don't want to change sizes, compressions, blending properties, nothing of that actually, I wanted to change other things that might be possible to change dynamically and be very usefull for many features. Although it could work online if I could create new types, while the way I planned will only work in single player/practise.

I know it's possible to write and read on certain variables of each texture, thanks to one of Creavion's requests a long time ago, which lead me to find that out. I just thought if I could do some UScript based textures by subclassing one or another, I could make it more dynamic.
I would need an external actor indeed, but for certain things it would be more simple to accomplish than making everything in a actor only.
But again, I have to check which properties can be changed (write and read) dynamically in a texture like in a normal actor, and how can I use them out in the mapping stage of my SP, since I know some of them can.
ah ok, good luck on that !
Image
Post Reply