View unanswered posts | View active topics It is currently Wed Dec 25, 2024 4:45 pm



Reply to topic  [ 32 posts ]  Go to page 1, 2, 3  Next
 [Tutorial]First Actor. 
Author Message
User avatar

Joined: Wed Sep 09, 2009 3:16 am
Posts: 3032
Location: Somewhere in the universe
Reply with quote
Post [Tutorial]First Actor.
Image



Since this is your first actor, we begin with a simplest Moving Actor class called...

AHuman

____________________________________________________________________________________________
Recently, there has been tutorial requests, Actors, are often wanted, this is the reason for writing this.
Remember, these noobies fuel the modders of the next generation, we need people to fill the spots where others have left.
I hope you find this useful.

So, you want to make a Actor is it?
You feel confident to mod your first actor?
Then read this.
____________________________________________________________________________________________
First things first, lets get things straight with a small FAQ.

Q: Can I make an AHuman with 3 or more arms and/or legs?
A: No, not without hacky Lua magic.

Q: Does my actor have to have attachable armor?
A: No, they do not require attachable armor, however this tutorial will cover it.

Q: Does my actor need a head?
A:
LowestFormOfWit wrote:
Yes an actor has to have a head, but no, it doesn't have to collide with anything and you can make a fake head attachable on top of an invisible one that can be blown off to give the appearance of an actor surviving decapitation.



Q: Can my AHuman have one leg and one arm?
A: Yes, a jumper is an actor with only one leg and no arms.

____________________________________________________________________________________________
If you are ready to continue, download the simple dummy template from the following link:
http://forums.datarealms.com/viewtopic.php?f=1&t=10247&hilit=Template
____________________________________________________________________________________________
Index:
----------------------------------
Section 1: The Sprites.
- 1.0 Head
- 1.1 Torso
- 1.2 Legs and Arms
- 1.3 Gibs
- 1.4 Extras, [Jetpacks and such]
----------------------------------
Section 2: The Actor Basics
- 2.0 Head Script
- 2.05 AddGib
- 2.1 Gib Offsets
- 2.15 Velocities
- 2.2 Legs and arms
- 2.3 Attachables
----------------------------------
Section 3: Putting it all together.
- 3.0 AddActor = AHuman
- 3.1 Positioning Offsets
- 3.2 Walkpaths
----------------------------------
Section 4: Fixing Errors
- 4.0 Basic Errors
- 4.1 Could Not Match Property!
- 4.2 Property Name wasn't Followed!
----------------------------------
____________________________________________________________________________________________
---Section 1: The Sprites---

As all good things in the world, aesthetics play a large role in the attraction of customers and gamers.
Read the following topics:
How to Pixel: The Basics, CrazyMLC - http://forums.datarealms.com/viewtopic.php?f=1&t=18005
Sprite Problems, Ultric - http://forums.datarealms.com/viewtopic.php?f=1&t=12442
Sprite Critique and Help, Contrary and CrazyMLC - http://forums.datarealms.com/viewtopic.php?f=1&t=18195

---1.0 The Head---

I'm going to simply recolour the dummy head, but feel free to create something more complex,
just make sure it fits in a 11X11 pixel square.

Notes:
- No, your sprites don't have to be the same size as the dummy.
- However if it isn't, you will have to muck around the offsets.


So:
Image :arrow: Image

Save the Head as HeadA.bmp in the images folder.

---1.1 The Torso---

When creating the torso, remember to make sure it matches the style of the head.
Make sure it fits the theme or style of the head. [Remember same size as the Dummy Torso! (9X18)]

So:
Image :arrow: Image

---1.3 The Arms and Legs---

Here is when it gets slightly harder.
Not only do you have 5 frames, you also have to have smooth transition.
How you do this, will effect how bad your walking looks.

A easy way to do this, is the twin line Method, whereas you take the longest leg frame and put a vertical line on one end, and another on the other end.
So it looks like this:
The way it works is it easily tells you how long your sprite is in comparison to the maximum extension, each frame should move around 1-3 pixels back per frame.

Image [Top leg Frame is 004 and bottom leg frame is 000]

Then Re-sprite it!
Image [Top leg Frame is 004 and bottom leg frame is 000]

The Frames also have a specific order.
The lower the frame number, the more bent the arm/leg should be.
The higher the frame number, the straighter it is.

So:
LegA000.bmp should be when the leg is at its most bent position.
Whilst,
LegA004.bmp should be when the leg reaches maximum extension.

LowestFormOfWit wrote:
On the part about legs, you should definitely mention that the animations for legs/arms/feet do NOT have to only have 4 frames. You can have 100 frames if you wanted. The game simply calculates a percentage on how bent the leg should be, and chooses the frame closest to that percentage on a scale.

So if my leg is 20% bent and have 5 frames, frame 1 will show.
If I, however, have 10 frames, frame 2 will show.



Repeat everything for arms and Feet.

The Hands are a simple task, create a 5X5 pixel hand.

So:
Image :arrow: Image

As a last note, You don't need BG sprites.
You can use the FG sprites for the BG also.
However, it is a good idea when releasing a mod to make a set of BG sprites.

---1.3 The Gibs---

Gibs are what you call, debris, in the world of cortex command.

They are the parts of the particular object.
Anything that is not terrain can gib, which is the equivalent of 'destroyed into smaller pieces'.

All of the following files in the Dummy Template are Gibs:

- HeadGibA.bmp [Your head gibs into this]
- HeadGibB.bmp [Your head gibs into this]
- RibCageGibA.bmp [Your Torso gibs into this]
- RibCageGibB.bmp [Your Torso gibs into this]

Remember, when creating the gibs, they must look destroyed or ruined.
Change them to match the style of your Actor.

So:
Image :arrow: Image

Re-sprite the gibs!

---1.4 Extras---

Well, you have sprited everything for the most part, yes?
So now you want a custom jetpack/armor.

They must match the style of the actor, and must have a determined attach-spot.
Do not go and make an attachable sprite for the head, to find out, it doesn't fit.

Here I resprite the Jetpack.
Image :arrow: Image

_____________________
|------End of Section 1------| :wink:
|____________________|


____________________________________________________________________________________________

---Section 2: The Actor Basics---

Well, you've finished the sprites yes?
Now we get to the Nerdy/Geeky part, the coding.

The whole of Cortex Command relies on ini coding.
Now don't get mixed up here, but, Lua is a entirely different coding language, which is used to do things, ini can't.
In fact, Lua didn't get implemented into the CC Engine up until B23. [Current is B23]

Now, you can stop here, because, the Template already is coded to allow this to work, as long as you did not change the names
of the sprites. However, Continue if you want to have some more Uniqueness to your Actor.

---2.0 The Head Script---

Well, its time for the head, the cranium, THE HOUSING OF THE MIND.
Check the variables at the bottom of this tutorial.

So here is the basic code for a head:

PasteBin

Here are the things that would probably concern you:

GibImpulseLimit: How much pressure can be applied before the head explodes, or, how high it can fall from without exploding.
The higher this is, the higher the fall it can take.

GibWoundLimit: How many hits the head can take without exploding, however, does not affect how much hp is taken.
The higher this is, the more wounds it can take.

---2.05 AddGib---
Code:
AddGib = Gib
      GibParticle = MOSParticle
         CopyOf = Gib Panel Orange Tiny A
      Offset = Vector
         X = 0.5
         Y = 2.5
      Count = 1
      Spread = 0
      MinVelocity = 0
      MaxVelocity = 0


Now, in your gibs.ini, you will find a bunch of addgibs, however, they will not be simply CopyOfs.
They will be the gib sprite you have sprited earlier.
Now you can rename the gib if you want to like, MyGib.
Then here, where it says CopyOf you can put MyGib there to make it gib the specific sprite.

CopyOfs are referring to things that were already defined, its used in guns a lot, people like to separate the magazine from the gun and the round from the magazine.
And the Projectile from the round. For instance, if I made a gib called, Giblet, I could later come and replace Gib Panel Orange Tiny A to giblet, that way, when the object with this script dies, it will gib a Giblet gib.

Code:
AddGib = Gib
      GibParticle = MOSParticle
         CopyOf = Giblet
      Offset = Vector
         X = 0
         Y = 3
      Count = 1
      Spread = 0
      MinVelocity = 0
      MaxVelocity = 0


---2.1 Gib Offsets---

Now, the offset is where the gib will appear when a object dies. For instance, if you made a infrastructure for the head, where all the parts of the head are gibbed. It wouldn't make sense if the top of the scalp gibbed off the chin. So, you'll have to change it so that the scalp comes off the top of the head when the head gets gibbed.

Now for some reason, the y-axis is inverted, negative number make the object move up rather then down.
The x-axis works like it would in math, negatives go to the left and positives to the right.

The values are based on pixels, for instance, if the object had Y = 0 and then I made it Y = -3 the object would move 3 pixels up.
So lets say the chin of a head is 3 pixels off the center of the head, and the scalp gib is appearing where the chin is.
So at the moment, the scalp's offset is Y = 3 and X = 0. Well we want it three above the middle of the head, where the top of the head is.
So, we set the offsets to, Y = -3 and X = 0, this causes the scalp gib to appear 6 pixels higher then where it was before.

As an example, if Giblet was the scalp gib, I would change the offset to go up by doing this:

Code:
AddGib = Gib
      GibParticle = MOSParticle
         CopyOf = Giblet
      Offset = Vector
         X = 0
         Y = 3
      Count = 1
      Spread = 0
      MinVelocity = 0
      MaxVelocity = 0


To:

Code:
AddGib = Gib
      GibParticle = MOSParticle
         CopyOf = Giblet
      Offset = Vector
         X = 0
         Y = -3
      Count = 1
      Spread = 0
      MinVelocity = 0
      MaxVelocity = 0


This moves Giblet 6 Pixels up.

The Count is how many of the Gib you want to be Gibbed.
For example, i want two Giblets to gib when the head gibs i will change the script into this:
Code:
AddGib = Gib
      GibParticle = MOSParticle
         CopyOf = Giblet
      Offset = Vector
         X = 0
         Y = 3
      Count = 2
      Spread = 0
      MinVelocity = 0
      MaxVelocity = 0


---2.15 Velocities---

The Velocities dictates whether or not a gib will fly away.
So if I wanted Giblet to randomly fly somewhere, I would set the Velocities according to how fast i want it to fly away.

Lets say i want it to more or less, fly slightly away, maybe 60 pixels away from the Gib origin.
I would write something like this:

(Pretty sure the velocities are in-game meters [8 Pixels [Px]] per second [Thanks for catching that Geti].)

Code:
AddGib = Gib
      GibParticle = MOSParticle
         CopyOf = Giblet
      Offset = Vector
         X = 0
         Y = 3
      Count = 1
      Spread = 0
      MinVelocity = 4
      MaxVelocity = 8


Take note, if this is set too high it could kill a enemy.

---2.2 Legs and Arms Script---

Well, without a way to move about in cortex command, your actor could be merely a turret which can pick things up.
However, that purpose is better served by an ACrab, so we need arms and legs to allow a form of locomotion for your actor.

Inside your Dummy Template.rte folder Dummy Template.ini, you will find this script for your arm:

Variables will be explained within text: [the words after a //]

PasteBin

Take Note: Some of the variables listed in the previous section may not have been commented on.

The FG arm is most important, it is the one which holds the gun, the device, the EXPLOSIVES, however, you do not need arms.

Now if you do not have separate BG arm sprites, change this:
Code:
AddActor = Arm
   CopyOf = Dummy Template Arm FG A
   PresetName = Dummy Template Arm BG A
   SpriteFile = ContentFile
      FilePath = Dummy Template.rte/Images/ArmBGA.bmp
   FrameCount = 5   
   Hand = ContentFile
      FilePath = Dummy Template.rte/Images/HandBGA.bmp


To This:
Code:
AddActor = Arm
   CopyOf = Dummy Template Arm FG A
   PresetName = Dummy Template Arm BG A
   


The Feet should be easy enough to figure out, since all it's variables has been explained.
But the code should look like this:
Code:
AddActor = Attachable
   PresetName = Dummy Template Foot FG A
   AddToGroup = Dummy Parts
   Mass = 5
   Sharpness = 1
   HitsMOs = 0
   GetsHitByMOs = 0
   SpriteFile = ContentFile
      FilePath = Dummy Template.rte/Images/FootFGA.bmp
   FrameCount = 4
   SpriteOffset = Vector
      X = -5
      Y = -3
   EntryWound = AEmitter
      CopyOf = Wound Bone Entry
   ExitWound = AEmitter
      CopyOf = Wound Bone Exit
   AtomGroup = AtomGroup
      AutoGenerate = 1
      Material = Material
         CopyOf = Civilian Stuff
      Resolution = 4
      Depth = 0
   DeepGroup = AtomGroup
      AutoGenerate = 1
      Material = Material
         CopyOf = Civilian Stuff
      Resolution = 4
      Depth = 2
   DeepCheck = 0
   JointStrength = 55
   JointStiffness = 0.5
   BreakWound = AEmitter
      CopyOf = Wound Bone Break
   JointOffset = Vector
      X = -3
      Y = -2
   DrawAfterParent = 1


And for the BG Foot, same as above, if you don't have bg sprites.
Change this:

Code:
AddActor = Attachable
   CopyOf = Dummy Template Foot FG A
   PresetName = Dummy Template Foot BG A
   SpriteFile = ContentFile
      FilePath = Dummy Template.rte/Images/FootBGA.bmp
   FrameCount = 4


To this:

Code:
AddActor = Attachable
   CopyOf = Dummy Template Foot FG A
   PresetName = Dummy Template Foot BG A
   


The Legs, have similar code to the arms, almost exactly the same in fact.
Now instead of me posting another chunk of code, try and figure this out by yourself.
It shouldn't be too hard!

---2.3 Attachables---

Since legs and arms are pretty much attachables, you will not see a huge difference in script.
These are used for armor or aesthetics.

Here is a sample Script:
Code:
AddEffect = Attachable
   PresetName = Attachable 1
   Mass = 20
   HitsMOs = 1
   GetsHitByMOs = 1
   SpriteFile = ContentFile
      FilePath = Dummy Template.rte/Sprites/[name of sprite].bmp
   FrameCount = 1
   SpriteOffset = Vector
      X = -4
      Y = -10
   AngularVel = 6
   EntryWound = AEmitter
      CopyOf = Dent Metal Light
   ExitWound = AEmitter
      CopyOf = Dent Metal Light
   AtomGroup = AtomGroup
      AutoGenerate = 1
      Material = Material
         CopyOf = Mega Metal
      Resolution = 4
      Depth = 0
   DeepCheck = 0
   JointStrength = 350
   JointStiffness = 0.5
   BreakWound = AEmitter
      CopyOf = Wound Bone Break
   JointOffset = Vector
      X = -3
      Y = 7
   DrawAfterParent = 1
   AddGib = Gib
      GibParticle = MOSRotating
         CopyOf = Gib Pipe Small B
   GibImpulseLimit = 2200
   GibWoundLimit = 5
//   GibSound = Sound
//      CopyOf = Bone Crack


Edit this as desired, remember, I no longer will elaborate on the variables.

Attachables are something that people like seeing, either as armor or aesthetics.
If your actor is missing Attachables people will think there is something left to be desired.

Attachables are for Helmets, Goggles, Leg Plates, Shoulder Pads, Chest plates, etc...

_____________________
|------End of Section 2------| :P [finally]
|____________________|


____________________________________________________________________________________________

---Section 3: Putting it All together---

Now, it may seem that I am overloading with you with information, however,
if this were elaborated by some of our more well-versed members, this could've been twice as long.

Well I guess, it's time to begin, bear with me a little longer!

---3.0 AddActor = AHuman?---

Yes, this is the basic class of Cortex Command, It will be the class or actor you'll make the most of often for your mods/faction.
So I guess we begin with elaborating on some more new variables.

PasteBin

Edit, as desired of course.
And now your done, if you want, you can continue to walkpaths and Offsets.

---3.1 Positioning Offsets---

I just realized, that I already explained the offsets pretty well in the 2.1 Gib Offsets, so I'll just repeat the basics.
Basically, offsets are what you will be using the place the attachables/ objects in the correct places as you see fit.

Now, we will be using the Cartesian Plane.
Now you probably had to boring graphs in math and such, but here is where it comes in handy.

The Coordinates position the attachables on the position relative to the position of the torso.
For Instance, the torso is the center of the Quad-Axis, and the objects your moving around are the coordinates.
Place the coordinates where you want them.
A Useful to tool to see if they are in the correct position is the Actor Viewer [Requires Purchased version of CC]
You can reload the actor's ini every time you make a change to it! Neat huh? Too bad i don't get this Luxury...

Now, if you do not have this luxury, like me, you can go into skirmish, and choose your actor, do not place him, screen shot him.
Then go and open the screen shot, Copy paste your attachable sprite onto it, and place it where it should go.
Now, zoom in all the way, find your attachable [the screen shotted one] and count the pixels to where it would fit.

For Instance, If i want a triangle positioned on his shoulder, but the offsets are bad, I would screen shot where it is on the actor.
Put the triangle on his shoulder in the screen shot, and count the vertical number of pixels of the tip of the triangle, to the super imposed
placed one, then count the x. Maybe a picture would be useful here. :P

Picture:

Super Imposed [Imaginary triangle]

Image

Basically i would count the number of Px [Pixels] it takes to get the triangle to where it should be [super imposed triangle]

In this case i would have to change y by -22 and x by -27 to get the triangle to where it should be.

Remember!, -Y goes Up, +Y Goes down, -X goes left and +X Goes right.


---2.3 WalkPaths---

For this section, it's all offsets, also meet your master for this section, Roon3
http://forums.datarealms.com/viewtopic.php?f=1&t=13483&hilit=Walkpath+tutorial

Ok, the tutorial is over, enjoy your first actor.

_____________________
|------End of Section 3------|
|____________________|


____________________________________________________________________________________________

---Section 4: Error Fixing---

You may have followed the tutorial as best you can, but you get an error!
This is the basic thing modders fix every time, heck, I get an error every time I mod!
Why, because, it is easy to misspell, forget to capitalize letters, etc...
Here you will learn how to fix these common errors so that you don't have to go and post a thread.

---4.0 Basic Errors---

The most common error will be, RTE ABORTED (X_X)!
It will tell you error in line [number],
then the reason for the error in a really bland way.

Now the easiest way to find lines is to paste it on pastebin or any program similar to it.
Once you found the line you have to elaborate why there was an error.

For Instance, If the line i was getting errors on said

=> CopyOf = Bullet

Maybe I forgot to define Bullet, or the PresetName is misspelled!

So i go back a few lines and find this:

=> PresetName = bullet

Dope :roll:

Forgot to capitalize!
So now i have to change it to

=> PresetName = Bullet

It should work now!

CC Modding is about trial and Error, don't worry if the first time you tried playing your mod gives you an error.
I'm sure that even the most experienced modders still get errors.

---4.1 Could Not Match Property!---

This is common among all the CopyOfs.
Basically they couldn't find the predefined object you were referring to with CopyOf =.
This should mean that either you didn't define the object, didn't define it before this CopyOf, or Misspelled the CopyOf or PresetName.

All you have to do is fix it, the problem above is an example of this error.


---4.2 Property Name Wasn't Followed!---

This isn't very common, but once you see this, you may go into, What the Heck is this?!?!?!
The most common cause always happens in line 1, you may have accidentally put DataModule on the top.
Make sure DataModule is only on the top of the Index.ini.


---End of Tutorial---


____________________________________________________________________________________________
Further Reading:

Tutorials for Total Newbs!, StoneCrow - http://forums.datarealms.com/viewtopic.php?f=1&t=17914&hilit=Tutorial
Basic Mission Tutorial, weegee - http://forums.datarealms.com/viewtopic.php?f=8&t=16219&hilit=Tutorial
How to use and Implement Lua, mail2345 - http://lua-users.org/wiki/TutorialDirectory
Lua Tutorial, CaveCricket64 - http://forums.datarealms.com/viewtopic.php?f=73&t=17955
LordTim's Tutorials!, LordTim - http://forums.datarealms.com/viewtopic.php?f=1&t=13394

____________________________________________________________________________________________
Variables,
Stolen from the wiki:

[Take Notice, removed names, however, I list the contributed as written in the wiki here:]

- Grif
- numgun
- Geti


Code:
KEY:
0+ = Integer value from 0 to a number (limit not explored)
1+ = Integer value from 1 to a number (limit not explored)
0.0+ = Decimal value from 0 to a number (limit not explored)
->+ = Integer value from a negative number to a positive number (limit not explored)
-.>+ = Decimal value from a negative number to a positive number (limit not explored)
0/1 = Boolean, true = 1, false = 0 (trying other values nonsensical)
0.0-1.0 = Decimal value from 0.0 to 1.0 (trying other values not recommended)
TXT = Text, alphanumeric and ! " # $ % ' ( ) + , - . / : ; < = > ? [ \ ] ^ _ { | }
Check Base.rte/GUIs/Skins/MainMenu/smallfont.bmp for more strange characters.


AddAmmo
This is used for things you want to fire out of Rounds. It is also customarily used for any MOPixels, MOSParticles, and MOSRotatings that you may define, though I think AddEffect might also work for them. Works for MOPixels, MOSParticles, MOSRotatings, and AEmitters.

PresetName
The name of the thing, used for both in-script references as well as in-game names for buyable objects. TXT

ParticleCount
Used in Rounds to say how many of the defined particle you want to spawn per shot. 0+

Mass
How heavy the particle in question is. -.>+

RestThreshold
I believe this is the inertia threshold at which a particle settles, and I believe inertia is probably Mass X Velocity(instantaneous) ->+

LifeTime
How long in MS this particle will last after spawned. The particle simply disappears at the end, no gibbing or anything. 0+, -1 for theoretical infinity

Sharpness
How sharp this particle is. This is really only useful for MOSParticles and MOPixels.

HitsMOs
Does this object affect other MO's? 0/1

GetsHitByMOs
Is this object affected by other MO's with HitsMOs = 1? 0/1

Color
Color of the MOPixel, see Base.rte/Ammo.ini for exact syntax

Atom
Defines the collision point and material of an MOPixel or MOSParticle.

Material
Determines such things as bounce, density, etc. See Base.rte/Materials.ini for exact things affected and see Base.rte/Ammo.ini for examples.

Trailcolor
Color of the trail of an MOPixel, same as Color.

TrailLength
Length of the trail of an MOPixel in pixels. 0+

Shell
Object thrown out of the EjectionOffset on a HDFirearm.

FireVelocity
Velocity (ingame meters per second, 20px = 1 ingame meter) the Particle of a Round is spawned at. Ingame seconds fluctuate rapidly depending on how well the game is running. ->+

ShellVelocity
Velocity (ingame meters per second, 20px = 1 ingame meter) the Shell of a Round is spawned at. Ingame seconds fluctuate rapidly depending on how well the game is running. ->+

Separation
Variance in pixels the Particle of a Round will be spawned at in a line from the MuzzleOffset. Both in front and in back of the MuzzleOffset. ->+

SpriteFile
Sprite the MO will take. Uses FilePath = to point to the file. Remember to use / in your path instead of any \.

FilePath
The path, starting in the top directory of Cortex Command. Referring to a file without any .rtes or folders will simply look for it where CortexCommand.exe is.

FrameCount
The number of frames in your object. Setting it to 1 will cause Cortex to look for the exact name you specified in the FilePath. Setting to greater than 1 will cause Cortex to look for sprites ending in 000.bmp, 001.bmp, and xxx.bmp where xxx is the number of frames - 1, so that a FrameCount of 20 will look for 000.bmp through 019.bmp. 1+

SpriteOffset
Accepts Vector. Offset in pixels away from the BOTTOM RIGHT corner of your sprite. Remember that computers use the fourth quadrant for graphics, so the upper left corner is 0,0, going right is positive, going left is negative, going down is positive, going up is positive. Also the center of gravity of your MO (will rotate around this point). Each component (X or Y) is ->+

EntryWound
Accepts an emitter, or Null. The wound emitter that should be attached at the impact location when an MOPixel or MOSParticle hits with enough force to pierce the MO. Setting to null will cause Cortex to not attach a wound at all.

ExitWound
Same as EntryWound, but the wound that should be attached at the exit locaiton of an MOPixel or MOSParticle continues through the MO. Setting to null will cause Cortex to not attach a wound at all.

AtomGroup
Defines a group of collision Atoms for the MO. Much the same as Atom, but you have to define the density of the detecting atoms with Resolution and the depth from the edge of the sprite with Depth. Those two values are 0+ in pixels

DeepGroup
Same as AtomGroup, but for a different purpose. When a DeepGroup Atom touches terrain, it causes Cortex to clear the terrain the MO currently occupies. See rockets burrowing into the ground.

DeepCheck
Whether to check the DeepGroup or not.

JointStrength
The impulse strength of a joint to breakage. Most likely is measured in Mass X Velocity of the object colliding. 0+

JointStiffness
A multiplier for how much impulse is transferred through the joint to the parent object. If 0.5 and an attachment recieves 100 impulse, the parent would experience 50 impulse in the same direction. 0.0-1.0

JointOffset
Offset (Vector) of a Joint on the MO from the SpriteOffset. If your SpriteOffset X is -3 and your JointOffset X is -2, the full offset of your Joint is -5 from the bottom right corner.

DrawAfterParent
Whether to draw after the parent (on top of visually) or before (under visually) the attaching object. Attachments with DrawAfterParent = 0 will be drawn under the object it is attached to. Only broken on Limbs. 0/1

RoundCount
Number of rounds and tracers in this Magazine. 1+

RTTRatio
Number of RegularRounds to fire before firing a TracerRound. 0+

RegularRound
The round to use as the RegularRound

TracerRound
The round to use as the TracerRound

AddDevice
Begins the definition of a HeldDevice.

InstanceName
Depreciated. Use PresetName instead.

AddToGroup
Add to a group in the build menu. Also for the buy menu, but only Actors, Brains (special group, any actor placed here will be a brain), Bombs, Weapons, Tools, and Crafts.

RateOfFire
Rate of fire of Rounds, in rounds per minute. 0+

StanceOffset
Offset of the primary hand when not in sharp mode, from the body's SpriteOffset.

JointOffset
For HDFirearms, where the primary hand should be placed on the gun.

SupportOffset
Where the secondary hand should be placed on the gun.

AddGib
Begins the definition of a Gib. Must be AddGib = Gib.

GibWoundLimit
Number of wounds this MO can take before gibbing. 0+

GibImpulseLimit
Impulse this MO can take before gibbing. 0+

GlobalAccScalar
Gravity's affect on this MO. 0.5 is half gravity. -0.5 is half negative gravity. -.>+

AirResistance
Amount of this MO's velocity to subtract every tick. 0.1 would be 10% current lost per tick. -.>+

OrientToVel
Amount to orient this MO to it's velocity. 0 is no orientation, 0.5 is somewhat slowly, 1 is instantly. 0.0-1.0

EmissionAngle
Angle from emitter's current angle to emit. In degrees, 0 is right, -90 is down, 90 is up, 180 or -180 is left. You can use any angle, but those are most common.

ScreenEffect
Defines a glow should be attached to this MO. Glows are attached at their center to the MO's SpriteOffset, or in the case of MOPixels and MOSParticles, their atom. Most useful on MOPixels and MOSParticles because sometimes they'll be hidden behind MOSRotatings and the like.

BurstTriggered
Is this emitter off until the first burst? 0/1

EmittedParticle
The particle emitted in this definition.

BurstSize
The number of particles to emit at the burst. 0+

Spread
Spread in radians to throw emissions or gibs. 3.14 is a full circle around the original point.

PushesEmitter
Does this emission affect the velocity of the emitter (and therefore anything this emitter is attached to)? 0/1

EmissionEnabled
Are regular emissions (not burst) enabled? 0/1

EmissionsIgnoreThis
Causes emissions to ignore collisions with the parent and all of its parents. 0/1

ParticlesPerMinute
How many of the EmittedParticle to spawn per minute. Under 60, this becomes a random chance, as in 30 would cause a particle to spawn on average every other second but in reality means that every second there is a 50% chance of a particle being spawned. 0+

BurstScale
What to multiply the BurstSize, Spread, and Min/MaxVelocity of all emissions by when bursting. (Geti)Might only affect
velocities. 1+

BurstDamage
How much damage should this emitter do to attached Actors when bursting? (only affects actors) 0+

FlashOnlyOnBurst
Should the Flash only appear during a burst (as opposed to the entire time it is emitting)? 0/1

FireIgnoresThis
Causes gun fire to ignore collisions with the parent and all of its parents. Thus on most weapons, having the firing offset inside the gun isn't going to cause any problems. 0/1

LifeVariation
A multiplier for how much variance the LifeTime of an Emission of Gib can vary. Setting to 0.5 will allow the Emission or Gib to be 150% lived or 50% lived. 0.0-1.



Updates:
-1.4 Fixed spelling mistakes, changed Quad-Axis to Cartesian Plane and made it a little easier to understand. [7/14/2010]
-1.3 Moved large blocks of code to Pastebin.com, Also error fixing.[4/12/2010]
-1.2 Changed the wiki to Geti's edit. [4/08/20120]
-1.1 Posted Error Section [3/31/2010]
-1.0 Posted the Tutorial [3/30/2010]

Editors and Contributions :D :

---LowestFormOfWit--- [Error Checking, Suggestions, Leg/arm frame contribution, FAQ Contribution]
---CrazyMLC--- [Error Checking]
---HyperKultra--- [Error Checking]
---DSMK2--- [Error Checking, Suggestions]
---Duh102--- [Error Checking, Suggestions]
---salt_1219--- [Error Checking]
---Grif--- [Error Checking, Suggestions]
---numgun--- [Error Checking]
---Geti--- [Wiki fix, Pastebin Suggestion, Error Checking.]

Please Contribute, or Help me correct any errors!


Last edited by dragonxp on Thu Jul 15, 2010 2:30 am, edited 9 times in total.



Wed Mar 31, 2010 3:16 am
Profile
User avatar

Joined: Mon Jun 15, 2009 4:02 pm
Posts: 905
Reply with quote
Post Re: [Tutorial]First Actor.
2.15, I always thought that it was 20px to a meter?

Aside from that though, the tutorial looks pretty great, the only other thing being that you almost suggest that you can't change the dimensions of each sprite. Might just be me on that last one though, so no worries.
Good job!


Wed Mar 31, 2010 7:32 am
Profile WWW
User avatar

Joined: Mon Oct 19, 2009 9:04 am
Posts: 302
Location: Under Your Bed
Reply with quote
Post Re: [Tutorial]First Actor.
Loved it, very helpful. Bookmarked!


Wed Mar 31, 2010 2:50 pm
Profile YIM
User avatar

Joined: Wed Feb 24, 2010 11:00 pm
Posts: 255
Location: Unknow
Reply with quote
Post Re: [Tutorial]First Actor.
i know how to make one AHuman survive only with his torso.(with out lua :evil: )


Wed Mar 31, 2010 6:04 pm
Profile
User avatar

Joined: Mon Feb 02, 2009 9:18 pm
Posts: 618
Location: Ancient Hispania
Reply with quote
Post Re: [Tutorial]First Actor.
CCnewplayer wrote:
i know how to make one AHuman survive only with his torso.(with out lua :evil: )


woah then gotcha wants a children yours, PM him :wink:

very well done first-step tutorial!


Thu Apr 01, 2010 1:33 pm
Profile
User avatar

Joined: Tue Apr 01, 2008 4:49 pm
Posts: 1972
Location: The Netherlands
Reply with quote
Post Re: [Tutorial]First Actor.
NaXx wrote:
woah then gotcha wants a children yours, PM him :wink:


Uhh... Care to explain this bit? :roll:


Thu Apr 01, 2010 1:40 pm
Profile
User avatar

Joined: Wed Sep 09, 2009 3:16 am
Posts: 3032
Location: Somewhere in the universe
Reply with quote
Post Re: [Tutorial]First Actor.
CCnewplayer wrote:
i know how to make one AHuman survive only with his torso.(with out lua :evil: )


make arm/legs have non damaging wounds, make head a null.


Thu Apr 01, 2010 4:58 pm
Profile
User avatar

Joined: Wed Feb 24, 2010 11:00 pm
Posts: 255
Location: Unknow
Reply with quote
Post Re: [Tutorial]First Actor.
dragonxp wrote:
CCnewplayer wrote:
i know how to make one AHuman survive only with his torso.(with out lua :evil: )


make arm/legs have non damaging wounds, make head a null.


you are wrong hahahahahahahahahahaha


Thu Apr 01, 2010 7:02 pm
Profile
User avatar

Joined: Mon Oct 06, 2008 2:04 am
Posts: 1559
Reply with quote
Post Re: [Tutorial]First Actor.
CCnewplayer wrote:
dragonxp wrote:
CCnewplayer wrote:
i know how to make one AHuman survive only with his torso.(with out lua :evil: )


make arm/legs have non damaging wounds, make head a null.


you are wrong hahahahahahahahahahaha


Any actor without a head attachable (null or otherwise) is hard-coded to die. This is why when people want an actor to survive decapitation, they make a null head as the 'real' head, and then add a 'fake' head attachable on top that serves all visual purposes of the head, yet allows the actor to appear to walk around without one.

Correct me if I'm wrong, but I'm also pretty sure any actor without all arms/legs is also hard-coded to bleed out and eventually die. So unless you make the leg/arm BreakWounds do negative EmissionDamage, I'm skeptical of either of you knowing how to do what you claim.


Thu Apr 01, 2010 7:08 pm
Profile
User avatar

Joined: Fri Dec 22, 2006 4:20 am
Posts: 4772
Location: Good news everyone!
Reply with quote
Post Re: [Tutorial]First Actor.
A headless actor loses health very quickly, you can see this by making an actor have a lot of health and getting it decapitated. This does not happen when limbs are dismembered.


Thu Apr 01, 2010 7:38 pm
Profile WWW
User avatar

Joined: Mon Oct 06, 2008 2:04 am
Posts: 1559
Reply with quote
Post Re: [Tutorial]First Actor.
CrazyMLC wrote:
A headless actor loses health very quickly, you can see this by making an actor have a lot of health and getting it decapitated. This does not happen when limbs are dismembered.


I'm 95% sure that when you have an armless/legless actor, they bleed out, regardless of wounds defined or even being present.

And you're probably right about the head, but the rate is so high, it is basically instantaneous death for any balanced actor.


Thu Apr 01, 2010 9:01 pm
Profile
User avatar

Joined: Wed Jan 07, 2009 10:26 am
Posts: 4074
Location: That quaint little British colony down south
Reply with quote
Post Re: [Tutorial]First Actor.
If I remember correctly, the Data actor can survive headless for a good deal of time, if not effectively indefinitely.


Fri Apr 02, 2010 5:48 am
Profile WWW
User avatar

Joined: Wed Feb 24, 2010 11:00 pm
Posts: 255
Location: Unknow
Reply with quote
Post Re: [Tutorial]First Actor.
CrazyMLC wrote:
A headless actor loses health very quickly, you can see this by making an actor have a lot of health and getting it decapitated. This does not happen when limbs are dismembered.


exactly the old man is smart. 1000 put life and ready.


Fri Apr 02, 2010 1:41 pm
Profile
User avatar

Joined: Wed Sep 09, 2009 3:16 am
Posts: 3032
Location: Somewhere in the universe
Reply with quote
Post Re: [Tutorial]First Actor.
Lol, my way was better. I have a 100000 life man here somewhere...


Fri Apr 02, 2010 6:19 pm
Profile
User avatar

Joined: Wed Feb 17, 2010 12:07 am
Posts: 1545
Location: That small peaceful place called Hell.
Reply with quote
Post Re: [Tutorial]First Actor.
LowestFormOfWit wrote:
Correct me if I'm wrong, but I'm also pretty sure any actor without all arms/legs is also hard-coded to bleed out and eventually die. So unless you make the leg/arm BreakWounds do negative EmissionDamage, I'm skeptical of either of you knowing how to do what you claim.


Correct me if I'm wrong, but Breakwounds are not hard coded...


Last edited by Coops on Thu Apr 08, 2010 11:43 pm, edited 1 time in total.



Thu Apr 08, 2010 11:38 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 32 posts ]  Go to page 1, 2, 3  Next

Who is online

Users browsing this forum: No registered users


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.085s | 14 Queries | GZIP : Off ]