Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   If you cant see it it cant be there... (https://forums.graalonline.com/forums/showthread.php?t=73543)

theHAWKER 04-18-2007 04:42 AM

If you cant see it it cant be there...
 
If you cant see it it cant be there, at least thats what it looks like...

I'm trying to make a hole in the ground, BUT your not sapost to go down from the top, so to stop people from going down there i put an invisable block, but it wont work.
this is my script for the block:
PHP Code:

// NPC made by theHAWKER is a
if (created) {y-=.01;
drawaslight;
}
//#CLIENTSIDE
if (playerenters) {
  
setcoloreffect 1,1,1,0.01;


can someone help me out?

killerogue 04-18-2007 04:45 AM

I give up.

theHAWKER 04-18-2007 04:50 AM

Quote:

Originally Posted by killerogue (Post 1300852)
I give up.

:( are you giving up cause ur fed up? or has my gienous(however spelt) over powerd you?:D

killerogue 04-18-2007 04:55 AM

No. Because you have the online opportunities that aren't available to every newbie scripter who wants to be good. I don't understand why you don't utilize them to learn a better twice as efficient language, aptly GS2.

smirt362 04-18-2007 04:56 AM

If you want an invisible block why not use setshape?

DustyPorViva 04-18-2007 04:59 AM

Perhaps it's better if you do give up. It's his/her choice to either learn GS1 or GS2, and really not something that needs to be argued every single time they make a post. It's kind of tiresome.
Edit: ya, setshape seems the best option.
setshape 1,widthinpixels,heightinpixels;

zokemon 04-18-2007 07:09 AM

You do realize that what script you posted will move the npc up 0.1 tiles everytime you call "created", right?

DustyPorViva 04-18-2007 07:15 AM

"Created" will only be called when the NPC is created(unless manually called), and it's y placement will be reset to it's original placement when it's created, so it's not like it's going to keep moving.

zokemon 04-18-2007 07:38 AM

You don't know that...If it was a database npc, the position would not be reset.

godofwarares 04-18-2007 08:44 PM

Quote:

Originally Posted by theHAWKER (Post 1300850)
If you cant see it it cant be there, at least thats what it looks like...

I'm trying to make a hole in the ground, BUT your not sapost to go down from the top, so to stop people from going down there i put an invisable block, but it wont work.
this is my script for the block:
PHP Code:

// NPC made by theHAWKER is a
if (created) {y-=.01;
drawaslight;
}
//#CLIENTSIDE
if (playerenters) {
  
setcoloreffect 1,1,1,0.01;


can someone help me out?

PHP Code:

if (created)
{
setshape 1,3232;


:)

Sum41Freeeeek 04-18-2007 10:52 PM

the setshape would have to be clientside to block, no?
unless this is offline..

DustyPorViva 04-18-2007 11:10 PM

From what I recall, setshape is serverside, to set the block for all players.

Inverness 04-18-2007 11:23 PM

setShape() is independent on the clientside and serverside. Its required on both sides for use with triggerAction()

And like Stan said, you really need to learn to use GS2 if you have the online access. GS1 has much less logic to it.

theHAWKER 04-19-2007 12:33 AM

Quote:

Originally Posted by godofwarares (Post 1301015)
PHP Code:

if (created)
{
setshape 1,3232;


:)

Thank you :D

zokemon 04-20-2007 06:32 AM

Quote:

Originally Posted by Inverness (Post 1301067)
setShape() is independent on the clientside and serverside. Its required on both sides for use with triggerAction()

And like Stan said, you really need to learn to use GS2 if you have the online access. GS1 has much less logic to it.

GS1 has a lot of logic...it just is a bad way to use it :)


All times are GMT +2. The time now is 12:45 PM.

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