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
  #31  
Old 05-16-2007, 03:02 AM
Gambet Gambet is offline
Registered User
Join Date: Oct 2003
Posts: 2,712
Gambet is on a distinguished road
Quote:
Originally Posted by DustyPorViva View Post
I see him post 'I think' sometimes when answering scripting questions :P


But he's always right.
Reply With Quote
  #32  
Old 05-16-2007, 03:04 AM
killerogue killerogue is offline
Registered Omega
killerogue's Avatar
Join Date: Apr 2006
Location: United States
Posts: 1,920
killerogue is on a distinguished road
Send a message via AIM to killerogue Send a message via MSN to killerogue
Quote:
Originally Posted by Deadly_Killer View Post
Debatable
I was going to say something along these lines! But thought better against it!
__________________


REMEMBER, IF YOU REP ME, LEAVE A NAME!

Quote:
Originally Posted by haunter View Post
Graal admins don't die. They go to hell and regroup.
Quote:
Originally Posted by Inverness View Post
Without scripters, your graphics and levels wouldn't do anything but sit there and look pretty.
Reply With Quote
  #33  
Old 05-16-2007, 03:05 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
Maybe, but he's not always sure if he is.
Reply With Quote
  #34  
Old 05-16-2007, 03:11 AM
Rapidwolve Rapidwolve is offline
Registered User
Join Date: Jul 2006
Posts: 1,241
Rapidwolve is an unknown quantity at this point
Quote:
Originally Posted by DustyPorViva View Post
Sadly I find the wiki lacking one thing(I've yet to see skyld's though), and that is actually what goes in commands. All it tells you is if it's a floating, integer, or string. That doesn't really help much...

Anyways, for Switch:
PHP Code:
function onCreated() 
{
  
player.chat "Stuff.";

function onCreated() // This is a function. Before GS2, things like this were called in events. Basically, if it happened, execute any code in the parenthesis. In GS1, it would be if (created) {}, but all that changed in GS2. Events were translated into their own functions. So basically this means, when the NPC is created, execute everything in the parenthesis.

{...} // As explained above, parenthesis are closed around any amount of commands executed when an event is called. All commands must be executed with an event/function and closed inside parenthesis.

player.chat = "Stuff."; // player.* is associated with anything for the player. This can be player.hearts, for their hearts, player.ap, for their ap, player.x, for their x coordinate, and so on. So, taking that, and taking the knowledge that = is assign, means that you are assigning something to the player's chat, which means you'll force them to say something. "Stuff." is a string. A string is alphanumerical. That means anything not a variable, floating value, integer, has to be enclosed in quotes, or else it won't be assigned. If you want to get basic, text has to be in quotes. And lastly, the semi-colon has to be after every command. Anytime you do 'something' end it with a semi-colon before you move onto the next thing.
The world would be a better place if there were more people like you.
Reply With Quote
  #35  
Old 05-16-2007, 03:25 AM
Andy0687 Andy0687 is offline
Enigma
Join Date: Feb 2002
Posts: 1,072
Andy0687 is on a distinguished road
Quote:
Originally Posted by killerogue View Post
The main issue I had with that was...you claimed to be a scripter. But if you can't actually script anything, you ARE NOT a scripter.
Kind of like you when you started, eh?

Maybe you shouldnt be so quick to talk down to people when you "came up" the same way they are trying.

Quote:
Originally Posted by gambetsposts
.
you ever get tired of doing that?
__________________
Reply With Quote
  #36  
Old 05-16-2007, 03:33 AM
Rapidwolve Rapidwolve is offline
Registered User
Join Date: Jul 2006
Posts: 1,241
Rapidwolve is an unknown quantity at this point
Quote:
Originally Posted by Andy0687 View Post
Kind of like you when you started, eh?

Maybe you shouldnt be so quick to talk down to people when you "came up" the same way they are trying.

Well put
Reply With Quote
  #37  
Old 05-16-2007, 03:51 AM
PrinceOfKenshin PrinceOfKenshin is offline
That guy with a beard
PrinceOfKenshin's Avatar
Join Date: May 2004
Location: Ontario, Canada
Posts: 819
PrinceOfKenshin has a spectacular aura aboutPrinceOfKenshin has a spectacular aura about
ok well lets say im going to script simple gun what would i use?
__________________


Quote:
Game Master (Server): Greetings PrinceOfKenshin, there are new posts on the forums that demand your urgent attention! God speed, the fate of the world is in your hands. If you fail, middle earth will forever be in the darkness and your children will be enslaved by McKain.
Reply With Quote
  #38  
Old 05-16-2007, 03:54 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
shoot(), would be the simplest of ways, and can be done with one command and a couple of ganis. Sorry I can't provide the details, I don't remember. I'll look it up after House is done.

EDIT:

PHP Code:
//#CLIENTSIDE
function onWeaponfired() {
  
shoot(x,y,z,angle,zangle,power,"gani",param1,param2,...[these params are sent to the GANInot passed in the shoot command]);

//#CLIENTSIDE // Everything following this is dealt on the clientside of things. shoot() is clientside.
function onWeaponfired() {..} // Everything inside this function is called when the weapon is fired.
shoot(stuff)... // Shoots a projectile that is visible as whatever gani is defined. As for the specs, straight from newfeatures, as no need to repeat them in different words:
x,y and z - specify the starting position
angle - shoot angle (when looking from the top): east is 0, north 3.14/2, west is 3.14, south 3.14*3/2)
zangle - the angle in vertical direction, 0 means the projectile is shoot horizontal, 3.14/2 means straight to the sun
power - the shoot power which is used to shoot the projectile; if it's 0 then the projectile is shoot like an old arrow (doesn't fall down, moves 20 tiles each second)
gani - the animation that is used for the projectile; the animation can be multidirectional, the engine automatically selects the best direction for the flying direction; the animation can have 1 step (not animated) or 7 steps, then the engine is automatically choosing the good animation step for the projectile flying angle - when its raising then step 1 is taken, when flying horizontal it is step 4, when it is short before the impact then the engine displays step 7

If anything confuses you, I'll try to answer. There's a lot more to it than this, but I figured you should start off with just getting a bullet going.

Last edited by DustyPorViva; 05-16-2007 at 04:05 AM..
Reply With Quote
  #39  
Old 05-16-2007, 04:00 AM
PrinceOfKenshin PrinceOfKenshin is offline
That guy with a beard
PrinceOfKenshin's Avatar
Join Date: May 2004
Location: Ontario, Canada
Posts: 819
PrinceOfKenshin has a spectacular aura aboutPrinceOfKenshin has a spectacular aura about
not that simple lol you would use keydown gani scripts. Is that it?
__________________


Quote:
Game Master (Server): Greetings PrinceOfKenshin, there are new posts on the forums that demand your urgent attention! God speed, the fate of the world is in your hands. If you fail, middle earth will forever be in the darkness and your children will be enslaved by McKain.
Reply With Quote
  #40  
Old 05-16-2007, 04:16 AM
killerogue killerogue is offline
Registered Omega
killerogue's Avatar
Join Date: Apr 2006
Location: United States
Posts: 1,920
killerogue is on a distinguished road
Send a message via AIM to killerogue Send a message via MSN to killerogue
Quote:
Originally Posted by Andy0687 View Post
Kind of like you when you started, eh?

Maybe you shouldnt be so quick to talk down to people when you "came up" the same way they are trying.



you ever get tired of doing that?
I never claimed I was good scripter. >_> Nor a scripter when I couldn't script anything. IF anything I was eager to learn, lazy to do anything.
__________________


REMEMBER, IF YOU REP ME, LEAVE A NAME!

Quote:
Originally Posted by haunter View Post
Graal admins don't die. They go to hell and regroup.
Quote:
Originally Posted by Inverness View Post
Without scripters, your graphics and levels wouldn't do anything but sit there and look pretty.
Reply With Quote
  #41  
Old 05-16-2007, 04:22 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
Quote:
Originally Posted by PrinceOfKenshin View Post
not that simple lol you would use keydown gani scripts. Is that it?
What do you mean?
Reply With Quote
  #42  
Old 05-16-2007, 04:40 AM
killerogue killerogue is offline
Registered Omega
killerogue's Avatar
Join Date: Apr 2006
Location: United States
Posts: 1,920
killerogue is on a distinguished road
Send a message via AIM to killerogue Send a message via MSN to killerogue
I think he means something along the lines of pressing a key and it playing a gani, i.e.:

PHP Code:
function onKeyPressedkeynrkeyname )
{
  if (
keyname == "s")
  {
    
setani("fireani""");
  }


E: My final suggestion, if you have a friend who's a good scripter...ask him to tutor you. It's easier to learn from someone rather than something ( I.E. the wiki ). The wiki's just there for informational purposes really, otherwises it's just..blegh.
__________________


REMEMBER, IF YOU REP ME, LEAVE A NAME!

Quote:
Originally Posted by haunter View Post
Graal admins don't die. They go to hell and regroup.
Quote:
Originally Posted by Inverness View Post
Without scripters, your graphics and levels wouldn't do anything but sit there and look pretty.
Reply With Quote
  #43  
Old 05-16-2007, 04:42 AM
Andy0687 Andy0687 is offline
Enigma
Join Date: Feb 2002
Posts: 1,072
Andy0687 is on a distinguished road
Quote:
Originally Posted by killerogue View Post
I never claimed I was good scripter. >_> Nor a scripter when I couldn't script anything. IF anything I was eager to learn, lazy to do anything.
I was hoping you would pay more attention to the talking down to people part, or does this not seem familer?

http://forums.graalonline.com/forums...ad.php?t=67451

All im saying is, when you yourself were having trouble, you looked for help and expected it/would hide behind the whole "im new" thing. When people would flame you for how bad you were, did you not get upset? So why would you in turn do that exact same thing to a new scripter? Give them a chance to learn, its not fluid for some people, and eventually they may realise its not for them.

Encourage not Discourage
__________________
Reply With Quote
  #44  
Old 05-16-2007, 04:55 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
Quote:
Originally Posted by killerogue View Post
I think he means something along the lines of pressing a key and it playing a gani, i.e.:
I don't think that was the context of his post. I assume it had something to do with what I posted, but I have no idea.
Reply With Quote
  #45  
Old 05-16-2007, 05:37 AM
Rapidwolve Rapidwolve is offline
Registered User
Join Date: Jul 2006
Posts: 1,241
Rapidwolve is an unknown quantity at this point
Quote:
Originally Posted by Andy0687 View Post
I was hoping you would pay more attention to the talking down to people part, or does this not seem familer?

http://forums.graalonline.com/forums...ad.php?t=67451

All im saying is, when you yourself were having trouble, you looked for help and expected it/would hide behind the whole "im new" thing. When people would flame you for how bad you were, did you not get upset? So why would you in turn do that exact same thing to a new scripter? Give them a chance to learn, its not fluid for some people, and eventually they may realise its not for them.

Encourage not Discourage
I've also noticed this attitude of his, I never said anything though. I kept it to myself.
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:34 PM.


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