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 03-25-2012, 06:48 AM
Ducati_Link Ducati_Link is offline
Banned
Ducati_Link's Avatar
Join Date: Oct 2001
Location: Perth, Australia
Posts: 415
Ducati_Link is on a distinguished road
Send a message via MSN to Ducati_Link
GS2 npcprogramming.doc?

Has anyone made that npcprgramming.doc into GS2? I tried looking but couldn't see anything. I know there is many wiki sites, and this site, and that site... but I'm seriously scripting challenged. I like the pretty pictures, and the basic story book like explanations.
Reply With Quote
  #2  
Old 03-25-2012, 07:15 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
You've looked at my guide, no?
__________________
Quote:
Reply With Quote
  #3  
Old 03-25-2012, 07:26 AM
Ducati_Link Ducati_Link is offline
Banned
Ducati_Link's Avatar
Join Date: Oct 2001
Location: Perth, Australia
Posts: 415
Ducati_Link is on a distinguished road
Send a message via MSN to Ducati_Link
I kinda did - but I got a bit lost o.O
I'm not to sure how we got from point 1 to point 2. I really wanna learn, the basics, but my scripting consists of dontblock; drawunderplayer; drawoverplayer; - all in GS1.

I dont even get where to start on GS2, and to convert the.. if created to what ever it is these days. I'm seriously seriously scripting retarded. (ask Twinny)
Reply With Quote
  #4  
Old 03-25-2012, 08:06 AM
Tricxta Tricxta is offline
The Muffin Man
Tricxta's Avatar
Join Date: Oct 2010
Location: Australia
Posts: 563
Tricxta is just really niceTricxta is just really nice
You have access to a npc server. Just make up a script of some random functions, find out what's the effect of them and read up on object oriented programming in general, it's worth the time if you don't know what a class is or a function.

Edit: I looked through this,http://en.wikipedia.org/wiki/Object-...ed_programming and it's not what you need.

Basically...

Just remember that classes are libraries of functions so you don't have to retype the same code and they can be joined to level npcs or weapons. I'd also recommend reading fowlplays guide, I thought it was really simple and showed all the basics of gs2 required to produce a script. Just read through it slowly and test the examples to see their effect.
Reply With Quote
  #5  
Old 03-25-2012, 08:30 AM
Ducati_Link Ducati_Link is offline
Banned
Ducati_Link's Avatar
Join Date: Oct 2001
Location: Perth, Australia
Posts: 415
Ducati_Link is on a distinguished road
Send a message via MSN to Ducati_Link
Okay, so if we are talking the upmost basics of GS1...

if (playertouchsme) {
lay greenrupee;
hide;
}

would it be..

function onCreated () { - I'm already stuck.. I have a feeling it's not onCreated - but I dont know what the others are? I can't see anything on these sites. *face plants into desk*


see, this npcprogramming puts it all down:

- playerenters set when the player currently enters the level
- playertouchsother set when another npc is touched by the player
- playerlaysitem set when an item is layed by the player or another npc
- compusdied set when the last baddy has died
- playerendsreading set when the player ends reading a sign
- timeout set when the npc's timeout runs out
Reply With Quote
  #6  
Old 03-25-2012, 08:32 AM
MattKan MattKan is offline
the KattMan
Join Date: Aug 2010
Location: United States
Posts: 1,325
MattKan is a splendid one to beholdMattKan is a splendid one to beholdMattKan is a splendid one to beholdMattKan is a splendid one to beholdMattKan is a splendid one to behold
Send a message via AIM to MattKan
Quote:
Originally Posted by fowlplay4 View Post
You've looked at my guide, no?
Finish it. (please)
Reply With Quote
  #7  
Old 03-25-2012, 08:35 AM
Ducati_Link Ducati_Link is offline
Banned
Ducati_Link's Avatar
Join Date: Oct 2001
Location: Perth, Australia
Posts: 415
Ducati_Link is on a distinguished road
Send a message via MSN to Ducati_Link
well I figured the most basics would be where you start, which would be at the start. further I went down, the more I got lost. But I shall continue on..

edit:
function onPlayerTouchsMe() { - okay, got that bit. Rest, I still don't know.

Last edited by Ducati_Link; 03-25-2012 at 08:49 AM..
Reply With Quote
  #8  
Old 03-25-2012, 12:34 PM
callimuc callimuc is offline
callimuc's Avatar
Join Date: Nov 2010
Location: Germany
Posts: 1,015
callimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to behold
Well there is a document just like the commands.rtf for GS2. It does not have all commands and so on in it, but for the basics it should be fine.

http://forums.graalonline.com/forums...ad.php?t=69323
__________________
MEEP!
Reply With Quote
  #9  
Old 03-25-2012, 01:20 PM
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 Ducati_Link View Post
function onCreated () { - I'm already stuck.. I have a feeling it's not onCreated - but I dont know what the others are? I can't see anything on these sites. *face plants into desk*
Actually you are right. http://gscript.graal.net/CategoryFunctionEvent for a few examples.
__________________
Skyld
Reply With Quote
  #10  
Old 03-25-2012, 01:42 PM
Ducati_Link Ducati_Link is offline
Banned
Ducati_Link's Avatar
Join Date: Oct 2001
Location: Perth, Australia
Posts: 415
Ducati_Link is on a distinguished road
Send a message via MSN to Ducati_Link
Okay, excellent - thanks guys. I will continue to venture forth.
Reply With Quote
  #11  
Old 03-25-2012, 04:21 PM
BlueMelon BlueMelon is offline
asdfg
BlueMelon's Avatar
Join Date: Sep 2008
Posts: 1,481
BlueMelon is a splendid one to beholdBlueMelon is a splendid one to beholdBlueMelon is a splendid one to beholdBlueMelon is a splendid one to behold
Personally I think it would be hard to learn GS2 without any prior programming experience. Learning another language (with more documentation) would really help. It helped me greatly.
__________________
http://i.imgur.com/OOJbW.jpg
Reply With Quote
  #12  
Old 03-25-2012, 09:06 PM
Devil_Lord2 Devil_Lord2 is offline
David K?
Devil_Lord2's Avatar
Join Date: Apr 2011
Location: PA, MD.
Posts: 643
Devil_Lord2 can only hope to improve
Quote:
Originally Posted by fowlplay4 View Post
You've looked at my guide, no?
Quote:
Originally Posted by MattKan View Post
Finish it. (please)
Make it more user friendly, sometimes it helps, many times it does not.
Sometimes it is just confusing, like the math problem that says it should work but would never work..

And anything that uses foobar crap that has nothing to do with programming or variables most likely, like myself, confuse the heck out of newcomers.



=====
I personally would love to see npcprogramming2.doc and wanted to do it my self when I had time. (probably wouldn't be as efficient as someone else doing it)

For those that don't have it, it is listed below. ZeroG sent me it a while ago.


npcprogramming.doc = GS1
commands.txt = GS1
commands2.txt = GS2

I added one line into commands 2, findimg().
I'd like to add more but I don't know them and they are floating around randomly.

The owner quit this, but I tried to give user-friendly information here...
It definitely needs more added and I'd like to redo it with images, possibly videos.
http://scriptingschool.forumotion.com/
Attached Files
File Type: doc npcprogramming.doc (323.0 KB, 277 views)
File Type: txt commands.txt (40.4 KB, 242 views)
File Type: txt commands2.txt (58.1 KB, 229 views)
__________________

Digital Media Artist - David K? </3 (UnLoved)
www.davidkrout.com
www.twitch.com/DavidKkz



Reply With Quote
  #13  
Old 03-26-2012, 06:06 AM
Ducati_Link Ducati_Link is offline
Banned
Ducati_Link's Avatar
Join Date: Oct 2001
Location: Perth, Australia
Posts: 415
Ducati_Link is on a distinguished road
Send a message via MSN to Ducati_Link
Thanks DL
Reply With Quote
  #14  
Old 03-26-2012, 10:00 AM
Tricxta Tricxta is offline
The Muffin Man
Tricxta's Avatar
Join Date: Oct 2010
Location: Australia
Posts: 563
Tricxta is just really niceTricxta is just really nice
Converting gs1 to a gs2 like structure is relatively easy
if (playertouchsme) {
lay greenrupee;
hide;
}

function onPlayertouchsme(){
lay("greenrupee");
hide();
}

Strings require quotes instead of the yucky #s(some string) buisness, and every function requires brackets even if there are no arguments as you saw in the example given.
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 03:50 AM.


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