What no one has mentioned is that entity function are not allowed to have parameters. And the manual is currently of no help here. I guess you can think of it this way... the level editor allows you to assign actions to models and other entities. There is no way to assign a parameter to the assigned function in the level editor. ent_create is the script way of placing an entity in the level.

Also your code you first posted the create_scaled_entity(5, 5) is a call to that function not a pointer to that function with parameters. There is no way to code a pointer to a function AND pass parameters to it. This is why my is null as the entity has not been created yet and this function is not associated with the entity only the return value is used as the pointer to the action for this function.

So the bottom line is that entity action functions can not have parameters.


Our new web site:Westmarch Studios