Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,618 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
How do you create the parent/child relationship... #119477
03/26/07 15:30
03/26/07 15:30
Joined: Mar 2007
Posts: 47
Columbus Ohio
S
sweetpickles Offline OP
Newbie
sweetpickles  Offline OP
Newbie
S

Joined: Mar 2007
Posts: 47
Columbus Ohio
I'm not looking for code as much as I'm looking for a simple way to implement the following...

I'm wondering how everybody "gives" models different pieces of equipment. In a 3rd person environment where you want the model to display what they are carrying, how do you go about giving a model different things? Weapons, armor, hair, clothes, etc. Better still, what's the best way to manage them all? I'm assuming there has to be a parent/child relationship between most items, but how do you keep track of it all and what's the best way to approach it (both artistically and in the programming)?

Re: How do you create the parent/child relationshi [Re: sweetpickles] #119478
03/29/07 13:27
03/29/07 13:27
Joined: Mar 2007
Posts: 47
Columbus Ohio
S
sweetpickles Offline OP
Newbie
sweetpickles  Offline OP
Newbie
S

Joined: Mar 2007
Posts: 47
Columbus Ohio
Anybody?

I read in another post about assigning an emitter to a vertex on a model. Is it a similar method that I'll have to use?

Re: How do you create the parent/child relationshi [Re: sweetpickles] #119479
03/30/07 03:39
03/30/07 03:39
Joined: Oct 2004
Posts: 1,655
T
testDummy Offline
Serious User
testDummy  Offline
Serious User
T

Joined: Oct 2004
Posts: 1,655
Reference: eLL plugin (freeware)
shotty ea example:
Code:

include <eLL.wdl>;

define _stuffIndex, skill22;
var stuffIndex = -1;

entity* eThing;
var i0;
var thingCount;
/*******************************
aKnowsJack
a parent of jack's things
*******************************/
action aKnowsJack {
stuffIndex += 1;
my._stuffIndex = stuffIndex;

eaAdd(my._stuffIndex, ent_create(<dirtySocks.mdl>, my.x, NULL));
eaAdd(my._stuffIndex, ent_create(<pantyHose.mdl>, my.x, NULL));
eaAdd(my._stuffIndex, ent_create(<duckTape.mdl>, my.x, NULL));
eaAdd(my._stuffIndex, ent_create(<ammonium_nitrate.mdl>, my.x, NULL));
eaAdd(my._stuffIndex, ent_create(<fuel_oil.mdl>, my.x, NULL));
while(me != NULL) {
//...
i0 = 0;
thingCount = eaGetCount(my._stuffIndex);
while(i0 < thingCount) {
eThing = eaGet(my._stuffIndex, i0);
if (eThing != NULL) {
vec_set(eThing.x, my.x);
eThing.frame = my.frame;
}
i0 += 1;
}
//...
wait(1);
}
}



Re: How do you create the parent/child relationshi [Re: testDummy] #119480
03/30/07 12:19
03/30/07 12:19
Joined: Mar 2007
Posts: 47
Columbus Ohio
S
sweetpickles Offline OP
Newbie
sweetpickles  Offline OP
Newbie
S

Joined: Mar 2007
Posts: 47
Columbus Ohio
Aside from Jack being on a dozen terror watch lists, this makes a little sense.

It's going to take a few times of me reading this to really understand it.

Thanks.

Re: How do you create the parent/child relationshi [Re: sweetpickles] #119481
03/30/07 13:08
03/30/07 13:08
Joined: Oct 2004
Posts: 1,655
T
testDummy Offline
Serious User
testDummy  Offline
Serious User
T

Joined: Oct 2004
Posts: 1,655
Due to the misspelling of 'duct tape', I don't think KnowsJack would 'make' many of the lists.

I suppose many might direct you to the use of handle(), ptr_for_handle(), and the possible use of the parent pointer for entities.
Also, I believe there are some 'inventory-type' scripts available for examination.

Assuming that such functionality is somewhat awkward to implement in C-Script, I would probably simply try to create a reusable plugin for the desirable functionality.

Quote:

It's going to take a few times of me reading this to really understand it.



Even after reading the lengthy associated (eLL) thread, it may not make much sense.
Certainly, the crude example does not represent the 'best' solution.

I believe that I might find an 'advanced' plugin that implements such functionality (which is somewhat undefined) useful, now, or in the near future.
If such doesn't already exist, I could try to write one, if all of the necessary functionality could be nailed down properly.

Re: How do you create the parent/child relationshi [Re: testDummy] #119482
03/30/07 17:27
03/30/07 17:27
Joined: Mar 2007
Posts: 47
Columbus Ohio
S
sweetpickles Offline OP
Newbie
sweetpickles  Offline OP
Newbie
S

Joined: Mar 2007
Posts: 47
Columbus Ohio
I don't know. There's a brand of duct tape called "Duck Tape".

I'm still a long way off from needing something like this. I just got 3dgs and am working through all the tutorials I can find. But it's good to see an example to help get me thinking of a way to achieve it.


Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1