Author Topic: [Map Editor Question] StaticShape.cs  (Read 5591 times)

0 Members and 1 Guest are viewing this topic.

Nittmo

  • Goblin Pup
  • *
  • Posts: 41
  • Reputation: +0/-0
[Map Editor Question] StaticShape.cs
« on: August 28, 2004 06:12 pm CDT »
Hi, I was wondering how to add to StaticShape.cs in order to get more DTS Shapes in the creator Menu in the Tribes Mission Editor? can someone walk me through how to add lets say, "Shield1.dts" in the editor?
« Last Edit: December 31, 1969 06:00 pm CST by Nittmo »
-Nittmo

Particle

  • Chief Codemonger
  • Administrator
  • Centurian Lord
  • ********
  • Posts: 5,904
  • Reputation: +20/-4
    • Particle's Custom RPG
(No subject)
« Reply #1 on: August 29, 2004 10:10 am CDT »
Just mimic the other entries.  It's pretty simple.  There are two types of shapes.  Check the water and check buildings for the two types of entries.
« Last Edit: December 31, 1969 06:00 pm CST by Particle »
As a point of history:  Our last server clear was on September 27, 2004.  That is 4963 days ago (13.6 years) as of today.

If you're visiting after a long hiatus and have forgotten your password, try emailing me via the support form at http://www.pcrpg.org.

If your character is from after the 2004 clear but appears to have been deleted or reset, chances are it was caught in one of the inactive account purges over the years.  Backups were made before such events, so try the support form.

Nittmo

  • Goblin Pup
  • *
  • Posts: 41
  • Reputation: +0/-0
(No subject)
« Reply #2 on: August 29, 2004 10:39 am CDT »
Code: [Select]
StaticShapeData Shield1
{
shapeFile = "shield1";
maxDamage = 99999.0;
isTranslucent = "False";
description = "Shield";
};

I tried that and it failed to show up in the Editor, it's a copy and pasting of another entry only with "Shield1" for "shapeFile", "Shield" in "Description" and "Shield1" for a heading. Here is the original of what I copied from

Code: [Select]
StaticShapeData TreeShape
{
shapeFile = "tree1";
maxDamage = 9999.0;
isTranslucent = "True";
   description = "Tree";
};
« Last Edit: December 31, 1969 06:00 pm CST by Nittmo »
-Nittmo

Hersh

  • Elvin Legion
  • *****
  • Posts: 413
  • Reputation: +0/-0
(No subject)
« Reply #3 on: August 29, 2004 03:19 pm CDT »
Wrong file, try registeruserobject.cs

DTS

Code: [Select]
MissionRegObject( RpgItems, "sword", MissionCreateObject, sword, StaticShape, sword );
Code: [Select]
MissionRegObject( Phantom, "PhantomTree2", MissionCreateObject, PhantomStrangerTree2, StaticShape, PhantomStrangerTree2 );
DIS
Code: [Select]
missionRegDis(AK, tent);
« Last Edit: December 31, 1969 06:00 pm CST by Hersh »

I kissed a drunk girl on the lips.
This post, by its very length, defends itself against the risk of being read.

Nittmo

  • Goblin Pup
  • *
  • Posts: 41
  • Reputation: +0/-0
(No subject)
« Reply #4 on: August 29, 2004 05:09 pm CDT »
Putting "MissionRegObject( RpgItems, "sword", MissionCreateObject, sword, StaticShape, sword );"
into RegisterUserObjects got me a step closer, now it shows up in the editors menu, but when I click it, it wont show up
« Last Edit: December 31, 1969 06:00 pm CST by Nittmo »
-Nittmo

Hersh

  • Elvin Legion
  • *****
  • Posts: 413
  • Reputation: +0/-0
(No subject)
« Reply #5 on: August 29, 2004 08:24 pm CDT »
Are you trying to get things like the broad sword or spear on to the map as solid objects?
« Last Edit: December 31, 1969 06:00 pm CST by Hersh »

I kissed a drunk girl on the lips.
This post, by its very length, defends itself against the risk of being read.

Nittmo

  • Goblin Pup
  • *
  • Posts: 41
  • Reputation: +0/-0
(No subject)
« Reply #6 on: August 29, 2004 09:30 pm CDT »
Yes, so I can have like an Armory that has shields hung on the wall
« Last Edit: December 31, 1969 06:00 pm CST by Nittmo »
-Nittmo

Nittmo

  • Goblin Pup
  • *
  • Posts: 41
  • Reputation: +0/-0
(No subject)
« Reply #7 on: August 29, 2004 09:31 pm CDT »
*Double post* Sorry
« Last Edit: December 31, 1969 06:00 pm CST by Nittmo »
-Nittmo

Nittmo

  • Goblin Pup
  • *
  • Posts: 41
  • Reputation: +0/-0
(No subject)
« Reply #8 on: August 30, 2004 03:14 pm CDT »
Quote
MissionRegObject( RpgItems, "sword", MissionCreateObject, sword, StaticShape, sword );

That worked at first, then I tried to get a little more specific, and instead of putting it in group RPGItems, I cahnged that to RPGWeapons, while I was at that I added all the other DTS's that come with TRPG, now it wont work anymore
« Last Edit: December 31, 1969 06:00 pm CST by Nittmo »
-Nittmo

Nittmo

  • Goblin Pup
  • *
  • Posts: 41
  • Reputation: +0/-0
(No subject)
« Reply #9 on: August 30, 2004 03:48 pm CDT »
heres code examples:
Heres what I used in RegisterObjects.cs to register it with the editor
Code: [Select]
MissionRegObject( RpgItems, "Sword", MissionCreateObject, Sword, StaticShape, Sword );
Heres what I used  to define what "Sword" is in StaticShape.cs
Code: [Select]
StaticShapeData Sword
{
    shapeFile = "Sword";
    debrisId = defaultDebrisSmall;
    maxDamage = 6.50;
    visibleToSensor = false;
    isTranslucent = true;
   description = "Generic Sword";
};

function Sword::onDestroyed(%this) {
StaticShape::onDestroyed(%this);

}

it comes up in editor menu list, but it wont come up in when I click it
« Last Edit: December 31, 1969 06:00 pm CST by Nittmo »
-Nittmo

Hersh

  • Elvin Legion
  • *****
  • Posts: 413
  • Reputation: +0/-0
(No subject)
« Reply #10 on: August 30, 2004 09:01 pm CDT »
Quote from: "Nittmo"
Heres what I used  to define what "Sword" is in StaticShape.cs
Code: [Select]
StaticShapeData Sword
{
    shapeFile = "Sword";
    debrisId = defaultDebrisSmall;
    maxDamage = 6.50;
    visibleToSensor = false;
    isTranslucent = true;
   description = "Generic Sword";
};

function Sword::onDestroyed(%this) {
StaticShape::onDestroyed(%this);

}
it comes up in editor menu list, but it wont come up in when I click it


Why do you do that? Its already a recognized static shape to rpg mod.
Try copying all your files to the Base directory.

Edit: Yea, sorry didnt copy that last bit of it, sorry, glad you figured it out though.
« Last Edit: December 31, 1969 06:00 pm CST by Hersh »

I kissed a drunk girl on the lips.
This post, by its very length, defends itself against the risk of being read.

Vorter_X_

  • Centurian Lord
  • ********
  • Posts: 2,693
  • Reputation: +2/-0
(No subject)
« Reply #11 on: September 3, 2004 10:24 pm CDT »
nice quadruple post
« Last Edit: December 31, 1969 06:00 pm CST by Vorter_X_ »