1 registered members (TipmyPip),
18,449
guests, and 6
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
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
testDummy
Serious User
|
Serious User
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: sweetpickles]
#119481
03/30/07 13:08
03/30/07 13:08
|
Joined: Oct 2004
Posts: 1,655
testDummy
Serious User
|
Serious User
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.
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|