Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const float size = 500.0;
- class script {
- array<prop@> glow = {};
- scene@ g;
- array<dustman@> dustmen = {};
- int playerCount;
- array<bool> added = {false,false,false,false};
- script(){
- playerCount = num_cameras();
- glow.resize(playerCount);
- dustmen.resize(playerCount);
- @g = get_scene();
- for(int i = 0; i < playerCount; i++){
- @glow[i] = create_prop();
- glow[i].prop_set(3);
- glow[i].prop_group(22);
- glow[i].prop_index(3);
- glow[i].layer(15);
- glow[i].sub_layer(10);
- glow[i].scale_x(size/997);
- glow[i].scale_y(size/410);
- //g.add_prop(glow[i]);
- }
- }
- void step(int entities){
- for(int i = 0; i < playerCount; ++i){
- if(@dustmen[i] == null){
- controllable@ e = controller_controllable(i);
- if(@e != null){
- @dustmen[i] = @e.as_dustman();
- }
- }
- else{
- glow[i].x(dustmen[i].x()-(size*0.3));
- glow[i].y(dustmen[i].y()-(size*0.3));
- if(!added[i]){
- g.add_prop(glow[i]);
- added[i] = true;
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment