Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   New Scripting Engine (GS2) (https://forums.graalonline.com/forums/forumdisplay.php?f=153)
-   -   shoot() problem (https://forums.graalonline.com/forums/showthread.php?t=83892)

Codein 01-26-2009 03:53 PM

shoot() problem
 
For some reason, shoot() is not working at all.

Here is the code I have. Any ideas on how to fix it? For the record, setani() works fine.

PHP Code:

//#CLIENTSIDE

public function onMain() { 
  if (
clientr.equipped[3] == "gun") {
    
temp.plx player.1.1 vecx(player.dir) * 1.5;
    
temp.ply player.1.5 vecy(player.dir) * 1.5;
    
temp.projectile_angle getangle(temp.plxtemp.ply);
    
    
freezeplayer(0.2);
    
    
setani("insom_" clientr.equipped[0] @ "-fire""");
    
    
showtext(230temp.plxtemp.ply"""""X");
    
    
setshootparams(clientr.equipped[5]);
    
shoot(temp.plxtemp.plyplayer.ztemp.projectile_angle11"insom_bullet""test");
  }



Chompy 01-26-2009 04:12 PM

Well, both zangle and power is set to 1. Set those to 0 and it should work.

PHP Code:

shoot(startx, .startystartzanglezanglepoweranianiparam0aniparam1); // etc with the aniparams 


Codein 01-26-2009 04:18 PM

No luck :(

Chompy 01-26-2009 04:27 PM

Check with onActionProjectile() if the projectile is hitting the player, or try and fix up temp.plx and temp.ply (As they aren't correctly infront of the player, unless this isn't what you're aiming for).

And "insom_bullet" is downloadable and all?

Codein 01-26-2009 04:33 PM

Quote:

Originally Posted by Chompy (Post 1460162)
Check with onActionProjectile() if the projectile is hitting the player, or try and fix up temp.plx and temp.ply (As they aren't correctly infront of the player, unless this isn't what you're aiming for).

And "insom_bullet" is downloadable and all?

"insom_bullet" is downloadable.

onActionProjectile() picks it up. So, really, the gani isn't showing correctly.

Chompy 01-26-2009 06:27 PM

Other players catches the onActionProjectile() event? Or the player whom the script is run on clientside?

And maybe posting the content of the gani file can help :)

Codein 01-26-2009 07:43 PM

Quote:

Originally Posted by Chompy (Post 1460200)
Other players catches the onActionProjectile() event? Or the player whom the script is run on clientside?

And maybe posting the content of the gani file can help :)

Sorry for not replying earlier, but the images didn't appear in the gani, for some strange reason. I uploaded it again and reconnected and it's all working fine now :) Thanks for your help.

Chompy 01-26-2009 09:26 PM

Ah :) Good you figured it out though :3


All times are GMT +2. The time now is 01:52 AM.

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