Thanks guys for all the replies;

Originally Posted By: WretchedSid
Of course, all of this is going to break the second the strings are used internally. Or hashed and that hash is used internally.
, but the wmb compiler saves the entity.strings, the manual points this out itself, maybe I misinterpreting your comment.


Originally Posted By: Superku
I see two separate questions/ things in this thread/ OP. The first thing is to be able to modify string1/2, but as stated by others you can just create a string and save it in one of the 100 skills.
, only 20 skills are saved for wmb, I already use 2 of them (1 for alpha value cause wmb does not save this >> , and 1 for ID), so I want to leave others alone.
Leave the skills alone grin <bad joke>.

Originally Posted By: Superku
second thing is that you want to attach 2 actions to your entities because of editor/ ingame differences. Alternatively, I think it would be a better way to save additional data in a *.txt file from which you then load map editor related actions for each entity if necessary (and suppress the execution of the actual entity action).
, well this is something I am still pondering about what is the best solution. My idea was to set the editor action through ent_create since the game action does not yet exist at that time, cause its not the game script. So I thought I would let the user being able to type/c&p the wanted entity action string so it can be saved into the entity.string1 . Than the user can add the editor action in his script and from there:
- call the right game script action/function (saved into entity.string1) or based of maybe the enttiy's ID. Or ent_filename for the slow approach.
- return;

But I see some flaws with this. One is adding extra mess to the user's script (though I doubt if this can be solved). But mainly this puts up a limit of max entities based on the max function/action limit. So I am thinking about removing the whole editor action dependence all together and replace it with 1 function that check ents through ent_next and mouse_ent for click/touch events. Than just add a dummy entity action pure for this user to acces the entity in game script and give it a new (/ the right) action.

ps: is there an elegant line that runs a function for an entity based on a string?

-edit, just saw your response JCL, thanks for replying.
Quote:
string1/2 can be modified - nothing evil will happen (I hope). You only must be aware that they are char* pointers, so they do not store a string content, but only its pointer.
, so its useless for saving to wmb?

Last edited by Reconnoiter; 05/25/15 10:04.