Author Topic: The *easier* way to make map objects.  (Read 4288 times)

0 Members and 1 Guest are viewing this topic.

Anonymous

  • Goblin Pup
  • *
  • Posts: 0
  • Reputation: +0/-0
The *easier* way to make map objects.
« on: November 12, 2002 01:38 am CST »
I shortened this code to make it easier to display, but it should give you an idea of a really easy way to make maps without having to get a napkin and write down numbers.

This is in a file i made called hellmines.cs :
Quote
function makemap(%action)
{
   if(%action == "make") {
   say(0, "#spawndis mine8 hellmines1 349.4 -1010 272.5 0 0 -3.14");
   // Add more Items for the map here
   }
   if(%action == "destroy") {
   say(0, "#deldis hellmines1");
   // For every item you make add the delete line here
   }
   if(%action == "addbots") {
   say(0, "#loadout pitdemon CLASS ranger LVL 666 LCK 10 kailsbow 1 darrow 500");
   // Add all your bots here.
   }
   if(%action == "killbots") {
   say(0, "#kill PitDemon1");
   // Add a kill line for each bot here.
   }
}
Now that looks complicated but once you understand what it does, it makes adding new areas in game really easy. I just keep a copy of notepad and tribes open. Then when ive got the shape where i want it, i alt-tab out and paste the command i used in the appropriate spot.
To add a new line to it put this :

say(0, "what you typed here");

then file->save. then i go back to the game, go to console( the ~ key)  and type exec("filename.cs");
for me its hellmines.cs so i type exec("hellmines.cs");
(will only work if your file is in your /config folder) in order to make it load the newer saved copy.

To run the script in game, pull down your console (~ key) then type makemap("make"); or makemap("addbots"); and itll perform the part that matches what you typed.

Also as a function "makemap" it has 4 things that %action can be.
"Make"     I put all my code for making the area here
"Destroy" I put all my code for deleting the whole thing here
"addbots" I put all my code for spawning the bots here
"killbots" I put all my code to kill off all the bots here.

You could even expand it by making a new action called "healall", where it heals all the bots in your zone, to do this :
if(%action == "healbots") {
      say(0, "#sethp 99999 PitDemon1");
      // Add a heal line for each bot here.
      }

and then makemap(healbots); will heal all your bots :) Im hoping that by showing you a new part to it, that it might make your understand more how it works.

Then i used my binded keys to spawn and delete items on the base.you can replace f1 with a key of your choice.

bindCommand(keyboard0, make, "f1", TO, "makemap("make")");

And you'll find your coding goes by much faster with that.
May not make sense , but if it does, im sure itll speed you up alot. Im hoping that if you understand how to map that running this script wont be too much work.
« Last Edit: December 31, 1969 06:00 pm CST by Anonymous »

Coal

  • Gnoll Fighter
  • **
  • Posts: 55
  • Reputation: +0/-0
    • http://www.clanorb.com
Re: The *easier* way to make map objects.
« Reply #1 on: November 12, 2002 01:43 am CST »
*rubs eyes*
« Last Edit: December 31, 1969 06:00 pm CST by Coal »

Darwin

  • Centurian Lord
  • ********
  • Posts: 6,466
  • Reputation: +0/-0
    • http://www.mierda54.tripod.com
Re: The *easier* way to make map objects.
« Reply #2 on: November 12, 2002 04:02 am CST »
Someday, SOMEDAY, they'll make a map maker that uses a simple point and click interface.  Lets see, you see the entire grid, select a row of the grid by clicking on its #, then editing that grid.   ::) ::) ::) ::) ::)
« Last Edit: December 31, 1969 06:00 pm CST by Darwin »



Anonymous

  • Goblin Pup
  • *
  • Posts: 0
  • Reputation: +0/-0
Re: The *easier* way to make map objects.
« Reply #3 on: November 12, 2002 09:05 am CST »
it looks like i stumped everyone. oops. maybe it shoudla been "the easier way to make map objects if you know a little about coding and a little about making map objects"
« Last Edit: December 31, 1969 06:00 pm CST by Anonymous »

Coal

  • Gnoll Fighter
  • **
  • Posts: 55
  • Reputation: +0/-0
    • http://www.clanorb.com
Re: The *easier* way to make map objects.
« Reply #4 on: November 12, 2002 11:09 am CST »
I just snaped the objects to a grid.. i didnt know you could actually code where they went.. weew
« Last Edit: December 31, 1969 06:00 pm CST by Coal »

eViL

  • Uber Menace
  • *******
  • Posts: 1,022
  • Reputation: +0/-0
Re: The *easier* way to make map objects.
« Reply #5 on: November 12, 2002 02:34 pm CST »
ya didn't lose me lucid =)  i know what that stuff does and how it works, so i understood it.

and coal, sometime when u are running a server, try GameBase::GetPosition(<your client id>); and you will get 3 numbers, "x y z", thats the position on the map you are at.  everything is placed onto a map using positions.
« Last Edit: December 31, 1969 06:00 pm CST by eViL »
Quote from: "LastWish || NextWish"
eViL, you were probably the coolest but most misunderstood person in this community.. maybe the rest will find out how cool of a person you are some day, and don't get too mad at the people who dont understand you.. its their loss in the end.

Coal

  • Gnoll Fighter
  • **
  • Posts: 55
  • Reputation: +0/-0
    • http://www.clanorb.com
Re: The *easier* way to make map objects.
« Reply #6 on: November 12, 2002 03:23 pm CST »
But how do you find X Y and Z.. and what is a client;)
« Last Edit: December 31, 1969 06:00 pm CST by Coal »

Darwin

  • Centurian Lord
  • ********
  • Posts: 6,466
  • Reputation: +0/-0
    • http://www.mierda54.tripod.com
Re: The *easier* way to make map objects.
« Reply #7 on: November 12, 2002 03:33 pm CST »
X, Y, and Z should just be like that on a coordinate plain, like what you did in geometry: (5, -3, 14) etc....

Client is just what the average joe uses, right?  Like ppl that dont run the servers, right?

I hope that was an educated guess, cause I just thought all that up off the top of my head.

*edit*
So really the map is just a giant cooridinate plain, and the center of the map would be (0, 0, 0)
« Last Edit: December 31, 1969 06:00 pm CST by Darwin »



Particle

  • Chief Codemonger
  • Administrator
  • Centurian Lord
  • ********
  • Posts: 5,904
  • Reputation: +20/-4
    • Particle's Custom RPG
Re: The *easier* way to make map objects.
« Reply #8 on: November 12, 2002 04:37 pm CST »
Well, it makes it nice to be a permanent part of the mis itself.
« 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.

eViL

  • Uber Menace
  • *******
  • Posts: 1,022
  • Reputation: +0/-0
Re: The *easier* way to make map objects.
« Reply #9 on: November 12, 2002 05:30 pm CST »
darwin, incorrect, client as in client id or object id.  client id's are usually between 2048 and 2080, and object ids are in the 8000's somewhere *doesn't care to use them so screw 'em*
« Last Edit: December 31, 1969 06:00 pm CST by eViL »
Quote from: "LastWish || NextWish"
eViL, you were probably the coolest but most misunderstood person in this community.. maybe the rest will find out how cool of a person you are some day, and don't get too mad at the people who dont understand you.. its their loss in the end.

Darwin

  • Centurian Lord
  • ********
  • Posts: 6,466
  • Reputation: +0/-0
    • http://www.mierda54.tripod.com
Re: The *easier* way to make map objects.
« Reply #10 on: November 12, 2002 06:47 pm CST »
Arrg, eViL just confused me...

Where the hell did those numbers come from? :P ???

I think I was thinking along the lines of clientside software and serverside software, like you would find for half life and other games like when you download patches.

Jeebus, I hope I do not confuse people as well when I talk.  But I just spent all my brainpower working on geometry homework, so please forgive me.
« Last Edit: December 31, 1969 06:00 pm CST by Darwin »



Particle

  • Chief Codemonger
  • Administrator
  • Centurian Lord
  • ********
  • Posts: 5,904
  • Reputation: +20/-4
    • Particle's Custom RPG
Re: The *easier* way to make map objects.
« Reply #11 on: November 13, 2002 02:45 am CST »
It's ok, just remember when you see this formula:
TTr2 (Pi x radius squared).

Pi r not square, pie are round!
« 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.

Darwin

  • Centurian Lord
  • ********
  • Posts: 6,466
  • Reputation: +0/-0
    • http://www.mierda54.tripod.com
Re: The *easier* way to make map objects.
« Reply #12 on: November 13, 2002 02:55 am CST »
MMMM... Pie ;D

I guess all I can do is get a lazy job as an A+ technitian, hell, that would be nice.  They get paid good diniero.  Looks like eViL will hack a bank someday and get a hella lotta money.  Particle will prob run multiple servers in the future, ultimately making his own MMORPG, and Hawk will be a bum on the street cause he cant spell "macrebe" :P

I wrote that because you guys seem to have a broader idea of what goes on in the tribes engine than I ever will.

if(%action == "addbots") {
      say(0, "#loadout pitdemon CLASS ranger LVL 666 LCK 10 kailsbow 1 darrow 500");
      // Add all your bots here.
      }

I'm glad geometry isnt this hard, or there would be cherry pie spilled all over my geometry book.
« Last Edit: December 31, 1969 06:00 pm CST by Darwin »



Zieg_Feld

  • Orc Thrasher
  • ***
  • Posts: 193
  • Reputation: +0/-0
Re: The *easier* way to make map objects.
« Reply #13 on: November 13, 2002 09:06 am CST »
LoL ;D
« Last Edit: December 31, 1969 06:00 pm CST by Zieg_Feld »

Particle

  • Chief Codemonger
  • Administrator
  • Centurian Lord
  • ********
  • Posts: 5,904
  • Reputation: +20/-4
    • Particle's Custom RPG
Re: The *easier* way to make map objects.
« Reply #14 on: November 14, 2002 02:52 am CST »
lol
« 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.