you can either store some function pointer in a skill or you can use engine_getscript to get the action/function by name

the first one works like this:

ent = ent_create([...], myaction);
ent.actionptr = myaction;
[...]
you = ent_create(ent.type, ent.x, ent.actionptr);

the second one:

ent = ent_create([...], myaction);
ent.string1 = "myaction";
[...]
you = ent_create(ent.type, ent.x, engine_getscript(_chr(ent.string1))); // EDIT: Too dumb to write correct cody, sorry!

Last edited by MasterQ32; 09/25/12 17:42. Reason: Just forgot the most important part... :)

Visit my site: www.masterq32.de