Gah - a solution with more questions. – EntropicLqd

Legacy:UScript Model Example

From Unreal Wiki, The Unreal Engine Documentation Site
Revision as of 15:08, 6 October 2003 by Dragonmaw (Talk)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This is the reference file for the model used ingame. In order to play with a custom model you MUST use this file in several other files like the main gun file.(An Example of this is the Minigun file for the minigun.) This example is of a hand flamer from first-person view, by the way. You use 3ds2unr to do this.

This is an example of a model transfered into UScript code:

class flamer extends Actor;
 
#exec MESH IMPORT MESH=flamer ANIVFILE=MODELS\flamer_a.3d DATAFILE=MODELS\flamer_d.3d X=0 Y=0 Z=0
#exec MESH ORIGIN MESH=flamer X=0 Y=0 Z=0
 
#exec MESH SEQUENCE MESH=flamer SEQ=All STARTFRAME=0 NUMFRAMES=30
#exec MESH SEQUENCE MESH=flamer SEQ=??? STARTFRAME=0 NUMFRAMES=30
 
#exec MESHMAP NEW MESHMAP=flamer MESH=flamer
#exec MESHMAP SCALE MESHMAP=flamer X=0.1 Y=0.1 Z=0.2
 
#exec TEXTURE IMPORT NAME=Jtex1 FILE=texture1.pcx GROUP=Skins FLAGS=2
#exec TEXTURE IMPORT NAME=Jtex1 FILE=texture1.pcx GROUP=Skins PALETTE=Jtex1
#exec MESHMAP SETTEXTURE MESHMAP=flamer NUM=1 TEXTURE=Jtex1
 
#exec TEXTURE IMPORT NAME=Jtex2 FILE=texture2.pcx GROUP=Skins FLAGS=2
#exec TEXTURE IMPORT NAME=Jtex2 FILE=texture2.pcx GROUP=Skins PALETTE=Jtex2
#exec MESHMAP SETTEXTURE MESHMAP=flamer NUM=2 TEXTURE=Jtex2
 
#exec TEXTURE IMPORT NAME=Jtex3 FILE=texture3.pcx GROUP=Skins FLAGS=2
#exec TEXTURE IMPORT NAME=Jtex3 FILE=texture3.pcx GROUP=Skins PALETTE=Jtex3
#exec MESHMAP SETTEXTURE MESHMAP=flamer NUM=3 TEXTURE=Jtex3
 
#exec TEXTURE IMPORT NAME=Jtex4 FILE=texture4.pcx GROUP=Skins FLAGS=2
#exec TEXTURE IMPORT NAME=Jtex4 FILE=texture4.pcx GROUP=Skins PALETTE=Jtex4
#exec MESHMAP SETTEXTURE MESHMAP=flamer NUM=4 TEXTURE=Jtex4
 
#exec TEXTURE IMPORT NAME=Jtex5 FILE=texture5.pcx GROUP=Skins FLAGS=2
#exec TEXTURE IMPORT NAME=Jtex5 FILE=texture5.pcx GROUP=Skins PALETTE=Jtex5
#exec MESHMAP SETTEXTURE MESHMAP=flamer NUM=5 TEXTURE=Jtex5
 
#exec TEXTURE IMPORT NAME=Jtex6 FILE=texture6.pcx GROUP=Skins FLAGS=2
#exec TEXTURE IMPORT NAME=Jtex6 FILE=texture6.pcx GROUP=Skins PALETTE=Jtex6
#exec MESHMAP SETTEXTURE MESHMAP=flamer NUM=6 TEXTURE=Jtex6
 
#exec TEXTURE IMPORT NAME=Jtex7 FILE=texture7.pcx GROUP=Skins FLAGS=2
#exec TEXTURE IMPORT NAME=Jtex7 FILE=texture7.pcx GROUP=Skins PALETTE=Jtex7
#exec MESHMAP SETTEXTURE MESHMAP=flamer NUM=7 TEXTURE=Jtex7
 
#exec TEXTURE IMPORT NAME=Jtex8 FILE=texture8.pcx GROUP=Skins FLAGS=2
#exec TEXTURE IMPORT NAME=Jtex8 FILE=texture8.pcx GROUP=Skins PALETTE=Jtex8
#exec MESHMAP SETTEXTURE MESHMAP=flamer NUM=8 TEXTURE=Jtex8
 
#exec TEXTURE IMPORT NAME=Jtex9 FILE=texture9.pcx GROUP=Skins FLAGS=2
#exec TEXTURE IMPORT NAME=Jtex9 FILE=texture9.pcx GROUP=Skins PALETTE=Jtex9
#exec MESHMAP SETTEXTURE MESHMAP=flamer NUM=9 TEXTURE=Jtex9
 
#exec TEXTURE IMPORT NAME=Jtex10 FILE=texture10.pcx GROUP=Skins FLAGS=2
#exec TEXTURE IMPORT NAME=Jtex10 FILE=texture10.pcx GROUP=Skins PALETTE=Jtex10
#exec MESHMAP SETTEXTURE MESHMAP=flamer NUM=10 TEXTURE=Jtex10
 
#exec TEXTURE IMPORT NAME=Jtex11 FILE=texture11.pcx GROUP=Skins FLAGS=2
#exec TEXTURE IMPORT NAME=Jtex11 FILE=texture11.pcx GROUP=Skins PALETTE=Jtex11
#exec MESHMAP SETTEXTURE MESHMAP=flamer NUM=11 TEXTURE=Jtex11
 
#exec TEXTURE IMPORT NAME=Jtex12 FILE=texture12.pcx GROUP=Skins FLAGS=2
#exec TEXTURE IMPORT NAME=Jtex12 FILE=texture12.pcx GROUP=Skins PALETTE=Jtex12
#exec MESHMAP SETTEXTURE MESHMAP=flamer NUM=12 TEXTURE=Jtex12
 
#exec TEXTURE IMPORT NAME=Jtex13 FILE=texture13.pcx GROUP=Skins FLAGS=2
#exec TEXTURE IMPORT NAME=Jtex13 FILE=texture13.pcx GROUP=Skins PALETTE=Jtex13
#exec MESHMAP SETTEXTURE MESHMAP=flamer NUM=13 TEXTURE=Jtex13
 
#exec TEXTURE IMPORT NAME=Jtex14 FILE=texture14.pcx GROUP=Skins FLAGS=2
#exec TEXTURE IMPORT NAME=Jtex14 FILE=texture14.pcx GROUP=Skins PALETTE=Jtex14
#exec MESHMAP SETTEXTURE MESHMAP=flamer NUM=14 TEXTURE=Jtex14
 
#exec TEXTURE IMPORT NAME=Jtex15 FILE=texture15.pcx GROUP=Skins FLAGS=2
#exec TEXTURE IMPORT NAME=Jtex15 FILE=texture15.pcx GROUP=Skins PALETTE=Jtex15
#exec MESHMAP SETTEXTURE MESHMAP=flamer NUM=15 TEXTURE=Jtex15
 
#exec TEXTURE IMPORT NAME=Jtex16 FILE=texture16.pcx GROUP=Skins FLAGS=2
#exec TEXTURE IMPORT NAME=Jtex16 FILE=texture16.pcx GROUP=Skins PALETTE=Jtex16
#exec MESHMAP SETTEXTURE MESHMAP=flamer NUM=16 TEXTURE=Jtex16
 
#exec TEXTURE IMPORT NAME=Jtex17 FILE=texture17.pcx GROUP=Skins FLAGS=2
#exec TEXTURE IMPORT NAME=Jtex17 FILE=texture17.pcx GROUP=Skins PALETTE=Jtex17
#exec MESHMAP SETTEXTURE MESHMAP=flamer NUM=17 TEXTURE=Jtex17
 
#exec TEXTURE IMPORT NAME=Jtex18 FILE=texture18.pcx GROUP=Skins FLAGS=2
#exec TEXTURE IMPORT NAME=Jtex18 FILE=texture18.pcx GROUP=Skins PALETTE=Jtex18
#exec MESHMAP SETTEXTURE MESHMAP=flamer NUM=18 TEXTURE=Jtex18
 
#exec TEXTURE IMPORT NAME=Jtex19 FILE=texture19.pcx GROUP=Skins FLAGS=2
#exec TEXTURE IMPORT NAME=Jtex19 FILE=texture19.pcx GROUP=Skins PALETTE=Jtex19
#exec MESHMAP SETTEXTURE MESHMAP=flamer NUM=19 TEXTURE=Jtex19
 
#exec TEXTURE IMPORT NAME=Jtex20 FILE=texture20.pcx GROUP=Skins FLAGS=2
#exec TEXTURE IMPORT NAME=Jtex20 FILE=texture20.pcx GROUP=Skins PALETTE=Jtex20
#exec MESHMAP SETTEXTURE MESHMAP=flamer NUM=20 TEXTURE=Jtex20
 
#exec TEXTURE IMPORT NAME=Jtex21 FILE=texture21.pcx GROUP=Skins FLAGS=2
#exec TEXTURE IMPORT NAME=Jtex21 FILE=texture21.pcx GROUP=Skins PALETTE=Jtex21
#exec MESHMAP SETTEXTURE MESHMAP=flamer NUM=21 TEXTURE=Jtex21
 
#exec TEXTURE IMPORT NAME=Jtex22 FILE=texture22.pcx GROUP=Skins FLAGS=2
#exec TEXTURE IMPORT NAME=Jtex22 FILE=texture22.pcx GROUP=Skins PALETTE=Jtex22
#exec MESHMAP SETTEXTURE MESHMAP=flamer NUM=22 TEXTURE=Jtex22
 
defaultproperties
{
    DrawType=DT_Mesh
    Mesh=flamer
}

Foxpaw: This sounds interesting, but what exactly does this do, and how is it done?

Dragonmaw: This is the reference file for the model used ingame. In order to play with a custom model you MUST use this file in several other files like the main gun file.(An Example of this is the Minigun file for the minigun.) This example is of a hand flamer from first-person view, by the way. You use 3ds2unr to do this.