I want to make a circular image rotate,the I defined an entity with a cylinder model,entrusted it the image.But how coule I use the function bmap_for_entity?Or how can I realize it?
I use another method,the picture is assigned to the entity in the definition.Here is the script: action roll() { while (1) { my.roll += 5 ; my.roll %= 360; wait (1); } } entity tupian { type = <fangxp.png>; //the picture that I want to rotate layer = 85; flags = visible; x = ...; y = ...; z = ...;
event = roll; } the picture appears on the screen,but the function roll didn't work,in other words the picture doesn't rotate,why?why can't the function do effect?
Event function is only triggered by events , eg. collision , scan. Also you cant (I think) assign an action to an event , it should be a function instead , and its good to have the while loops outside the event function. Dont ignore this last text , because you'll have problems in the future