Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 10-12-2011, 06:33 AM
pig132 pig132 is offline
professional troll
Join Date: May 2006
Posts: 260
pig132 will become famous soon enough
Getting center of level (makescreenshot)

Alright i've run into a little problem making my own screenshot weapon.

Everything works fine except when trying to get the center of the level. I've tried fowlplay4's line of:
PHP Code:
temp.center = {player.+ (screenwidth 32), player.+ (screenheight 32)}; 
And i've also tried things like:
PHP Code:
temp.center = {(screenwidth 2), (screenheight 2)} 
And also 30, 30 for the center but no matter what i set it to, it always outputs the same image.

Why is this?

PHP Code:
//#CLIENTSIDE
function onWeaponFired() {
  
temp.filename "screenshot_" int(random(100001000000)) @ ".png";
  
temp.center = {player.+ (screenwidth 32), player.+ (screenheight 32)};
  
ShowFlash();
  
makescreenshot2(temp.filename0x3ftemp.center[0], temp.center[1], player.zscreenwidthscreenheight);
}

function 
ShowFlash() {
  
with (findimg(200)) {
    
polygon = {
      
00640,
      
6464064
    
};
    
    for (
temp.1temp.>= 0temp.-= 0.1;) {
      
alpha -= 0.1;
      
sleep(0.05);
      
      if (
temp.== 0) {
        
hideimg(200);
      }
    }
  }

Thank you
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 12:29 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.