Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 05-29-2014, 09:15 PM
khortez khortez is offline
PrototypeX
khortez's Avatar
Join Date: Dec 2008
Posts: 91
khortez will become famous soon enough
can't find a work around for if a player misses a hit

PHP Code:
function Swing(){
  if(
null in player.3player.1.5 } ){ 
    
triggeraction(player.3player.1.5"Contact"player.account);
    
player.chat "Contact!";
  }else{
     
player.chat "No contact!";
   }

I've been trying to check if the player hit's nothing. been kind of difficult to do and this is my latest attempt, any suggestions?
Reply With Quote
  #2  
Old 05-29-2014, 09:47 PM
Jakov_the_Jakovasaur Jakov_the_Jakovasaur is offline
Deleted by Darlene159
Jakov_the_Jakovasaur's Avatar
Join Date: Sep 2013
Location: Deleted by Darlene159
Posts: 353
Jakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud of
there is no sure way of knowing whether a hit has landed when using that triggeraction method, you will need to loop through players and check for whether their body intersects with the attack area.

its also worth mentioning that your conditional statement doesnt make any sense (it would return true by a quirk if one of your coordinates were 0) and you need to factor in the direction of the player
__________________
This signature has been deleted by Darlene159.
Reply With Quote
  #3  
Old 05-29-2014, 10:10 PM
khortez khortez is offline
PrototypeX
khortez's Avatar
Join Date: Dec 2008
Posts: 91
khortez will become famous soon enough
Quote:
Originally Posted by Jakov_the_Jakovasaur View Post
there is no sure way of knowing whether a hit has landed when using that triggeraction method, you will need to loop through players and check for whether their body intersects with the attack area.

its also worth mentioning that your conditional statement doesnt make any sense (it would return true by a quirk if one of your coordinates were 0) and you need to factor in the direction of the player
i think i understand what you mean, thanks. i'll try again
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 06:40 AM.


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