Quote: function entityfunc { my.enable_click = on; //I'm not sure about this. I don't have my manual here.. my.event = click_event; ..rest of the code here }
shouldn't this be an action, when it's to be assigned to an object?
Actully no. Action and funciton mean the same thing. An action will come up on your list in WED when assighning to a model. You can manually type in the name of a funciton though.
As much as I know, you can't call an action any other way except to make a model in WED or to use "ent_create". But I've never tried this.
entity* cube; // you only need this line if you do not plan to use // a model already existing in the level. I.E. A model // you that you would create at runtime.
function code_test () {
if (EVENT_TYPE == EVENT_click) { me = player; }
while(1) {
if (key_w ==1) { my.z +=5; }end if key w if (key_a == 1) { my.x +=5; }// end if key a
}// end while 1 }// end function
action cheese // assign this action to the cube of your choose. {
entity* cube; // you only need this line if you do not plan to use // a model already existing in the level. I.E. A model // you that you would create at runtime.
function code_test () {
if (EVENT_TYPE == EVENT_click) { me = player; }
while(1) {
if (key_w ==1) { my.z +=5; }end if key w if (key_a == 1) { my.x +=5; }// end if key a
}// end while 1 }// end function
action cheese // assign this action to the cube of your choose. {