Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → GetThingParent();
GetThingParent();
2002-06-28, 8:23 AM #1
Okay, so anyone got any idea how this command works? From somewhere i heard that it gets the thing that created another thing, but now that i think about it, wouldn't it rather get the thing template's parent? (_humanactor, _throwable, etc.)

You know. Me no. We snoosnoo.

------------------
Uh-uh. I know what you're thinking. Did he fire six shots or only five? Well, to tell you the truth, in all this excitement, I've kind of lost track myself. But being this is a .44 Magnum, the most powerful handgun in the world, and would blow your head clean off, you've got to ask yourself one question: Do I feel lucky? Well do ya, punk?

[This message has been edited by CaveDemon (edited June 28, 2002).]
Last edited by mb; today at 10:55 AM.
2002-06-28, 8:39 AM #2
Let me see if I can explain this...


Scenerio: Play fires a weapon, and the weapon kills the enemy.


How can we be certain that the player killed him?

Code:
Killed:  //Bad guy dies.

Killer = Getsourceref();  //What killed him.  BUT, according to this, it wasnt the player, but rather, the weapon.

Culprit = Getthingparent(Killer);    //AHA!  This will return the player.


The parent of a thing is the object that is cited when said thing is created.

Code:
Fred = Creatething(Type, Bob);


Bob is Fred's parent. Why? Becuase he is who I created Fred with.

Code:
Fred = Fireprojectile(Bob, Type, -1, 0, '0 0 0', '0 0 0', 0, 0, -1, -1);


Again, Bob is Fred's parent.


I hope this helps...

------------------
I used to believe that we only want what we can't have. I was wrong. The truth is, the wonderful truth is, we only want what we think we can't have.

JK editing resources.
And when the moment is right, I'm gonna fly a kite.
2002-06-28, 8:47 AM #3
Quote:
<font face="Verdana, Arial" size="2">Originally posted by GBK:
Let me see if I can explain this...


Scenerio: Play fires a weapon, and the weapon kills the enemy.


How can we be certain that the player killed him?

Code:
Killed:  //Bad guy dies.

Killer = Getsourceref();  //What killed him.  BUT, according to this, it wasnt the player, but rather, the weapon.

Culprit = Getthingparent(Killer);    //AHA!  This will return the player.


The parent of a thing is the object that is cited when said thing is created.

Code:
Fred = Creatething(Type, Bob);


Bob is Fred's parent. Why? Becuase he is who I created Fred with.

Code:
Fred = Fireprojectile(Bob, Type, -1, 0, '0 0 0', '0 0 0', 0, 0, -1, -1);


Again, Bob is Fred's parent.


I hope this helps...

[/b]</font>


Yup, it helped... now i know the cog can't be done so i won't even bother trying [http://forums.massassi.net/html/tongue.gif]


------------------
Uh-uh. I know what you're thinking. Did he fire six shots or only five? Well, to tell you the truth, in all this excitement, I've kind of lost track myself. But being this is a .44 Magnum, the most powerful handgun in the world, and would blow your head clean off, you've got to ask yourself one question: Do I feel lucky? Well do ya, punk?
Last edited by mb; today at 10:55 AM.
2002-06-28, 8:53 AM #4
It's a bit more complicated than that. From the DataMaster:

Quote:
<font face="Verdana, Arial" size="2">Here's an analogy to explain parents: Adam was the first human. To Seth, his son, Adam was the parent. To Seth's children, Adam was still the parent. But if Seth died and Adam still lived, then the grandchildren will lose their link to Adam and not find their parent. When these children (or any thing) cannot find their parent, they substitute themselves instead. But if Adam had died and Seth still lived, Seth would then be the parent of his children. This is how thing parents work in JK.

Not all verbs will link the things they create to a parent. Only FireProjectile() is known to. The template settings, creatething, fleshhit, and explode will link the things they create to the parent associated with the projectile that created them.</font>


------------------
Author of the JK DataMaster, Parsec, and the EditPlus Cog Files.
Visit Saber's Domain.
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2002-06-29, 12:18 AM #5
[http://forums.massassi.net/html/confused.gif]
I found GBK's explenation alot clearer [http://forums.massassi.net/html/smile.gif]
APT 1, 2, 3/4, 5/6
TDT
DMDMD

http://veddertheshredder.com
2002-06-29, 4:54 AM #6
*bows*

Thank you, thank you... [http://forums.massassi.net/html/smile.gif]

------------------
I used to believe that we only want what we can't have. I was wrong. The truth is, the wonderful truth is, we only want what we think we can't have.

JK editing resources.
And when the moment is right, I'm gonna fly a kite.
2002-06-30, 12:39 AM #7
Although somewhat grammatically flawed...

Quote:
<font face="Verdana, Arial" size="2">Becuase he is whom I created Fred with.
</font>


...yes, yes I've been spending too much time around those grammar nazis.
Cordially,
Lord Tiberius Grismath
1473 for '1337' posts.
2002-06-30, 1:52 AM #8
Grammar Nazi indeed... [http://forums.massassi.net/html/rolleyes.gif]

------------------
I used to believe that we only want what we can't have. I was wrong. The truth is, the wonderful truth is, we only want what we think we can't have.

JK editing resources.
And when the moment is right, I'm gonna fly a kite.
2002-06-30, 7:58 AM #9
It should be "who," Grismath. [http://forums.massassi.net/html/tongue.gif]

------------------
Author of the JK DataMaster, Parsec, and the EditPlus Cog Files.
Visit Saber's Domain.
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.

↑ Up to the top!