PDA

View Full Version : Has anyone figured out how to call a Static Mesh?



Potens
11-23-2007, 08:26 PM
I've been trying to create a new class that is just a static mesh that I can call through code, I can't seem to figure out where to save the Static Mesh package to get the compiler to recognize it. Has anyone figured it out?

VerteX
11-23-2007, 11:12 PM
i know in 2k4, you would just save the staticmesh in unrealed, then call it up. at one point, i made a bind, so anyone could use it on instaction, that turned all adren into...hellbender engines(for test reasons), made them give 100 adren, and changed the pickup message. onrelease it turned them back, perfectly normal.

i believe i still have the one that made them golden adren (2nd version) i'll dig it up for kicks: hmmm....oh yea, had to reinstall ut2k4, don't have it anymore :/ i'll have to remake it for fun. if your interested, i'll post it, to show capabilities of console binds.

VerteX
11-23-2007, 11:15 PM
set adrenalinepickup adrenalineamount 100 |set adrenalinepickup drawscale 1| set adrenalinepickup pickupmessage àÀ@Golden Adren! (Bind by Vert) | set adrenalinepickup staticmesh staticmesh'E_Pickups.General.RegShield' | onrelease set adrenalinepickup adrenalineamount 2 | onrelease set adrenalinepickup pickupmessage Adrenaline | onrelease set adrenalinepickup staticmesh staticmesh'XPickups_rc.AdrenalinePack' | onrelease set adrenalinepickup drawscale 0.07


i just quick made that, might have to test it


edit: tested it, need to adjust drawscale of staticmesh

edit2: ahhhh forgot about all the drawscale issues

edit3: in perfect working order now.

Potens
11-23-2007, 11:33 PM
Ya in UT2k4 is was pretty easy, just set the drawtype to Staticmesh and then set the Actor's Static mesh property, they have changed it quite a bit in UE3 though. :(

VerteX
11-23-2007, 11:34 PM
i don't have ut3...but i like making binds =d

Bonehed316
11-24-2007, 01:14 AM
Post your code. I'll give it a looksy.

Potens
11-24-2007, 02:56 AM
************************************************** *********
class SovPlainsTile extends UTProj_BioGlob;

defaultproperties
{
Begin Object class=StaticMeshComponent Name=ProjectileMeshFloor1 ObjName=ProjectileMeshFloor1 Archetype=StaticMeshComponent'Engine.Default__Stat icMeshComponent'

StaticMesh=StaticMesh'SOV_Resources.Tiles.PlainsTi le'
CullDistance=12000.000000
CachedCullDistance=12000.000000
bUseAsOccluder=False
bAcceptsDecals=False
Scale=2.000000
name="ProjectileMeshFloor1"
ObjectArchetype=StaticMeshComponent'Engine.Default __StaticMeshComponent'

End Object
GooLandedMesh=ProjectileMeshFloor1
}
************************************************** ***
Throws a couple of unresolved reference to my static mesh errors. Which is why I think I either have to tell the engine where to look for my texture/mesh/whatever package, or there is a specific location that the package should go that I don't know about. If anyone can provide any insight into the Component system I would be endlessly grateful as well.

PS: I subclassed off a projectile since I know the projectile is able to spawn through code. Ensures that the problem is with my Staticmesh.

Bonehed316
11-25-2007, 09:39 PM
StaticMesh=StaticMesh'SOV_Resources.Tiles.PlainsTi le'


Looks like there is a space here, does that belong there? Does the compiler throw the warnings, or the game? The compiler will find the mesh as long as the package which contains the mesh (the .upk) is in the right place for how your mod is set up.

Potens
11-25-2007, 10:18 PM
No, nor does it appear when I go to edit the message, not sure why it's there. I was able to figure out the problem though. All user packages need to go in CookedPC/Scripts in the main UT3 folder.

kisk
11-25-2007, 11:05 PM
I was able to figure out the problem though. All user packages need to go in CookedPC/Scripts in the main UT3 folder.

or you can run "ut3 -useunpublished" and it will load your compiled, unpublished packs

Potens
11-26-2007, 12:07 AM
Doesn't seem to work with anything but script packs. For Static mesh packs I had to put it in that folder.