Page 1 of 1

Uskaarj Turret needs some help with a problem

Posted: Wed May 21, 2003 3:47 pm
by barnEbiss
I found a guy to do the turret for our mod but he is have some problems with getting the turret to show up

This is his post
Ok, I'm working on making on class that will spawn two parts of a turrets, I think the code I have should work but for some reason it doesn't. Compiles fine though, but I can't see it if i place it in the editor or summon it ingame. Blocks my movement in game though. Heres what I have so far.

code:--------------------------------------------------------------------------------
class USkaarjRotTurret extends StationaryPawn;

var class<actor> BaseClass;
var class<actor> TopClass;
var actor TurretBase;
var actor TurretTop;
var float topzoffset;

event spawned()
{
local vector baselocation, toplocation;
TurretBase = spawn(BaseClass,,,,);
baselocation = TurretBase.location;
toplocation.z = topzoffset;
toplocation = baselocation+toplocation;
TurretTop = spawn(TopClass,,,toplocation,);
}

defaultproperties
{
BaseClass='Turrets.USTurretBase'
TopClass='Turrets.USTurretTop'
topzoffset=256
}
--------------------------------------------------------------------------------
it's pretty simple, spawn the base and spawn the top a set offset above it, offset I'm gonna tweak when i get it to actually show up. but for some reason it ain't workin. and i thought this was gonna be the easy part of it.

He is trying to make it spawn to meshes one for the top and one for the bottom what should he do to do this???

Posted: Wed May 21, 2003 4:34 pm
by jb
Ahhh good ol trouble shooting.

1) Read the logs. Chances are if there is an issue (for example you can not spawn objects that have the bNoDelete set to true). So have him check that for errors.

2) Now put logging statements in so when he reads the log he will find out where things are. For example, he can put a log statement in the PostBeginPlay of those turret clasess to see if they are even being created.

How are the turrents getting inot the game? He he summoning then from the console? Another class? Not shure what the baseclass and topclass are so its hard to tell if the errors lie in there...

Posted: Wed May 21, 2003 5:43 pm
by barnEbiss
He is trying to place it in the editor and it is not showing up

Posted: Wed May 21, 2003 5:53 pm
by jb
oh it has to be placeable to do that...the editor logs should have an error message.

Tell him to made sure in the class statement he defines it as beeing placeable:

Code: Select all

class Decoration extends Actor
	abstract
	placeable
	native;
(note: abstract and native will not be used by him)

Posted: Wed May 21, 2003 7:45 pm
by barnEbiss
No it’s not a decoration, he was just seeing if it was showing up like the other units.
I think his main problem is he is not sure how to make a thing spawn two meshes
What is the best way to load two meshes up?

Posted: Wed May 21, 2003 8:05 pm
by jb
I used decoration as an example. You can base it off the actor or another class just make sure its placeable And I showed you how to do that. You have to spawn two objects each with its own mesh. Again the code looks good for that from what I can see.

Posted: Wed May 21, 2003 8:37 pm
by barnEbiss
Hmm still no joy :(

These are the UC files for USTurretBase and USTurretTop
See if you can see anything wrong with them that would make the turret not show up

class USTurretBase extends StationaryPawn;

#exec MESH IMPORT MESH=turretbase ANIVFILE=MODELS\turretbase_a.3d DATAFILE=MODELS\turretbase_d.3d X=0 Y=0 Z=0
#exec mesh ORIGIN MESH=turretbase X=0 Y=0 Z=160

#exec mesh SEQUENCE MESH=turretbase SEQ=All STARTFRAME=0 NUMFRAMES=30

#exec MESHMAP new MESHMAP=turretbase MESH=turretbase
#exec MESHMAP SCALE MESHMAP=turretbase X=0.1 Y=0.1 Z=0.2

#exec TEXTURE IMPORT NAME=turretb FILE=Textures\NEGturret.pcx GROUP=Skins FLAGS=2
#exec TEXTURE IMPORT NAME=turretb FILE=Textures\NEGturret.pcx GROUP=Skins PALETTE=turretb
#exec MESHMAP SETTEXTURE MESHMAP=turretbase NUM=1 TEXTURE=turretb

defaultproperties
{
CollisionRadius=64
CollisionHeight=32
LODBias=4.0
Mesh=LodMesh'USkaarj.TurretBase'
}


class USTurretTop extends StationaryPawn;
#exec MESH IMPORT MESH=turrettop ANIVFILE=MODELS\turrettop_a.3d DATAFILE=MODELS\turrettop_d.3d X=0 Y=0 Z=0
#exec mesh ORIGIN MESH=turrettop X=0 Y=0 Z=64

#exec MESH SEQUENCE MESH=turrettop SEQ=All STARTFRAME=0 NUMFRAMES=30

#exec MESHMAP new MESHMAP=turrettop MESH=turrettop
#exec MESHMAP SCALE MESHMAP=turrettop X=0.1 Y=0.1 Z=0.2

#exec TEXTURE IMPORT NAME=turrettop FILE=Textures\NEGturret.pcx GROUP=Skins FLAGS=2
#exec TEXTURE IMPORT NAME=turrettop FILE=Textures\NEGturret.pcx GROUP=Skins PALETTE=turrettop
#exec MESHMAP SETTEXTURE MESHMAP=turrettop NUM=1 TEXTURE=turrettop

defaultproperties
{
CollisionRadius=0
CollisionHeight=0
LODBias=4.0
Mesh=LodMesh'USkaarj.TurretTop'
}

Posted: Wed May 21, 2003 9:40 pm
by jb
is this for UT or UT2k3?

Posted: Wed May 21, 2003 10:44 pm
by barnEbiss
UT :)

Posted: Thu May 22, 2003 12:04 pm
by jb
Hmmmm not sure why they wont show up for you ATM.


Do they show up in the mesh broswer???

Posted: Fri May 23, 2003 8:12 am
by defalc
Mr Evil has made turrets for UT2003. Maybe you could ask hbim for some assistance?

Posted: Fri May 23, 2003 11:49 am
by jeditobe1
His were UT2003 though and used meshes that shipped with the game i think.

Posted: Fri May 23, 2003 12:03 pm
by LoQtUS
Besides, the Mesh import process is totaly diffrent between the two games.