![]() |
Stupid newbie question
How do I move an NPC half a tile?
|
x+.5;
x-.5; |
Quote:
|
o
+moves it to the right
- moves to the left .5 is half of 1 get it????? |
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. |
if (created) {
x-=.5; x+=.5; y-=.5; y+=.5; } |
Quote:
|
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) |
Quote:
lol :) |
Quote:
Anyway, thanks all. |
if you just read throught the scripting document that comes with graal, it will get you started
|
Quote:
|
Quote:
|
Quote:
|
yes
|
Quote:
|
Quote:
|
Quote:
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? |
if (playerchats&&strequals(#c,Word)){destroy;}
|
I don't believe so, but maybe
|
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:
just NPC Code: |
Quote:
|
like feeding wild bears :)
|
Quote:
Anyway, I'm done. *INSERT 100 RUDE PICTURES AIMED AT KAIMETSU HERE* |
Quote:
|
I want to learn how to script..
|
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:( |
If you are wonderhing what a command does...
TRY IT AND SEE WHAT HAPPENS! |
Quote:
|
Quote:
|
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...
|
Quote:
|
Quote:
|
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.