![]() |
![]() |
|
#1
|
|||
|
|||
|
I have a class MozP4H_Skirt (subclass RODummyattachment) which I want to attach to my pawn (MozP4HTank)
For some reason this code isn't working. (wont compile at all) Code:
var class<StaticMesh> SMeshvar, SpawnedSMesh;
function PostBeginPlay()
{
MozP4H_Skirt = Spawn(SpawnedSmesh, self,, Location, Rotation);
AttachToBone(MozP4H_Skirt, spine);
}
__________________
![]() Last edited by Moz; 08-10-2006 at 02:25 AM. |
|
#2
|
|||
|
|||
|
also, how would I go about scaling a bone on a pawn (turret) but on just one axis (to lengthen the barrel)
I was also worrying if I attach the SM it wont disappear then the vehicle is destroyed.
__________________
![]() |
|
#3
|
||||
|
||||
|
from what class is that code above? is that from your subclassed Pz4?
Or from your skirts class? If the later it cant work. But i think i got it right and thatsthe code form the Pz4. Anyway, whats the error message? Aint the bone a name and should be 'spine' (if there is a spine bone on a Pz4 Skel )As for the destroyed model, no you wont see it there unless you modify it and spawn a different model when the tank is destroyed. |
|
#4
|
|||
|
|||
|
Its from the Tank Class. I did have it set to body instead of spine but that one on the clipboard had the spine still.
__________________
![]() |
|
#5
|
||||
|
||||
|
also in ' ' ? The error message would really help
![]() btw. why Code:
var class<StaticMesh> SMeshvar, SpawnedSMesh; |
|
#6
|
|||
|
|||
|
Quote:
(photoshop, unrealed, winamp, thunderbird, MSPaint and now wotgreal all running and processing things at the same time :S)
__________________
![]() |
|
#7
|
|||
|
|||
|
Error: E:\Program Files\Valve\Steam\SteamApps\common\red orchestra\MozP4H\Classes\MozP4HTank.uc(16) : Error, 'MozP4H_Skirt': Bad command or expression
__________________
![]() |
|
#8
|
||||
|
||||
|
i take it MozP4H_Skirt is not defined anywhere? You need something like
Code:
local StaticMesh MozP4H_Skirt; |
|
#9
|
|||
|
|||
|
Code:
var class<StaticMesh> SMeshvar, MozP4H_Skirt;
function PostBeginPlay()
{
MozP4H_Skirt = Spawn(MozP4H_Skirt, self,, Location, Rotation);
AttachToBone(MozP4H_Skirt, spine);
}
__________________
![]() |
|
#10
|
||||
|
||||
|
Code:
var class<StaticMesh> SMeshvar, MozP4H_Skirt;
function PostBeginPlay()
{
local StaticMesh MozP4H_Skirt;
MozP4H_Skirt = Spawn(MozP4H_Skirt, self,, Location, Rotation);
AttachToBone(MozP4H_Skirt, spine);
}
|
|
#11
|
|||
|
|||
|
Doesn't it need to be <actor> since MozP4H_Skirt is infact an actor?
edit: ![]() Error: E:\Program Files\Valve\Steam\SteamApps\common\red orchestra\MozP4H\Classes\MozP4HTank.uc(18) : Error, Call to 'Spawn': type mismatch in parameter 1 Warning: E:\Program Files\Valve\Steam\SteamApps\common\red orchestra\MozP4H\Classes\MozP4HTank.uc(16) : Warning, 'MozP4H_Skirt' obscures 'MozP4H_Skirt' defined in base class 'MozP4HTank'.
__________________
![]() |
|
#12
|
||||
|
||||
|
thats why i asked wether MozP4H_Skirt is declared anywhere. Obviously it is, then you dont need the local var. (overlooked it in your code :x)
i still dont know why you do Code:
var class<StaticMesh> SMeshvar, MozP4H_Skirt; |
|
#13
|
||||
|
||||
|
I'm wondering if you can create teh skirt as a skeletal mesh to attach it to the root tank-bottom bone.. basically exactly how the ammo pouches are done.
Just subclass the PanzerVIF2Tank and mimic how the player equipment gets attached... |
|
#14
|
|||
|
|||
|
Quote:
![]() I scanned through the ROPawn and I couldn't find anything attachtobone related and the way ammo is attached is weapon related. I also can't make the skirts Skeletal meshes because I do no have a modeling program that can export sketetal meshes.
__________________
![]() |
|
#15
|
|||
|
|||
|
I'm pulling my hair out trying to figure this out, I'm willing to email the both UC files to anyone that can figure this out. it seems so simple but I can't get it to work.
__________________
![]() |
|
#16
|
|||
|
|||
|
Here is the abridged version of my class.
What do I have to do to make this work. Code:
//===================================================================
// PanzerIV Ausf H Tank
//===================================================================
class MozP4HTank extends ROTreadCraft;
#exec OBJ LOAD FILE=..\Animations\MozP4H_anm.ukx
// DOESN'T ****ING WORK
var class<MozP4HSkirt> BodySkirtClass;
var array<MozP4HSkirt> BodySkirt;
function PostBeginPlay()
{
if (BodySkirt == None)
{
BodySkirt = Spawn(BodySkirtClass, self, Location, Rotation);
Bodyskirt.SetBase(self)
AttachToBone(actor'MozP4H.MozP4HSkirt', 'body' );
}
}
defaultproperties
{
}
__________________
![]() |
|
#17
|
||||
|
||||
|
this doesnt compile, right?
why do you try to use a dynamic array for the skirt? Does it consist of more than one part? Code:
BodySkirt = Spawn(BodySkirtClass, self, Location, Rotation); something like Code:
BodySkirt[0] = Spawn(BodySkirtClass, self, Location, Rotation); Code:
var array<MozP4HSkirt> BodySkirt; Code:
var MozP4HSkirt BodySkirt; |
|
#18
|
|||
|
|||
|
Code:
var class<MozP4HSkirt> BodySkirtClass;
var MozP4HSkirt BodySkirt;
function PostBeginPlay()
{
if (BodySkirt == None)
{
BodySkirt = Spawn(BodySkirtClass, self, Location, Rotation);
Bodyskirt.SetBase(self)
AttachToBone(actor'MozP4H.MozP4HSkirt', 'body' );
}
}
I have no idea what I am doing.
__________________
![]() |
|
#19
|
||||
|
||||
|
Quote:
/edit: I accidentally posted that. I had re-written most of the stuff.
__________________
Last edited by Maj.Faux-Pas; 08-11-2006 at 03:32 PM. |
|
#20
|
|||
|
|||
|
Error: E:\Program Files\Valve\Steam\SteamApps\common\red orchestra\MozP4H\Classes\MozP4HTank.uc(9) : Error, Missing ';' before 'BodySkirtClass'
also, I've stated this before but I'll state it again. I am not a coder, I have no idea what I am doing. I don't know the first thing about C++ and Java script, I just read what something does and (unsuccessfully) try and recreate it for my means. I'm a hack and I can't figure out how to hack this damn MozP4HSkirt to attach to the body bone of MozP4HTank!!
__________________
![]() |
![]() |
| Thread Tools | |
| Display Modes | |
|
|