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
  #16  
Old 09-04-2007, 01:44 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Ya, you can do that. Or you can also specify a few check points (I did this once withe sword.gani, I opened the gani up in Graalshop and translated the pixel position of the tip of the sword into tiles for each frame, and did checks there.
Reply With Quote
  #17  
Old 09-04-2007, 01:58 AM
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
That seems like a good alternative. However, I plan to use weapons which vary in length. It'd look silly if I had a large bamboo pole (there's a japanese word I'm trying to think of) that only did damage at the end of the pole. Obviously, I'm looking more towards doing damage if you're in the area of the sector rather than on the circumference.
Reply With Quote
  #18  
Old 09-04-2007, 02:14 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
You can define the area of a circle you're willing to check by specifying a point A with an angle and radius, then check all along a circle until getting to point B, which would also be an angle with a radius. Something like:
PHP Code:
this.width=pi/2;
this.checkcount=10;
this.checkwidth=this.width/this.checkcount;
this.radius=5;
this.angle=((player.dir-1)%4)*(pi/2);
for (
i=0;i<this.checkcount;i++) {
  
triggeraction(player.x+cos(this.angle+(this.checkwidth*i))*this.radius,player.y-sin(this.angle+(this.checkwidth*i))*this.radius,"attack");

Or something like that.
Reply With Quote
  #19  
Old 09-04-2007, 05:50 PM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
Grades of Math are different in every school so you can't really say "10th grade math".
__________________
Do it with a DON!
Reply With Quote
  #20  
Old 09-04-2007, 06:23 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
I got taught about basic trig, including cos/sin/tan functions, at around 13 years old and was a recurring subject until I'd finished school, which was about 3 months ago or so.

As soon as it comes up once in your syllabus, it's more than likely to reoccur in the future. For example, I'm taking Maths at Sixth-Form (which is like Year 12 and 13 of school) and trigonometry makes up a good part of it.
Reply With Quote
  #21  
Old 09-04-2007, 09:45 PM
Switch Switch is offline
o.o
Switch's Avatar
Join Date: Jan 2007
Location: Philadelphia
Posts: 3,038
Switch has a spectacular aura about
Send a message via MSN to Switch
Quote:
Originally Posted by Codein View Post
I got taught about basic trig, including cos/sin/tan functions, at around 13 years old and was a recurring subject until I'd finished school, which was about 3 months ago or so.

As soon as it comes up once in your syllabus, it's more than likely to reoccur in the future. For example, I'm taking Maths at Sixth-Form (which is like Year 12 and 13 of school) and trigonometry makes up a good part of it.
I'm learning 9th grade general stuff at age 12 so I guess I'll be learning next year.
__________________
Oh squiggly line in my eye fluid. I see you lurking there on the peripheral of my vision.
But when I try to look at you, you scurry away.
Are you shy, squiggly line?
Why only when I ignore you, do you return to the center of my eye?
Oh, squiggly line, it's alright, you are forgiven.
Reply With Quote
  #22  
Old 09-04-2007, 09:55 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 Switch View Post
I'm learning 9th grade general stuff at age 12 so I guess I'll be learning next year.
I think Grade 8 is like Year 9 in England.
Reply With Quote
  #23  
Old 09-04-2007, 09:59 PM
Switch Switch is offline
o.o
Switch's Avatar
Join Date: Jan 2007
Location: Philadelphia
Posts: 3,038
Switch has a spectacular aura about
Send a message via MSN to Switch
Quote:
Originally Posted by Codein View Post
I think Grade 8 is like Year 9 in England.
I'm in 7th grade o_O
__________________
Oh squiggly line in my eye fluid. I see you lurking there on the peripheral of my vision.
But when I try to look at you, you scurry away.
Are you shy, squiggly line?
Why only when I ignore you, do you return to the center of my eye?
Oh, squiggly line, it's alright, you are forgiven.
Reply With Quote
  #24  
Old 09-04-2007, 10:06 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 Switch View Post
I'm in 7th grade o_O
Yeah, but you'll move on to 8th Grade sooner or later :P

Nothing is stopping you from learning though :P
Reply With Quote
  #25  
Old 09-04-2007, 10:18 PM
Switch Switch is offline
o.o
Switch's Avatar
Join Date: Jan 2007
Location: Philadelphia
Posts: 3,038
Switch has a spectacular aura about
Send a message via MSN to Switch
Quote:
Originally Posted by Codein View Post
Yeah, but you'll move on to 8th Grade sooner or later :P

Nothing is stopping you from learning though :P
Next year = 8th grade = I learn sin/cos in school
__________________
Oh squiggly line in my eye fluid. I see you lurking there on the peripheral of my vision.
But when I try to look at you, you scurry away.
Are you shy, squiggly line?
Why only when I ignore you, do you return to the center of my eye?
Oh, squiggly line, it's alright, you are forgiven.
Reply With Quote
  #26  
Old 09-04-2007, 10:25 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 Switch View Post
Next year = 8th grade = I learn sin/cos in school
Why wait if you have a desire to learn?
Reply With Quote
  #27  
Old 09-04-2007, 11:17 PM
Switch Switch is offline
o.o
Switch's Avatar
Join Date: Jan 2007
Location: Philadelphia
Posts: 3,038
Switch has a spectacular aura about
Send a message via MSN to Switch
Quote:
Originally Posted by Codein View Post
Why wait if you have a desire to learn?
Cuz I don't understand what the hell they're talkin about xD
__________________
Oh squiggly line in my eye fluid. I see you lurking there on the peripheral of my vision.
But when I try to look at you, you scurry away.
Are you shy, squiggly line?
Why only when I ignore you, do you return to the center of my eye?
Oh, squiggly line, it's alright, you are forgiven.
Reply With Quote
  #28  
Old 09-05-2007, 12:44 AM
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 Switch View Post
Cuz I don't understand what the hell they're talkin about xD
Ever thought about googling it? If this yields no results, PM me :P
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 07:04 PM.


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