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 07-28-2002, 06:41 AM
bobp bobp is offline
Registered User
Join Date: May 2002
Location: North Charleston,SC
Posts: 8
bobp is on a distinguished road
Send a message via AIM to bobp
NPC Scripting

I wanna learn how to script but I have no idea where to start. Could someone please tell me or help me out?
__________________
bOb Drakken
Reply With Quote
  #2  
Old 07-28-2002, 06:50 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
read the commands.rtf to learn the basic syntax's
Reply With Quote
  #3  
Old 07-28-2002, 08:21 AM
Chaos0838 Chaos0838 is offline
Revendicare
Chaos0838's Avatar
Join Date: Dec 2001
Location: Philadelphia
Posts: 905
Chaos0838 is on a distinguished road
Send a message via AIM to Chaos0838 Send a message via Yahoo to Chaos0838
[Vlad]

Well start with if (playertouchesme) and (playerenters) flags and experiment with commands to see what they do.
__________________
Reply With Quote
  #4  
Old 07-28-2002, 08:47 AM
Torankusu Torankusu is offline
Elite Member
Torankusu's Avatar
Join Date: Jun 2001
Posts: 10,058
Torankusu has a spectacular aura aboutTorankusu has a spectacular aura about
Quote:
Originally posted by Chaos0838
[Vlad]

Well start with if (playertouchesme) and (playerenters) flags and experiment with commands to see what they do.
it's playertouchsme.
__________________
Quote:
Originally posted by Spark910
Think befreo you type.
Reply With Quote
  #5  
Old 07-28-2002, 12:59 PM
magicbud3344 magicbud3344 is offline
Banned
Join Date: Mar 2002
Location: mEEP
Posts: 0
magicbud3344 is on a distinguished road
Send a message via AIM to magicbud3344
i know like the basics if someone helps me a bit, like i can move stuff/slide and i can make it so you can sit on things XD none of that is hard but it is what i can do XD XD and i can make light2.png work 4 me XD
Reply With Quote
  #6  
Old 07-29-2002, 10:07 AM
Poogle Poogle is offline
Registered User
Poogle's Avatar
Join Date: Jun 2001
Posts: 2,471
Poogle is on a distinguished road
Quote:
Originally posted by Torankusu
it's playertouchsme.
playertouchesme worked for me on my lapytop this morning.
Reply With Quote
  #7  
Old 07-29-2002, 10:19 AM
Torankusu Torankusu is offline
Elite Member
Torankusu's Avatar
Join Date: Jun 2001
Posts: 10,058
Torankusu has a spectacular aura aboutTorankusu has a spectacular aura about
Quote:
Originally posted by Poogle
playertouchesme worked for me on my lapytop this morning.
Obviously you didn't try touching it.

Try this script.
NPC Code:

// NPC made by Stefan Knorr
if (created) {
setimg door.png;
setshape 1,32,32;
}
if (playertouchesme) {
hide;
sleep 3;
show;
}


And play in the level, and touch it.
Nothing happens.
__________________
Quote:
Originally posted by Spark910
Think befreo you type.
Reply With Quote
  #8  
Old 07-29-2002, 12:14 PM
adam adam is offline
http://wiki.graal.us/
adam's Avatar
Join Date: Nov 2001
Posts: 2,247
adam has a spectacular aura about
Send a message via AIM to adam
find and read the Newbie Scripters Bible.
__________________
Rogue Shadow (TCN)(NAT)(Global Development Team)

For development help, contact the patrons of the #graaldt irc channel below, I am usually there.
Click Here to Join IRC Chat Now! -- irc.freenode.net Channel: #graaldt
Quote:
<Dustyshouri> no, RogueShadow is always talking about scripts lol
<Dustyshouri> in fact, he pretty much brought Graal back as a topic single-handedly
Reply With Quote
  #9  
Old 07-29-2002, 08:23 PM
screen_name screen_name is offline
is watching you
Join Date: Mar 2002
Location: The 3rd Dimension
Posts: 2,160
screen_name is on a distinguished road
Send a message via AIM to screen_name Send a message via MSN to screen_name
how i started was the npcprogramming.doc that comes with graal, although outdated, it is a good beginner's guide
__________________
[signature]insert here[/signature]
Reply With Quote
  #10  
Old 08-02-2002, 12:54 PM
stomper_TK stomper_TK is offline
Registered User
stomper_TK's Avatar
Join Date: Feb 2002
Location: My chair :-)
Posts: 846
stomper_TK is on a distinguished road
Send a message via AIM to stomper_TK
NPC Code:
// NPC made by Stefan Knorr
if (created) {
setimg door.png;
setshape 1,32,32;
}
if (playertouchesme) {
hide;
sleep 3;
show;
}



Why did you put in "setshape 1,32,32" is that for serverside or sothing? Teach me..
__________________
Reply With Quote
  #11  
Old 08-02-2002, 01:08 PM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
because the npc server keeps no record of the shapes (blocking, etc) of NPCs
Reply With Quote
  #12  
Old 08-02-2002, 01:14 PM
stomper_TK stomper_TK is offline
Registered User
stomper_TK's Avatar
Join Date: Feb 2002
Location: My chair :-)
Posts: 846
stomper_TK is on a distinguished road
Send a message via AIM to stomper_TK
Quote:
Originally posted by Python523
because the npc server keeps no record of the shapes (blocking, etc) of NPCs
How can one find out the shape of the object?
__________________
Reply With Quote
  #13  
Old 08-02-2002, 05:32 PM
stomper_TK stomper_TK is offline
Registered User
stomper_TK's Avatar
Join Date: Feb 2002
Location: My chair :-)
Posts: 846
stomper_TK is on a distinguished road
Send a message via AIM to stomper_TK
Lets say I want to make a NPC that sells cans, but there is a limited supply of 30. Would I out this in the GScript?

NPC Code:
while (flag&&count<30)

__________________
Reply With Quote
  #14  
Old 08-02-2002, 07:16 PM
adam adam is offline
http://wiki.graal.us/
adam's Avatar
Join Date: Nov 2001
Posts: 2,247
adam has a spectacular aura about
Send a message via AIM to adam
Quote:
Originally posted by stomper_TK
Lets say I want to make a NPC that sells cans, but there is a limited supply of 30. Would I out this in the GScript?

NPC Code:
while (flag&&count<30)




Suggestions: server.string or save[0]-save[9]


I think both would work.
__________________
Rogue Shadow (TCN)(NAT)(Global Development Team)

For development help, contact the patrons of the #graaldt irc channel below, I am usually there.
Click Here to Join IRC Chat Now! -- irc.freenode.net Channel: #graaldt
Quote:
<Dustyshouri> no, RogueShadow is always talking about scripts lol
<Dustyshouri> in fact, he pretty much brought Graal back as a topic single-handedly
Reply With Quote
  #15  
Old 08-02-2002, 08:02 PM
stomper_TK stomper_TK is offline
Registered User
stomper_TK's Avatar
Join Date: Feb 2002
Location: My chair :-)
Posts: 846
stomper_TK is on a distinguished road
Send a message via AIM to stomper_TK
Lets say I go aquire a flag to open a door that needs a certin flag named "sam" to enter the door. Would this script work for the door?

NPC Code:
if (playertouchsme&&sam){hidelocal;sleep3;show
}

__________________
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 01:00 AM.


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