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 12-04-2009, 02:06 PM
Dnegel Dnegel is offline
Rjax Shizibz
Join Date: Jul 2009
Posts: 1,334
Dnegel will become famous soon enough
Exclamation Help: Making a weapon

The best way to learn to script is to ask the ones that knows it, that's what i've learned so here we go, im gonna be using Testbed as server.

I have made a GFX of a Weapon, and I have also made a GANI for Reload, Idling, Walking / Running and Firing.

So, what's left is the script.

And here is it when your help comes in; Do you maybe know a perfect thread for this, tutorial or maybe you can just explain it easily in a post?

It's your choice, and if your here to be an idiot then you can just press the X button in the north-east corner of your Web Browser.

I want this to be a serious thread, im here to learn, not to waste time.

Thanks.
~ Rjax S.
Reply With Quote
  #2  
Old 12-04-2009, 02:29 PM
Samposse Samposse is offline
Chopa Shopa !
Samposse's Avatar
Join Date: Nov 2008
Location: Norway
Posts: 87
Samposse is an unknown quantity at this point
Send a message via AIM to Samposse Send a message via MSN to Samposse
if ur Learning ur self to script so shoud u maybe give it an try of making the script by your self
you will alot of help on the forums for that
__________________
Delitto :3

A
SERVER
UNDER
CONSTRUCTION !

feel free to ask me about delitto
Reply With Quote
  #3  
Old 12-04-2009, 02:37 PM
firefighter firefighter is offline
Registered User
Join Date: Jan 2009
Location: Germany
Posts: 70
firefighter is on a distinguished road
Each server has its own weapon system

GScript Guide
Reply With Quote
  #4  
Old 12-04-2009, 06:17 PM
Dnegel Dnegel is offline
Rjax Shizibz
Join Date: Jul 2009
Posts: 1,334
Dnegel will become famous soon enough
Quote:
Originally Posted by Samposse View Post
if ur Learning ur self to script so shoud u maybe give it an try of making the script by your self
you will alot of help on the forums for that
I know that I need to find it out by myself, but I was mostly wanting like, a good start. And that's why I made this thread, it would maybe help others to that need help with such scripts?

Quote:
Originally Posted by firefighter View Post
Each server has its own weapon system

GScript Guide
Thanks for the site, though I know about it already, and I have read it. But of course, im not gonna stop reading, I will go read now anyways so yeh.

And thanks for the replies.

Note: But it's right that I need to make a Weapon System in Classes right?
Reply With Quote
  #5  
Old 12-04-2009, 10:09 PM
Kyranki Kyranki is offline
Freelance Coder
Join Date: Aug 2007
Location: At the end of the rainbow, in the pot of gold.
Posts: 202
Kyranki is on a distinguished road
Send a message via AIM to Kyranki Send a message via MSN to Kyranki
Umm, well usually you would start off by making a Weapon System in...weapons. But maybe you know you should start on a lot of smaller things to cover all the basics and make sure you understand some of the most simple yet confusing things.
__________________
Stan.
Reply With Quote
  #6  
Old 12-04-2009, 10:18 PM
Dnegel Dnegel is offline
Rjax Shizibz
Join Date: Jul 2009
Posts: 1,334
Dnegel will become famous soon enough
Quote:
Originally Posted by Kyranki View Post
Umm, well usually you would start off by making a Weapon System in...weapons. But maybe you know you should start on a lot of smaller things to cover all the basics and make sure you understand some of the most simple yet confusing things.
I understand a little, but I still need a little push to get started.
Reply With Quote
  #7  
Old 12-04-2009, 10:47 PM
Kyranki Kyranki is offline
Freelance Coder
Join Date: Aug 2007
Location: At the end of the rainbow, in the pot of gold.
Posts: 202
Kyranki is on a distinguished road
Send a message via AIM to Kyranki Send a message via MSN to Kyranki
Quote:
Originally Posted by Dnegel View Post
I understand a little, but I still need a little push to get started.
Honestly, if you don't have any prior coding experience...and that was an assumption which could possibly be wrong, it's going to hard to try and teach yourself. Like it was for me. If you can find a good teacher to try and show you the path and things then you will learn Gscript relatively easily. Gah...where's Hell Raven when you need him.
__________________
Stan.
Reply With Quote
  #8  
Old 12-04-2009, 11:49 PM
Dnegel Dnegel is offline
Rjax Shizibz
Join Date: Jul 2009
Posts: 1,334
Dnegel will become famous soon enough
Mhmmm yes, I can of course try to do it all alone.

But that will take alot of time, and I dont wanna use that much time. I mostly just wanna learn some basics in scripting.
Reply With Quote
  #9  
Old 12-05-2009, 09:25 AM
Sage_Shadowbane Sage_Shadowbane is offline
Graal Developer
Sage_Shadowbane's Avatar
Join Date: Mar 2004
Posts: 585
Sage_Shadowbane will become famous soon enough
Quote:
Originally Posted by Dnegel View Post
Mhmmm yes, I can of course try to do it all alone.

But that will take alot of time, and I dont wanna use that much time. I mostly just wanna learn some basics in scripting.
Best way to learn, is to practice on your own. You're really not going to learn how to script by depending on other people on the forums to "guide" you in the right direction.
Reply With Quote
  #10  
Old 12-05-2009, 04:48 PM
Dnegel Dnegel is offline
Rjax Shizibz
Join Date: Jul 2009
Posts: 1,334
Dnegel will become famous soon enough
Quote:
Originally Posted by Sage_Shadowbane View Post
Best way to learn, is to practice on your own. You're really not going to learn how to script by depending on other people on the forums to "guide" you in the right direction.
I knwo your right, and I would try to practice.

First I need to make a way to show the weapon when I click a button, D for example.
Reply With Quote
  #11  
Old 12-05-2009, 05:13 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
Experiment, experiment and experiment! When you find out about a function you didn't know about, work with it. Pinch and pull every part of GScript until you know what it can do and what it can't do.

If you need someone to help you when you get stuck, send a message my way on MSN, AIM or on here.

Looking at other people's scripts also help quite a lot.

I also agree that you're jumping in at the deep end here. Take small projects, and build on them. Then choose a slightly bigger project, so on and so forth.
Reply With Quote
  #12  
Old 12-05-2009, 06:14 PM
Dnegel Dnegel is offline
Rjax Shizibz
Join Date: Jul 2009
Posts: 1,334
Dnegel will become famous soon enough
Quote:
Originally Posted by Codein View Post
Experiment, experiment and experiment! When you find out about a function you didn't know about, work with it. Pinch and pull every part of GScript until you know what it can do and what it can't do.

If you need someone to help you when you get stuck, send a message my way on MSN, AIM or on here.

Looking at other people's scripts also help quite a lot.

I also agree that you're jumping in at the deep end here. Take small projects, and build on them. Then choose a slightly bigger project, so on and so forth.
Thanks, I will try to do so then.
Reply With Quote
  #13  
Old 12-05-2009, 10:44 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
PHP Code:
//#CLIENTSIDE 
Go.
__________________
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
  #14  
Old 12-05-2009, 11:19 PM
Dnegel Dnegel is offline
Rjax Shizibz
Join Date: Jul 2009
Posts: 1,334
Dnegel will become famous soon enough
Lol, I know that one.

I guess it will start with
PHP Code:
//#CLIENTSIDE
 
functionTest(); 
Reply With Quote
  #15  
Old 12-06-2009, 02:06 AM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
Quote:
Originally Posted by Dnegel View Post
Lol, I know that one.

I guess it will start with
PHP Code:
//#CLIENTSIDE
 
functionTest(); 
If you do not have your function call inside a function block then it will result in unusual behaviour (being called every time an event occurs perhaps, which would get very messy and use a lot of CPU time). Instead you should call your function from specific events (i.e. onCreated being called when the NPC is updated or the script is first loaded):
PHP Code:
//#CLIENTSIDE

function onCreated()
{
  
functionTest();

__________________
Skyld
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 12:40 AM.


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