//----------------------------------------------------------------------------------------// function: entity action// purpose: change position on creator client// change angle and scale on server//------------------------------------------------------------------action ent_action1() { wait(3); GSTNet_RegisterEntity(my); my.enable_click = on; my.transparent = on; my.alpha = 100; my.skill50 = my.alpha;// on_click = mouseremove;// while(GSTNet_Handle(my)==0){wait(1);} my.skill2 = GSTNet_Handle(my); GSTNet_TrackEntity(my, GSTNet_TrackPos); // client+server while(1){ my.alpha = my.skill50; wait(1); }}...//----------------------------------------------------------------------------------------// function: mousemove// purpose: moves a global entity//------------------------------------------------------------------function mousemove(){ while(key_shift) { mouse_mode = 2; mouse_pointer = 2; mouse_pos.x = pointer.x; // move the mouse pointer mouse_pos.y = pointer.y; if(mouse_ent!=null) { mouse_ent.light = on; if (GSTNet_Connection() == 3){ mouse_ent.red = 255; mouse_ent.green = 0; mouse_ent.blue = 0; } if (GSTNet_Connection() == 2){ mouse_ent.red = 0; mouse_ent.green = 255; mouse_ent.blue = 0; } diag("\nLIGHT"); GSTNet_SendEntity(mouse_ent,GSTNet_TrackFlags+GSTNet_TrackColor); // set entity to debug mouse_ent.skill50 = mouse_ent.alpha - 1; GSTNet_SendSkills(mouse_ent,50,50); // set entity to debug } wait(1); }}on_click=mousemove;
Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy
oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de