Quote:

dllfunction add_zip_resource() var;
function main(){
add_zip_resource();
...
execute("return;}include <hud.wdl>;starter hud{rotate_it();}"); //this one must be last line!
}


create new "hud.wdl", write this code into it:
Code:


entity bonus{
type = <energy.mdl>; //provide your small model
layer = 100;
flags = transparent,bright,visible;
view = CAMERA;
albedo = 50;
x=100;y=-50;z=-30; //play with this values
scale_x=0.5;scale_y=0.5;scale_z=0.5;
};
function rotate_it{
while(1){
bonus.pan+=2*time;
wait(1);
}
}




I have got this up and running - and am now trying to encrypt my wdl files as per this post by Lion Ts.

My issue is that with entity functions, they don't seem to be executing the scripts that reside in the include that is zipped. I can see how actions in the starter function listed above are executed after the include file is unzipped and added, but what about entitiy functions?

Also, in the original post, it seems like each entity has to be assigned a pointer to work? I found that models unzip and get added without assigning pointers, running their scripts, but sounds do not?

A little confused here..