Copy Ent?
Okay, let's say I want to copy an existing door on the map, but give It a new entid(If cannot do, nvm then). Anyways, I want to copy an existing door entity to a new origin. How would I do this?
|
copying doors might be a little tricky, basically they use more keyvalues than engine can get (to my knowledge), so if you wanted the door to rotate, you'd have to record them on map start. You could just make a wall (not rotating door) with the size and model of the door by copying the keyvalues that engine allows from the original door to the new door.
|
That would be like copying a ladder, that is impossible!
|
Look at the code in Plant Anywhere by KRoTaL. I remember seeing something like this but with the bombsite.
|
It is, in theory, possible to copy any entity.
What I would do is this: Create a global dynamic array using Array module. Hook create_entity in FM, both of them. On each create_entity, make a dynamic keytable, and store its index into the global dynamic array, at the index which is its ent ID. Use engine or FM to hook when key/values are initialized, and store all entity key/values into the dynamic keytable represented by their entID's. Now you have a massive table of all the entities, and all of their key/values. From this, you can completely copy an entity. |
Quote:
|
Twilight Suzuka, i did that using ur ArrayX plugin, but i haven't really tested it, kinda stopped running a server. I'm now thinking i change it to nvault. You took over entmoving anyway (well not really, but u said u did), so i guess it doesn't really matter
atomic copying a ladder is possible, the part you actually climb is called func_ladder. When you just copy the model thats on top of func_ladder, there is just nothing for you to climb |
Array module is now part of default lineup ^^
|
I'm confused. Would someone help?
Code:
:/ entities confuse me |
Okay, I think I understand It a little better. Would this work?
Code:
If It would work, would there be any strange affects or anything? |
| All times are GMT -4. The time now is 15:48. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.