Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-22-2012, 08:01 PM
Pelikano Pelikano is offline
Registered User
Pelikano's Avatar
Join Date: Oct 2008
Posts: 1,133
Pelikano has a little shameless behaviour in the past
Well it's pretty obvious that if you place a player.chat = "bla"; before an else if that your code will break:

PHP Code:
if (bla) {

}
player.chat "hi";
else if (
bla2) {


This will obviously not work... so I don't think that it has anything to do with your syntax really lol
Reply With Quote
  #2  
Old 01-22-2012, 08:20 PM
iBeatz iBeatz is offline
Kavan
iBeatz's Avatar
Join Date: Dec 2010
Location: Northern Ireland, UK
Posts: 154
iBeatz will become famous soon enough
Send a message via Yahoo to iBeatz
Quote:
Originally Posted by Pelikano View Post
Well it's pretty obvious that if you place a player.chat = "bla"; before an else if that your code will break:

PHP Code:
if (bla) {

}
player.chat "hi";
else if (
bla2) {


This will obviously not work... so I don't think that it has anything to do with your syntax really lol
Ah yes, you're right.
I wasn't thinking straight when doing this it seems. Guess I was too frustrated trying to get my second collision check to work. Thanks.

Hezzy, can you suggest a simpler alternative to what I currently have?
__________________

Intelligence without ambition is like a bird without wings.

Reply With Quote
  #3  
Old 01-22-2012, 08:57 PM
Hezzy002 Hezzy002 is offline
Registered User
Join Date: Jul 2011
Posts: 247
Hezzy002 is a jewel in the roughHezzy002 is a jewel in the rough
Quote:
Originally Posted by iBeatz View Post
Ah yes, you're right.
I wasn't thinking straight when doing this it seems. Guess I was too frustrated trying to get my second collision check to work. Thanks.

Hezzy, can you suggest a simpler alternative to what I currently have?
Well, it's just pong. You can just do an axis-aligned bounding box check, or rectangle intersection. You don't have to use any trig or angle work, just some basic math.
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 05:24 PM.


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