Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Stupid newbie question (https://forums.graalonline.com/forums/showthread.php?t=34040)

brock128 07-23-2002 02:52 AM

Stupid newbie question
 
How do I move an NPC half a tile?

screen_name 07-23-2002 03:15 AM

x+.5;
x-.5;

brock128 07-23-2002 05:00 AM

Quote:

Originally posted by screen_name
x+.5;
x-.5;

Remember, I'm a stupid newbie, so that would mean... what?

Legondary_MyTH 07-23-2002 05:51 AM

o
 
+moves it to the right
- moves to the left
.5 is half of 1 get it?????

AlexH 07-23-2002 05:55 AM

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.

user13-xo 07-23-2002 06:10 AM

if (created) {
x-=.5;
x+=.5;
y-=.5;
y+=.5;
}

Torankusu 07-23-2002 12:43 PM

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!

MaverickZero 07-23-2002 12:49 PM

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)

screen_name 07-23-2002 01:31 PM

Quote:

Originally posted by Torankusu
that's a great script if you want to put it right back in its original position!

lol :)

brock128 07-24-2002 01:16 AM

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.

screen_name 07-24-2002 01:35 AM

if you just read throught the scripting document that comes with graal, it will get you started

Python523 07-24-2002 01:55 AM

Quote:

Originally posted by Kaimetsu
¬_¬

I can't believe how low this forum has sunk.

:( sad but true

brock128 07-24-2002 02:33 AM

Quote:

Originally posted by screen_name
if you just read throught the scripting document that comes with graal, it will get you started
Thanks.

darkriders_p2p 07-24-2002 02:55 AM

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?

screen_name 07-24-2002 03:15 AM

yes

Falcor 07-24-2002 03:27 AM

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.

Dean 07-24-2002 03:38 AM

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!

brock128 07-24-2002 03:43 AM

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?

Dean 07-24-2002 03:49 AM

if (playerchats&&strequals(#c,Word)){destroy;}

Dean 07-24-2002 03:56 AM

I don't believe so, but maybe

Torankusu 07-24-2002 04:18 AM

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.

screen_name 07-24-2002 10:54 AM

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;
}


Python523 07-24-2002 10:56 AM

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 ;)

screen_name 07-24-2002 08:43 PM

like feeding wild bears :)

brock128 07-24-2002 09:10 PM

Quote:

Originally posted by Kaimetsu
:mad:

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*

screen_name 07-24-2002 09:24 PM

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 :)!!!!!

stomper_TK 08-01-2002 07:23 PM

I want to learn how to script..

nyghtGT 08-01-2002 07:44 PM

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:(

adam 08-01-2002 08:18 PM

If you are wonderhing what a command does...

TRY IT AND SEE WHAT HAPPENS!

adam 08-01-2002 08:22 PM

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.

adam 08-02-2002 03:35 AM

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. ;-)

brock128 08-02-2002 08:44 AM

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...

brock128 08-04-2002 07:42 AM

Quote:

Originally posted by Kaimetsu


Hah. Then you're trying the wrong way.

Just drop it, kay? Let the post die.

brock128 08-05-2002 12:53 AM

Quote:

Originally posted by brock128

Just drop it, kay? Let the post die.



All times are GMT +2. The time now is 04:23 AM.

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