View unanswered posts | View active topics It is currently Mon Jul 13, 2020 6:36 pm

Reply to topic  [ 1 post ] 
 Tutorial: Atomgroups 
Author Message
User avatar

Joined: Sun Jul 13, 2008 9:57 am
Posts: 4886
Location: some compy
Reply with quote
Post Tutorial: Atomgroups
This tutorial outlines how to create custom atomgroups, to interact with terrain. These are used, for example, in footgroups.

You Will Need:
   A) a brain that can visualise an object in pixels well
   B) an image editor (eg. MSPaint, GIMP)
A text editor (Notepad on windows, TextEditor on mac)

First of all, open up any referenced .ini that loads before to object you are applying the atomgroup to, or the one that it does load in. this is to ensure that when you reference the group as a CopyOf, it doesnt crash.
From here, add this code, and dont forget to name it.
AddActor = AtomGroup
   PresetName = <Name Here>
   AutoGenerate = 0

now, open up paint, or use your mind to draw the object you want. for food and hand groups, this should just be a line, but it could be anything made out of pixels.
pick a pixel, and colour it red, this is your 0,0 co-ordinate.
add this code to place that pixel as an atom
   AddAtom = Atom
      Material = Material
         CopyOf = Metal

see the line about Material, and the copyof reference below it? this can be anything, or the material can be omitted. when the material is omitted, the game will give the atomgroup the default material (or at least in my experience it will). if you want custom collisions, for example for bounce and friction, edit it here.
now, decide where you want your atomgroup to be joined to your actor, and colour this green. count how many pixels across to the right from your red pixel this is, and remember this number as "X". if it is to the left, use negative numbers. count how many pixels downwards from your red pixel this is, and remember this number as "Y". if it is upwards, use negative numbers.
add this code to place your jointoffset (you dont have to bother if you want your atomgroup attached to the red pixel), remember to put your x value where <X> is , and your y value where <Y> is:
   JointOffset = Vector
      X = <X>
      Y = <Y>

in any case, to place any other atoms, count from your 0,0 pixel in the same manner as you did for your jointoffset (right for positive X, left for negative X, down for positive Y, up for negative Y) and use this code to place the remaining atoms
   AddAtom = Atom
      Offset = Vector
         X = <X>
         Y = <Y>

as boring as that is, you have to do it to place all the atoms.

congratulations, you've made a custom atomgroup!

Sat Jan 17, 2009 7:16 am
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

Who is online

Users browsing this forum: Google [Bot]

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.015s | 14 Queries | GZIP : Off ]