Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-26-2009, 03:53 PM
Codein Codein is offline
jwd
Codein's Avatar
Join Date: Oct 2005
Location: Greater Manchester
Posts: 2,423
Codein has a spectacular aura aboutCodein has a spectacular aura about
Send a message via AIM to Codein Send a message via MSN to Codein
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");
  }

Reply With Quote
  #2  
Old 01-26-2009, 04:12 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
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 
__________________
Reply With Quote
  #3  
Old 01-26-2009, 04:18 PM
Codein Codein is offline
jwd
Codein's Avatar
Join Date: Oct 2005
Location: Greater Manchester
Posts: 2,423
Codein has a spectacular aura aboutCodein has a spectacular aura about
Send a message via AIM to Codein Send a message via MSN to Codein
No luck
Reply With Quote
  #4  
Old 01-26-2009, 04:27 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
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?
__________________
Reply With Quote
  #5  
Old 01-26-2009, 04:33 PM
Codein Codein is offline
jwd
Codein's Avatar
Join Date: Oct 2005
Location: Greater Manchester
Posts: 2,423
Codein has a spectacular aura aboutCodein has a spectacular aura about
Send a message via AIM to Codein Send a message via MSN to Codein
Quote:
Originally Posted by Chompy View Post
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.
Reply With Quote
  #6  
Old 01-26-2009, 06:27 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
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
__________________
Reply With Quote
  #7  
Old 01-26-2009, 07:43 PM
Codein Codein is offline
jwd
Codein's Avatar
Join Date: Oct 2005
Location: Greater Manchester
Posts: 2,423
Codein has a spectacular aura aboutCodein has a spectacular aura about
Send a message via AIM to Codein Send a message via MSN to Codein
Quote:
Originally Posted by Chompy View Post
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.
Reply With Quote
  #8  
Old 01-26-2009, 09:26 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Ah Good you figured it out though :3
__________________
Reply With Quote
Reply


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 03:09 AM.


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