Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   setshape2 problem- no effect on water (https://forums.graalonline.com/forums/showthread.php?t=66639)

wild8900 06-12-2006 07:47 PM

setshape2 problem- no effect on water
 
I made this script to test the effect on water like a boat, I read that '0' would be treated as land but when I tested it offline, it was treated as nothing. I also used 3 like a chair in the water but nothing happened. This stuff worked on land though !pissed! I need someone to tell me my error. Maybe its a syntax error..?
PHP Code:

//#CLIENTSIDE
if (created) {
  
drawunderplayer;
  
setshape2 2,2,{
    
0,0,
    
0,0,
    };



contiga 06-12-2006 08:39 PM

Try adding blockagain;

projectigi 06-12-2006 09:54 PM

AFAIK theres no error, you need to attach the player to the object in order to make it work right
from my experience same thing is if you want to make a non blocking object over a wall, the wall will block even if you set the shape to a non-blocking tile. You need to attach the player to the npc

hi contiga :p

Omini 06-16-2006 06:14 AM

I was always under the impression that 0 in setshape2 was just a "dontblock;" tile...

contiga 06-16-2006 09:05 AM

hi sheepy :p

Yes, you are correct, use attachtoobj #v(id); I believe.. not used to that command.

projectigi 06-19-2006 02:26 PM

Quote:

Originally Posted by Omini
I was always under the impression that 0 in setshape2 was just a "dontblock;" tile...

kinda put if u place such an npc over a wall, it doesnt overwrite the block of the wall...
u need to attach the player to the npc(obj) to make it overwrite the block of the wall =/

Malinko 06-19-2006 06:39 PM

Quote:

Originally Posted by Omini
I was always under the impression that 0 in setshape2 was just a "dontblock;" tile...

22!

wild8900 06-20-2006 01:43 AM

well, I am trieing to make a couch that you can move around and sit on but how can I make it be a normal couch when I have attach the player to the couch x.x


PHP Code:

if (actionleftmouse&&(strequals(#a,wild8900)||strequals(#a,Admin-Playerworld79))) {
  
this.move=1-this.move;
}

if (
created||timeout){
  if (
this.move==1){
    
x=int(mousex-0.5);
    
y=int(mousey-0.5);
  }

  
timeout=0.05;
}

//#CLIENTSIDE
if (created){
  
dontblock;
  
drawunderplayer;
  
setshape2 8,4,{
    
00,22,22,22,22,22,22,00,
    
22,03,03,03,03,03,03,22,
    
22,03,03,03,03,03,03,22,
    
22,03,03,03,03,03,03,22,
      };



ApothiX 06-20-2006 03:53 AM

You don't have to use attachplayertoobj, unless you are planning on having a couch that is floating in the water, or on a bunch of blocking tiles.

wild8900 06-20-2006 08:44 AM

Well, the couch will be on normal unblocking tiles but I need some of the couch to block you.
PHP Code:

  setshape2 8,4,{
    
00,22,22,22,22,22,22,00,
    
22,03,03,03,03,03,03,22,
    
22,03,03,03,03,03,03,22,
    
22,03,03,03,03,03,03,22,
      }; 


projectigi 06-20-2006 02:19 PM

as apothi already said, you dont need to attach the player if u dont plan on:
a) put the couch on water or a wall
b) put the couch over blocking level tiles
c) want players to move with the couch

ApothiX 06-20-2006 04:21 PM

Quote:

Originally Posted by wild8900
Well, the couch will be on normal unblocking tiles but I need some of the couch to block you.
PHP Code:

  setshape2 8,4,{
    
00,22,22,22,22,22,22,00,
    
22,03,03,03,03,03,03,22,
    
22,03,03,03,03,03,03,22,
    
22,03,03,03,03,03,03,22,
      }; 


If a setshape2 is located on non-blocking tiles, then it takes whatever is specified in the setshape. If you specify blocking tiles, they will block, if you specify sit tiles, they will sit, if you specify water tiles, you will swim. You get the picture.

projectigi 06-20-2006 11:30 PM

not correct
water is a non-blocking tile too but you need to attach the player to make him sit on a couch on water

ApothiX 06-21-2006 12:06 AM

Quote:

Originally Posted by projectigi
not correct
water is a non-blocking tile too but you need to attach the player to make him sit on a couch on water

<_< You know what I meant. Water isn't specifically non-blocking anyway, it's a different type of tile.

wild8900 06-21-2006 04:57 AM

but I tried the couch and it didnt work (it was on plain grass land)

hotrian 06-24-2006 02:50 AM

If you want the couch to block you... Remove 'dontblock;'...

wild8900 06-24-2006 07:49 AM

aw crap I cant believe I had dont block -_- I feel so stupid right now....
Thanks guys=]

calani 06-24-2006 05:58 PM

PHP Code:

this.move=1-this.move

lovely toggle ;) glad someone is finally using that besides me

zokemon 07-05-2006 08:20 AM

Quote:

Originally Posted by calani
lovely toggle ;) glad someone is finally using that besides me

PHP Code:

this.move = (this.move 1)%2

Is so much hotter looking.

wild8900 07-05-2006 09:37 AM

Quote:

Originally Posted by zokemon
PHP Code:

this.move = (this.move 1)%2

Is so much hotter looking.

We're getting a bit off topic but, yours is more complicated...


All times are GMT +2. The time now is 09:24 AM.

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