Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   New Scripting Engine (GS2) (https://forums.graalonline.com/forums/forumdisplay.php?f=153)
-   -   Couch? (https://forums.graalonline.com/forums/showthread.php?t=79869)

Stryke 05-29-2008 05:32 AM

Couch?
 
How do I make a couch? Like so you can sit on the middle, but not the sides and top. Can't use chair tiles because the couch is furniture that can be moved.

cbk1994 05-29-2008 05:40 AM

There are some examples.

Also, see the wiki.

You need to use setshape2.

http://wiki.graal.net/index.php/Spec...etshape2&go=Go

There is some information on that search page.

Stryke 05-29-2008 06:00 AM

PHP Code:

setshape2(8,1.5,{22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22}); 

Tried this, but only works for the first top of the couch.. How would I do the two sides at the bottom (armrests)?

DustyPorViva 05-29-2008 06:39 AM

You can't have a chair that's 1.5 in height. I mean... graphically you could, but you can't have a TILE that's 1.5 in height, and that's exactly what you're trying to do.
PHP Code:

setshape2(8,2,{
  
22,22,22,22,22,22,22,22,
  
22,22,22,22,22,22,22,22,
}); 

Notice how I organized my array. Basically, since my chair has a height of 2, I categorized the values of my array into two rows. One row for each vertical row of tiles. It makes it easier to understand exactly what you're doing.

Stryke 05-29-2008 06:58 AM

It actually does work as 1.5, believe it or not.
Anyway to include the arm rests on the couch on the setshape2?
Cause setshape2 only works with rectangles.. couch looks like this:

------------
|xxxxxxxxxx|
|xxxxxxxxxx|

x is where the player sits

Nabru 05-29-2008 01:21 PM

http://www.youtube.com/v/2fcLcG-EVu8

The script in the video is pretty blurry, so here:
//#CLIENTSIDE
function onPlayerTouchsMe(){
dontblock();
drawunderplayer();
}

Codein 05-29-2008 02:18 PM

He wanted the furniture to be moveable, which isn't possible if you do it that way. Setshape2 is the way forward with this one ^_^

Nabru 05-29-2008 04:17 PM

Quote:

Originally Posted by Codein (Post 1393162)
He wanted the furniture to be moveable, which isn't possible if you do it that way. Setshape2 is the way forward with this one ^_^

I guess I missed that, my bad.

Stryke 05-29-2008 09:19 PM

setshape only works as a rectangle though i want it work with couch
only the x part should be where he should be able to sit, everything else
should be blocking

------------
|xxxxxxxxxx|
|xxxxxxxxxx|

Chompy 05-29-2008 09:59 PM

PHP Code:

setshape2(83, {
  
2222222222222222,
  
22,  0,  0,  0,  0,  0,  022,
  
22,  0,  0,  0,  0,  0,  022
}); 

or something like that

cbk1994 05-29-2008 10:01 PM

Quote:

Originally Posted by Stryke (Post 1393146)
It actually does work as 1.5, believe it or not.

I seriously doubt it.

Most likely, you it's just rounding to 2.

Rice2k 05-29-2008 10:02 PM

Quote:

Originally Posted by Stryke (Post 1393141)
How do I make a couch? Like so you can sit on the middle, but not the sides and top. Can't use chair tiles because the couch is furniture that can be moved.

If your going to make a couch you should make a new graphic for it. the old one really sux.

Stryke 05-29-2008 11:30 PM

Thanks Chompy, it works :D

Chompy 05-29-2008 11:40 PM

Quote:

Originally Posted by Stryke (Post 1393244)
Thanks Chompy, it works :D

no problem :]


All times are GMT +2. The time now is 04:08 PM.

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