Bringing over classes from TNM SDK
Bringing over classes from TNM SDK
So I'm trying to get the "PlasticCoffee" class, from TNM, into my package, but it never actually places in the map even though it shows up in the actor classes browser.
In Ued1, I can view it fine in the mesh viewer, but when I try to place it, it does not place.
In Ued2, the mesh appears as a jumbled mesh in the mesh viewer.
The only way I can place plastic coffee is to import all the .u files from TNM first. And then it seems to be able to load the plasticcoffee from TNMItems, -and- the one I have built in my package.
What is causing this?
In Ued1, I can view it fine in the mesh viewer, but when I try to place it, it does not place.
In Ued2, the mesh appears as a jumbled mesh in the mesh viewer.
The only way I can place plastic coffee is to import all the .u files from TNM first. And then it seems to be able to load the plasticcoffee from TNMItems, -and- the one I have built in my package.
What is causing this?
What I do in my other free time:
http://www.youtube.com/watch?v=e3FfPUKuGsQ
http://www.youtube.com/watch?v=e3FfPUKuGsQ
Re: Bringing over classes from TNM SDK
Are you retaining the file structure or updating the class to reflect your own structure? Have you remembered to change the references to the TNMItems package?
Jonas Wæver
Chief Poking Manager of TNM
I've made some videogames:
Expeditions: Rome
Expeditions: Viking
Expeditions: Conquistador
Clandestine
Chief Poking Manager of TNM
I've made some videogames:
Expeditions: Rome
Expeditions: Viking
Expeditions: Conquistador
Clandestine
Re: Bringing over classes from TNM SDK
Yeah it actually looks like this:
//=============================================================================
// PlasticCoffee.
//=============================================================================
class PlasticCoffee extends DeusExPickup;
state Activated
{
function Activate()
{
// can't turn it off
}
function BeginState()
{
local DeusExPlayer player;
Super.BeginState();
player = DeusExPlayer(Owner);
if (player != None)
{
player.HealPlayer(2, False);
player.ChargePlayer(2);
}
PlaySound(sound'MaleBurp');
UseOnce();
}
Begin:
}
// Belt and inventory icons
#exec texture IMPORT NAME=BeltIconPlasticCup FILE=Models\BeltIconPlasticCup.pcx GROUP=Skins MIPS=off
#exec texture IMPORT NAME=LargeIconPlasticCup FILE=Models\LargeIconPlasticCup.pcx GROUP=Skins MIPS=off
#exec MESH IMPORT MESH=PlasticCoffee ANIVFILE=Models\PlasticCoffee_a.3d DATAFILE=Models\PlasticCoffee_d.3d X=0 Y=0 Z=0
#exec MESH ORIGIN MESH=PlasticCoffee X=0 Y=0 Z=0
#exec MESH SEQUENCE MESH=PlasticCoffee SEQ=All STARTFRAME=0 NUMFRAMES=1
#exec MESH SEQUENCE MESH=PlasticCoffee SEQ=CoffeeCup STARTFRAME=0 NUMFRAMES=1
#exec TEXTURE IMPORT NAME=JPlasticCoffee1 FILE=Models\PCoffeeTex1.PCX GROUP=Skins // Material #2
#exec TEXTURE IMPORT NAME=JPlasticCoffee2 FILE=Models\PCoffeeTex2.PCX GROUP=Skins // Material #3
#exec MESHMAP NEW MESHMAP=PlasticCoffee MESH=PlasticCoffee
#exec MESHMAP SCALE MESHMAP=PlasticCoffee X=0.00390625 Y=0.00390625 Z=0.00390625
#exec MESHMAP SETTEXTURE MESHMAP=PlasticCoffee NUM=1 TEXTURE=JPlasticCoffee1
#exec MESHMAP SETTEXTURE MESHMAP=PlasticCoffee NUM=2 TEXTURE=JPlasticCoffee2
defaultproperties
{
maxCopies=10
bCanHaveMultipleCopies=True
bActivatable=True
ItemName="Coffee"
ItemArticle="some"
PlayerViewOffset=(X=30.000000,Z=-12.000000)
PlayerViewMesh=LodMesh'DeusExPickup.PlasticCoffee'
PickupViewMesh=LodMesh'DeusExPickup.PlasticCoffee'
PickupViewScale=0.600000
ThirdPersonMesh=LodMesh'DeusExPickup.PlasticCoffee'
ThirdPersonScale=0.400000
LandSound=Sound'DeusExSounds.Generic.MetalHit1'
Icon=Texture'DeusExPickup.Skins.BeltIconPlasticCup'
largeIcon=Texture'DeusExPickup.Skins.LargeIconPlasticCup'
largeIconWidth=24
largeIconHeight=45
Description="Coffee belongs to the botanical family Rubiaceae, which has some 500 genera and over 6,000 species. Most are tropical trees and shrubs which grow in the lower storey of forests. Other members of the family include the gardenias and plants which yield quinine and other useful substances, but Coffea is by far the most important member of the family economically.|n|nThis particular coffee came in a cheap plastic cup. When consumed, it will replenish a bit of both your health and your bio energy... let's hear it for caffeine."
beltDescription="Coffee"
Mesh=LodMesh'DeusExPickup.PlasticCoffee'
DrawScale=0.600000
CollisionRadius=3.000000
CollisionHeight=3.500000
Mass=5.000000
Buoyancy=3.000000
}
//=============================================================================
// PlasticCoffee.
//=============================================================================
class PlasticCoffee extends DeusExPickup;
state Activated
{
function Activate()
{
// can't turn it off
}
function BeginState()
{
local DeusExPlayer player;
Super.BeginState();
player = DeusExPlayer(Owner);
if (player != None)
{
player.HealPlayer(2, False);
player.ChargePlayer(2);
}
PlaySound(sound'MaleBurp');
UseOnce();
}
Begin:
}
// Belt and inventory icons
#exec texture IMPORT NAME=BeltIconPlasticCup FILE=Models\BeltIconPlasticCup.pcx GROUP=Skins MIPS=off
#exec texture IMPORT NAME=LargeIconPlasticCup FILE=Models\LargeIconPlasticCup.pcx GROUP=Skins MIPS=off
#exec MESH IMPORT MESH=PlasticCoffee ANIVFILE=Models\PlasticCoffee_a.3d DATAFILE=Models\PlasticCoffee_d.3d X=0 Y=0 Z=0
#exec MESH ORIGIN MESH=PlasticCoffee X=0 Y=0 Z=0
#exec MESH SEQUENCE MESH=PlasticCoffee SEQ=All STARTFRAME=0 NUMFRAMES=1
#exec MESH SEQUENCE MESH=PlasticCoffee SEQ=CoffeeCup STARTFRAME=0 NUMFRAMES=1
#exec TEXTURE IMPORT NAME=JPlasticCoffee1 FILE=Models\PCoffeeTex1.PCX GROUP=Skins // Material #2
#exec TEXTURE IMPORT NAME=JPlasticCoffee2 FILE=Models\PCoffeeTex2.PCX GROUP=Skins // Material #3
#exec MESHMAP NEW MESHMAP=PlasticCoffee MESH=PlasticCoffee
#exec MESHMAP SCALE MESHMAP=PlasticCoffee X=0.00390625 Y=0.00390625 Z=0.00390625
#exec MESHMAP SETTEXTURE MESHMAP=PlasticCoffee NUM=1 TEXTURE=JPlasticCoffee1
#exec MESHMAP SETTEXTURE MESHMAP=PlasticCoffee NUM=2 TEXTURE=JPlasticCoffee2
defaultproperties
{
maxCopies=10
bCanHaveMultipleCopies=True
bActivatable=True
ItemName="Coffee"
ItemArticle="some"
PlayerViewOffset=(X=30.000000,Z=-12.000000)
PlayerViewMesh=LodMesh'DeusExPickup.PlasticCoffee'
PickupViewMesh=LodMesh'DeusExPickup.PlasticCoffee'
PickupViewScale=0.600000
ThirdPersonMesh=LodMesh'DeusExPickup.PlasticCoffee'
ThirdPersonScale=0.400000
LandSound=Sound'DeusExSounds.Generic.MetalHit1'
Icon=Texture'DeusExPickup.Skins.BeltIconPlasticCup'
largeIcon=Texture'DeusExPickup.Skins.LargeIconPlasticCup'
largeIconWidth=24
largeIconHeight=45
Description="Coffee belongs to the botanical family Rubiaceae, which has some 500 genera and over 6,000 species. Most are tropical trees and shrubs which grow in the lower storey of forests. Other members of the family include the gardenias and plants which yield quinine and other useful substances, but Coffea is by far the most important member of the family economically.|n|nThis particular coffee came in a cheap plastic cup. When consumed, it will replenish a bit of both your health and your bio energy... let's hear it for caffeine."
beltDescription="Coffee"
Mesh=LodMesh'DeusExPickup.PlasticCoffee'
DrawScale=0.600000
CollisionRadius=3.000000
CollisionHeight=3.500000
Mass=5.000000
Buoyancy=3.000000
}
What I do in my other free time:
http://www.youtube.com/watch?v=e3FfPUKuGsQ
http://www.youtube.com/watch?v=e3FfPUKuGsQ
Re: Bringing over classes from TNM SDK
Is your package called DeusExPickup?
Jonas Wæver
Chief Poking Manager of TNM
I've made some videogames:
Expeditions: Rome
Expeditions: Viking
Expeditions: Conquistador
Clandestine
Chief Poking Manager of TNM
I've made some videogames:
Expeditions: Rome
Expeditions: Viking
Expeditions: Conquistador
Clandestine
Re: Bringing over classes from TNM SDK
Ok, it works now, I included it at the bottom, and thanks for pointing me in the right direction, Jonas.
However it does not seem to charge the bioelectric energy. Any idea why?
Also, even though it appears jumbled up in Ued2, it will actually be fine when you run the game.
//=============================================================================
// PlasticCoffee.
//=============================================================================
class PlasticCoffee extends DeusExPickup;
state Activated
{
function Activate()
{
// can't turn it off
}
function BeginState()
{
local DeusExPlayer player;
Super.BeginState();
player = DeusExPlayer(Owner);
if (player != None)
{
player.HealPlayer(2, False);
player.ChargePlayer(2);
}
PlaySound(sound'MaleBurp');
UseOnce();
}
Begin:
}
// Belt and inventory icons
#exec texture IMPORT NAME=BeltIconPlasticCup FILE=Models\BeltIconPlasticCup.pcx GROUP=IWR MIPS=off
#exec texture IMPORT NAME=LargeIconPlasticCup FILE=Models\LargeIconPlasticCup.pcx GROUP=IWR MIPS=off
#exec MESH IMPORT MESH=PlasticCoffee ANIVFILE=Models\PlasticCoffee_a.3d DATAFILE=Models\PlasticCoffee_d.3d X=0 Y=0 Z=0
#exec MESH ORIGIN MESH=PlasticCoffee X=0 Y=0 Z=0
#exec MESH SEQUENCE MESH=PlasticCoffee SEQ=All STARTFRAME=0 NUMFRAMES=1
#exec MESH SEQUENCE MESH=PlasticCoffee SEQ=CoffeeCup STARTFRAME=0 NUMFRAMES=1
#exec TEXTURE IMPORT NAME=JPlasticCoffee1 FILE=Models\PCoffeeTex1.PCX GROUP=IWR // Material #2
#exec TEXTURE IMPORT NAME=JPlasticCoffee2 FILE=Models\PCoffeeTex2.PCX GROUP=IWR // Material #3
#exec MESHMAP NEW MESHMAP=PlasticCoffee MESH=PlasticCoffee
#exec MESHMAP SCALE MESHMAP=PlasticCoffee X=0.00390625 Y=0.00390625 Z=0.00390625
#exec MESHMAP SETTEXTURE MESHMAP=PlasticCoffee NUM=1 TEXTURE=JPlasticCoffee1
#exec MESHMAP SETTEXTURE MESHMAP=PlasticCoffee NUM=2 TEXTURE=JPlasticCoffee2
defaultproperties
{
maxCopies=10
bCanHaveMultipleCopies=True
bActivatable=True
ItemName="Coffee"
ItemArticle="some"
PlayerViewOffset=(X=30.000000,Z=-12.000000)
PlayerViewMesh=LodMesh'IWR.PlasticCoffee'
PickupViewMesh=LodMesh'IWR.PlasticCoffee'
PickupViewScale=0.600000
ThirdPersonMesh=LodMesh'IWR.PlasticCoffee'
ThirdPersonScale=0.400000
LandSound=Sound'DeusExSounds.Generic.MetalHit1'
Icon=Texture'IWR.IWR.BeltIconPlasticCup'
largeIcon=Texture'IWR.IWR.LargeIconPlasticCup'
largeIconWidth=24
largeIconHeight=45
Description="Coffee belongs to the botanical family Rubiaceae, which has some 500 genera and over 6,000 species. Most are tropical
trees and shrubs which grow in the lower storey of forests. Other members of the family include the gardenias and plants which yield
quinine and other useful substances, but Coffea is by far the most important member of the family economically.|n|nThis particular coffee
came in a cheap plastic cup. When consumed, it will replenish a bit of both your health and your bio energy... let's hear it for
caffeine."
beltDescription="Coffee"
Mesh=LodMesh'IWR.PlasticCoffee'
DrawScale=0.600000
CollisionRadius=3.000000
CollisionHeight=3.500000
Mass=5.000000
Buoyancy=3.000000
}
However it does not seem to charge the bioelectric energy. Any idea why?
Also, even though it appears jumbled up in Ued2, it will actually be fine when you run the game.
//=============================================================================
// PlasticCoffee.
//=============================================================================
class PlasticCoffee extends DeusExPickup;
state Activated
{
function Activate()
{
// can't turn it off
}
function BeginState()
{
local DeusExPlayer player;
Super.BeginState();
player = DeusExPlayer(Owner);
if (player != None)
{
player.HealPlayer(2, False);
player.ChargePlayer(2);
}
PlaySound(sound'MaleBurp');
UseOnce();
}
Begin:
}
// Belt and inventory icons
#exec texture IMPORT NAME=BeltIconPlasticCup FILE=Models\BeltIconPlasticCup.pcx GROUP=IWR MIPS=off
#exec texture IMPORT NAME=LargeIconPlasticCup FILE=Models\LargeIconPlasticCup.pcx GROUP=IWR MIPS=off
#exec MESH IMPORT MESH=PlasticCoffee ANIVFILE=Models\PlasticCoffee_a.3d DATAFILE=Models\PlasticCoffee_d.3d X=0 Y=0 Z=0
#exec MESH ORIGIN MESH=PlasticCoffee X=0 Y=0 Z=0
#exec MESH SEQUENCE MESH=PlasticCoffee SEQ=All STARTFRAME=0 NUMFRAMES=1
#exec MESH SEQUENCE MESH=PlasticCoffee SEQ=CoffeeCup STARTFRAME=0 NUMFRAMES=1
#exec TEXTURE IMPORT NAME=JPlasticCoffee1 FILE=Models\PCoffeeTex1.PCX GROUP=IWR // Material #2
#exec TEXTURE IMPORT NAME=JPlasticCoffee2 FILE=Models\PCoffeeTex2.PCX GROUP=IWR // Material #3
#exec MESHMAP NEW MESHMAP=PlasticCoffee MESH=PlasticCoffee
#exec MESHMAP SCALE MESHMAP=PlasticCoffee X=0.00390625 Y=0.00390625 Z=0.00390625
#exec MESHMAP SETTEXTURE MESHMAP=PlasticCoffee NUM=1 TEXTURE=JPlasticCoffee1
#exec MESHMAP SETTEXTURE MESHMAP=PlasticCoffee NUM=2 TEXTURE=JPlasticCoffee2
defaultproperties
{
maxCopies=10
bCanHaveMultipleCopies=True
bActivatable=True
ItemName="Coffee"
ItemArticle="some"
PlayerViewOffset=(X=30.000000,Z=-12.000000)
PlayerViewMesh=LodMesh'IWR.PlasticCoffee'
PickupViewMesh=LodMesh'IWR.PlasticCoffee'
PickupViewScale=0.600000
ThirdPersonMesh=LodMesh'IWR.PlasticCoffee'
ThirdPersonScale=0.400000
LandSound=Sound'DeusExSounds.Generic.MetalHit1'
Icon=Texture'IWR.IWR.BeltIconPlasticCup'
largeIcon=Texture'IWR.IWR.LargeIconPlasticCup'
largeIconWidth=24
largeIconHeight=45
Description="Coffee belongs to the botanical family Rubiaceae, which has some 500 genera and over 6,000 species. Most are tropical
trees and shrubs which grow in the lower storey of forests. Other members of the family include the gardenias and plants which yield
quinine and other useful substances, but Coffea is by far the most important member of the family economically.|n|nThis particular coffee
came in a cheap plastic cup. When consumed, it will replenish a bit of both your health and your bio energy... let's hear it for
caffeine."
beltDescription="Coffee"
Mesh=LodMesh'IWR.PlasticCoffee'
DrawScale=0.600000
CollisionRadius=3.000000
CollisionHeight=3.500000
Mass=5.000000
Buoyancy=3.000000
}
What I do in my other free time:
http://www.youtube.com/watch?v=e3FfPUKuGsQ
http://www.youtube.com/watch?v=e3FfPUKuGsQ
Re: Bringing over classes from TNM SDK
This:
...means your player class needs a function called ChargePlayer. I'm not at home right now so I can't check, but that may be something we added, in which case you should be able to find it in Trestkon.uc and copy it into your player class.Neveos wrote:player.ChargePlayer(2);
Jonas Wæver
Chief Poking Manager of TNM
I've made some videogames:
Expeditions: Rome
Expeditions: Viking
Expeditions: Conquistador
Clandestine
Chief Poking Manager of TNM
I've made some videogames:
Expeditions: Rome
Expeditions: Viking
Expeditions: Conquistador
Clandestine
Re: Bringing over classes from TNM SDK
hmmm, yeah it wasn't in the trestkon.u, but it's not really a big deal.
However, I am very interested in this "TriggerablePlayerTeleporter". Does this mean I can teleport the player with the push of a button? Because I can't seem to be able to actually do that. I need it to 'operate' an elevator to another level which is another map.
However, I am very interested in this "TriggerablePlayerTeleporter". Does this mean I can teleport the player with the push of a button? Because I can't seem to be able to actually do that. I need it to 'operate' an elevator to another level which is another map.
What I do in my other free time:
http://www.youtube.com/watch?v=e3FfPUKuGsQ
http://www.youtube.com/watch?v=e3FfPUKuGsQ
Re: Bringing over classes from TNM SDK
Just use a MapExit for that.
Jonas Wæver
Chief Poking Manager of TNM
I've made some videogames:
Expeditions: Rome
Expeditions: Viking
Expeditions: Conquistador
Clandestine
Chief Poking Manager of TNM
I've made some videogames:
Expeditions: Rome
Expeditions: Viking
Expeditions: Conquistador
Clandestine
Re: Bringing over classes from TNM SDK
Right yeah, but I think it will actually cause the prior maps to reset, and I don't want that to happen.
What I do in my other free time:
http://www.youtube.com/watch?v=e3FfPUKuGsQ
http://www.youtube.com/watch?v=e3FfPUKuGsQ
Re: Bringing over classes from TNM SDK
No it won't. We use MapExits all the time to move between areas of Forum City, the maps only reset if they have different mission numbers.
Jonas Wæver
Chief Poking Manager of TNM
I've made some videogames:
Expeditions: Rome
Expeditions: Viking
Expeditions: Conquistador
Clandestine
Chief Poking Manager of TNM
I've made some videogames:
Expeditions: Rome
Expeditions: Viking
Expeditions: Conquistador
Clandestine
Re: Bringing over classes from TNM SDK
ohhh, ok excellent then.
What I do in my other free time:
http://www.youtube.com/watch?v=e3FfPUKuGsQ
http://www.youtube.com/watch?v=e3FfPUKuGsQ
Re: Bringing over classes from TNM SDK
Incidentally I think the triggerable teleporter was written to move the player around within maps for cutscenes and stuff.
Hmm unless it's just written to toggle its enabled state when triggered. I don't remember.
It's not used that much.
Hmm unless it's just written to toggle its enabled state when triggered. I don't remember.
It's not used that much.
Jonas Wæver
Chief Poking Manager of TNM
I've made some videogames:
Expeditions: Rome
Expeditions: Viking
Expeditions: Conquistador
Clandestine
Chief Poking Manager of TNM
I've made some videogames:
Expeditions: Rome
Expeditions: Viking
Expeditions: Conquistador
Clandestine
Re: Bringing over classes from TNM SDK
Oops got a problem. The player starts in the base-map from somewhere else in the beginning of the game. If I can't figure out the teleportertrigger, I think'll I'll somehow get the player to start somewhere besides the base map.
What I do in my other free time:
http://www.youtube.com/watch?v=e3FfPUKuGsQ
http://www.youtube.com/watch?v=e3FfPUKuGsQ
Re: Bringing over classes from TNM SDK
That whole post makes no sense to me. No idea what you're talking about.
Jonas Wæver
Chief Poking Manager of TNM
I've made some videogames:
Expeditions: Rome
Expeditions: Viking
Expeditions: Conquistador
Clandestine
Chief Poking Manager of TNM
I've made some videogames:
Expeditions: Rome
Expeditions: Viking
Expeditions: Conquistador
Clandestine
Re: Bringing over classes from TNM SDK
haha. I have a playerstart in a bathroom in map A from which the game begins. If I use a mapexit to get from map A to map B, by pushing a button in an elevator, then I can't use a mapexit in map B to get back to map A because I'll just start out in the bathroom.
What I do in my other free time:
http://www.youtube.com/watch?v=e3FfPUKuGsQ
http://www.youtube.com/watch?v=e3FfPUKuGsQ