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 07-23-2002, 02:52 AM
brock128 brock128 is offline
oldbie
Join Date: Dec 2001
Posts: 2,861
brock128 is on a distinguished road
Stupid newbie question

How do I move an NPC half a tile?
Reply With Quote
  #2  
Old 07-23-2002, 03:15 AM
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
x+.5;
x-.5;
__________________
[signature]insert here[/signature]
Reply With Quote
  #3  
Old 07-23-2002, 05:00 AM
brock128 brock128 is offline
oldbie
Join Date: Dec 2001
Posts: 2,861
brock128 is on a distinguished road
Quote:
Originally posted by screen_name
x+.5;
x-.5;
Remember, I'm a stupid newbie, so that would mean... what?
Reply With Quote
  #4  
Old 07-23-2002, 05:51 AM
Legondary_MyTH Legondary_MyTH is offline
Registered User
Join Date: May 2002
Location: Levelville
Posts: 420
Legondary_MyTH is on a distinguished road
o

+moves it to the right
- moves to the left
.5 is half of 1 get it?????
__________________
ArchMage Amedeus Valoryn of Zormite
Manager of Anarchy
Past Jobs:
Levels Admin on Renegade
LAT on Doomsday,Babylon,G3K
Developer on Faheria,Babylon
GP on Sanstrata,G3K
Reply With Quote
  #5  
Old 07-23-2002, 05:55 AM
AlexH AlexH is offline
Have A Drink On Me
AlexH's Avatar
Join Date: Jun 2001
Location: Somewhere In Time
Posts: 7,442
AlexH is on a distinguished road
Send a message via AIM to AlexH Send a message via MSN to AlexH
if (playerenters) {
x=x+.5;
y=y+.5;
}

Can use - too.
Basically it moves the image half a tile depending on what you put there.
__________________
QUICK LOOK BUSY JESUS IS COMING!
Reply With Quote
  #6  
Old 07-23-2002, 06:10 AM
user13-xo user13-xo is offline
Registered User
Join Date: Nov 2001
Location: California
Posts: 297
user13-xo is on a distinguished road
Send a message via AIM to user13-xo
if (created) {
x-=.5;
x+=.5;
y-=.5;
y+=.5;
}
Reply With Quote
  #7  
Old 07-23-2002, 12:43 PM
Torankusu Torankusu is offline
Elite Member
Torankusu's Avatar
Join Date: Jun 2001
Posts: 10,065
Torankusu is a jewel in the roughTorankusu is a jewel in the rough
Quote:
Originally posted by user13-xo
if (created) {
x-=.5;
x+=.5;
y-=.5;
y+=.5;
}
that's a great script if you want to put it right back in its original position!
__________________
Quote:
Originally posted by Spark910
Think befreo you type.
Reply With Quote
  #8  
Old 07-23-2002, 12:49 PM
MaverickZero MaverickZero is offline
Registered User
Join Date: Jun 2002
Location: New York
Posts: 56
MaverickZero is on a distinguished road
Send a message via AIM to MaverickZero Send a message via Yahoo to MaverickZero
or (im making this up)
if (created) { x=30.5; y=29.5
}

that would move it to the x/y spefified
(i cant spel)
__________________
Maverick Zero

----------------------------
AIM: MaverickZeroUnit
Reply With Quote
  #9  
Old 07-23-2002, 01:31 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
Quote:
Originally posted by Torankusu
that's a great script if you want to put it right back in its original position!

lol
__________________
[signature]insert here[/signature]
Reply With Quote
  #10  
Old 07-24-2002, 01:16 AM
brock128 brock128 is offline
oldbie
Join Date: Dec 2001
Posts: 2,861
brock128 is on a distinguished road
Quote:
Originally posted by Kaimetsu
¬_¬

I can't believe how low this forum has sunk.
Oh I'm sorry I'm not a l33t scripter like you please give me your master advice Mister Kaimetsu.

Anyway, thanks all.
Reply With Quote
  #11  
Old 07-24-2002, 01:35 AM
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
if you just read throught the scripting document that comes with graal, it will get you started
__________________
[signature]insert here[/signature]
Reply With Quote
  #12  
Old 07-24-2002, 01:55 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
Quote:
Originally posted by Kaimetsu
¬_¬

I can't believe how low this forum has sunk.
sad but true
Reply With Quote
  #13  
Old 07-24-2002, 02:33 AM
brock128 brock128 is offline
oldbie
Join Date: Dec 2001
Posts: 2,861
brock128 is on a distinguished road
Quote:
Originally posted by screen_name
if you just read throught the scripting document that comes with graal, it will get you started
Thanks.
Reply With Quote
  #14  
Old 07-24-2002, 02:55 AM
darkriders_p2p darkriders_p2p is offline
Registered User
Join Date: Jan 2002
Location: Canada
Posts: 690
darkriders_p2p is on a distinguished road
Quote:
Originally posted by AlexH
if (playerenters) {
x=x+.5;
y=y+.5;
}

Can use - too.
Basically it moves the image half a tile depending on what you put there.
on a free server wouldn't that move the npc over .5 every time you entered the room?
__________________
maximus_asinus
Reply With Quote
  #15  
Old 07-24-2002, 03:15 AM
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
yes
__________________
[signature]insert here[/signature]
Reply With Quote
  #16  
Old 07-24-2002, 03:27 AM
Falcor Falcor is offline
Darth Cucumber
Falcor's Avatar
Join Date: Mar 2001
Location: At School
Posts: 2,874
Falcor is on a distinguished road
Send a message via ICQ to Falcor Send a message via AIM to Falcor Send a message via MSN to Falcor Send a message via Yahoo to Falcor
Quote:
Originally posted by brock128

Oh I'm sorry I'm not a l33t scripter like you please give me your master advice Mister Kaimetsu.

You don't have to be l33t to move an npc a half a tile.
__________________

subliminal message: 1+1=3
Reply With Quote
  #17  
Old 07-24-2002, 03:38 AM
Dean Dean is offline
Banned
Join Date: Sep 2001
Location: United Kingdom
Posts: 351
Dean will become famous soon enough
Quote:
Originally posted by Falcor


You don't have to be l33t to move an npc a half a tile.
You don't? Why didn't any of you tell me!
Reply With Quote
  #18  
Old 07-24-2002, 03:43 AM
brock128 brock128 is offline
oldbie
Join Date: Dec 2001
Posts: 2,861
brock128 is on a distinguished road
Quote:
Originally posted by Kaimetsu


Okay:

You're not intelligent enough to script to any degree of competence. Give up now.
*Insert rude picture here*

Anyway, another stupid question from a stupid person. I want to make it so that when sombody says somthing, the NPC gets destroyed. What should I do?
Reply With Quote
  #19  
Old 07-24-2002, 03:49 AM
Dean Dean is offline
Banned
Join Date: Sep 2001
Location: United Kingdom
Posts: 351
Dean will become famous soon enough
if (playerchats&&strequals(#c,Word)){destroy;}
Reply With Quote
  #20  
Old 07-24-2002, 03:56 AM
Dean Dean is offline
Banned
Join Date: Sep 2001
Location: United Kingdom
Posts: 351
Dean will become famous soon enough
I don't believe so, but maybe
Reply With Quote
  #21  
Old 07-24-2002, 04:18 AM
Torankusu Torankusu is offline
Elite Member
Torankusu's Avatar
Join Date: Jun 2001
Posts: 10,065
Torankusu is a jewel in the roughTorankusu is a jewel in the rough
you don't need quotes.

and, to prevent it from moving over .5 every time someone enters the room, you could just set the x/y to a coordinate.

if (playerenters){
x = 32.5;
y = 32.5;
}
etc.
__________________
Quote:
Originally posted by Spark910
Think befreo you type.
Reply With Quote
  #22  
Old 07-24-2002, 10:54 AM
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
Quote:
Originally posted by brock128

Thanks, but what if it is many words? Use quotes?
no, you dont use quotes

just

NPC Code:

if (playerchats && strequals(#c,bla bla bla bla bla bla times 3)) {
destroy;
}

__________________
[signature]insert here[/signature]
Reply With Quote
  #23  
Old 07-24-2002, 10:56 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
Quote:
Originally posted by Torankusu
you don't need quotes.

and, to prevent it from moving over .5 every time someone enters the room, you could just set the x/y to a coordinate.

if (playerenters){
x = 32.5;
y = 32.5;
}
etc.
too bad that messes up on a terrain (I think) since it's all like one big level, it'll send up in the upper left level, but I don't think most people have to worry about that
Reply With Quote
  #24  
Old 07-24-2002, 08:43 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
like feeding wild bears
__________________
[signature]insert here[/signature]
Reply With Quote
  #25  
Old 07-24-2002, 09:10 PM
brock128 brock128 is offline
oldbie
Join Date: Dec 2001
Posts: 2,861
brock128 is on a distinguished road
Quote:
Originally posted by Kaimetsu


People, people! Giving out scripts only keeps them coming back!
Respect points = -100. I can figure it out. I just need a poke in the right direction sometimes.

Anyway, I'm done. *INSERT 100 RUDE PICTURES AIMED AT KAIMETSU HERE*
Reply With Quote
  #26  
Old 07-24-2002, 09:24 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
Quote:
Originally posted by brock128

Respect points = -100. I can figure it out. I just need a poke in the right direction sometimes.

Anyway, I'm done. *INSERT 100 RUDE PICTURES AIMED AT KAIMETSU HERE*
fight the kai !!!!!
__________________
[signature]insert here[/signature]
Reply With Quote
  #27  
Old 08-01-2002, 07:23 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
I want to learn how to script..
__________________
Reply With Quote
  #28  
Old 08-01-2002, 07:44 PM
nyghtGT nyghtGT is offline
Banned
nyghtGT's Avatar
Join Date: Jun 2001
Posts: 3,993
nyghtGT is on a distinguished road
Send a message via AIM to nyghtGT
To some degree Kaimetsu is right and to another that brock guy is. Some people are just better at learning from examples instead of being told to use: strequals playerchats #c destroy.

I think it's because some people don't bother to learn the basic syntax of GScript. Anyway, you saw above how it works, and you should jump for joy.

One thing though argueing with Kaimetsu is pointless, he just use his college mumbo jumbo talk and make you wet yourself
Reply With Quote
  #29  
Old 08-01-2002, 08:18 PM
adam adam is offline
http://wiki.graal.us/
adam's Avatar
Join Date: Nov 2001
Posts: 2,247
adam has a spectacular aura aboutadam has a spectacular aura about
Send a message via AIM to adam
If you are wonderhing what a command does...

TRY IT AND SEE WHAT HAPPENS!
__________________
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
  #30  
Old 08-01-2002, 08:22 PM
adam adam is offline
http://wiki.graal.us/
adam's Avatar
Join Date: Nov 2001
Posts: 2,247
adam has a spectacular aura aboutadam has a spectacular aura about
Send a message via AIM to adam
Quote:
Originally posted by nyghtGT
To some degree Kaimetsu is right and to another that brock guy is. Some people are just better at learning from examples instead of being told to use: strequals playerchats #c destroy.

I think it's because some people don't bother to learn the basic syntax of GScript. Anyway, you saw above how it works, and you should jump for joy.

One thing though argueing with Kaimetsu is pointless, he just use his college mumbo jumbo talk and make you wet yourself
Lol yes argueing with Kaimetsu is pointless. But I doubt it has that much to do with college mumbo jumbo.
__________________
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
  #31  
Old 08-02-2002, 03:35 AM
adam adam is offline
http://wiki.graal.us/
adam's Avatar
Join Date: Nov 2001
Posts: 2,247
adam has a spectacular aura aboutadam has a spectacular aura about
Send a message via AIM to adam
Quote:
Originally posted by Kaimetsu
Grim Squeaker:

Arguing with Kaimetsu isn't pointless, it's the best way of spending time in the world.
On second thought it can be a lot of fun. ;-)
__________________
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
  #32  
Old 08-02-2002, 08:44 AM
brock128 brock128 is offline
oldbie
Join Date: Dec 2001
Posts: 2,861
brock128 is on a distinguished road
I realize that I must look like an idiot asking for help. But that's what this fourm is about. Kai doesn't have to be such a goober about it. Anyway, I am trying to learn how to script, but I really... eh... yea...
Reply With Quote
  #33  
Old 08-04-2002, 07:42 AM
brock128 brock128 is offline
oldbie
Join Date: Dec 2001
Posts: 2,861
brock128 is on a distinguished road
Quote:
Originally posted by Kaimetsu


Hah. Then you're trying the wrong way.
Just drop it, kay? Let the post die.
Reply With Quote
  #34  
Old 08-05-2002, 12:53 AM
brock128 brock128 is offline
oldbie
Join Date: Dec 2001
Posts: 2,861
brock128 is on a distinguished road
Quote:
Originally posted by brock128

Just drop it, kay? Let the post die.
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 10:02 AM.


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