View Full Version : GetThingParent();
CaveDemon
06-28-2002, 11:23 AM
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).]
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?
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.
Fred = Creatething(Type, Bob);
Bob is Fred's parent. Why? Becuase he is who I created Fred with.
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 (http://www.tbns.net/GBK/ol/index.htm).
CaveDemon
06-28-2002, 11:47 AM
<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?
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.
Fred = Creatething(Type, Bob);
Bob is Fred's parent. Why? Becuase he is who I created Fred with.
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...
</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?
SaberMaster
06-28-2002, 11:53 AM
It's a bit more complicated than that. From the DataMaster:
<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 (http://www.geocities.com/sabersdomain/fileframe.html), Parsec (http://www.geocities.com/sabersdomain/fileframe.html), and the EditPlus Cog Files (http://www.geocities.com/sabersdomain/fileframe.html).
Visit Saber's Domain (http://www.geocities.com/sabersdomain).
ZOOIkes
06-29-2002, 03:18 AM
http://forums.massassi.net/html/confused.gif
I found GBK's explenation alot clearer http://forums.massassi.net/html/smile.gif
*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 (http://www.tbns.net/GBK/ol/index.htm).
Lord_Grismath
06-30-2002, 03:39 AM
Although somewhat grammatically flawed...
<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.
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 (http://www.tbns.net/GBK/ol/index.htm).
SaberMaster
06-30-2002, 10:58 AM
It should be "who," Grismath. http://forums.massassi.net/html/tongue.gif
------------------
Author of the JK DataMaster (http://www.geocities.com/sabersdomain/fileframe.html), Parsec (http://www.geocities.com/sabersdomain/fileframe.html), and the EditPlus Cog Files (http://www.geocities.com/sabersdomain/fileframe.html).
Visit Saber's Domain (http://www.geocities.com/sabersdomain).
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.