Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 05-29-2008, 05:32 AM
Stryke Stryke is offline
Scripter
Join Date: Apr 2008
Posts: 157
Stryke is an unknown quantity at this point
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.
Reply With Quote
  #2  
Old 05-29-2008, 05:40 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
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.
__________________
Reply With Quote
  #3  
Old 05-29-2008, 06:00 AM
Stryke Stryke is offline
Scripter
Join Date: Apr 2008
Posts: 157
Stryke is an unknown quantity at this point
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)?

Last edited by Stryke; 05-29-2008 at 06:26 AM..
Reply With Quote
  #4  
Old 05-29-2008, 06:39 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
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.
Reply With Quote
  #5  
Old 05-29-2008, 06:58 AM
Stryke Stryke is offline
Scripter
Join Date: Apr 2008
Posts: 157
Stryke is an unknown quantity at this point
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
Reply With Quote
  #6  
Old 05-29-2008, 01:21 PM
Nabru Nabru is offline
100 IFP and runnin'
Nabru's Avatar
Join Date: Aug 2005
Location: Wisconsin
Posts: 440
Nabru will become famous soon enough
Send a message via ICQ to Nabru
http://www.youtube.com/v/2fcLcG-EVu8

The script in the video is pretty blurry, so here:
//#CLIENTSIDE
function onPlayerTouchsMe(){
dontblock();
drawunderplayer();
}
__________________
~Urban
Reply With Quote
  #7  
Old 05-29-2008, 02:18 PM
Codein Codein is offline
jwd
Codein's Avatar
Join Date: Oct 2005
Location: Greater Manchester
Posts: 2,423
Codein has a spectacular aura aboutCodein has a spectacular aura about
Send a message via AIM to Codein Send a message via MSN to Codein
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 ^_^
Reply With Quote
  #8  
Old 05-29-2008, 04:17 PM
Nabru Nabru is offline
100 IFP and runnin'
Nabru's Avatar
Join Date: Aug 2005
Location: Wisconsin
Posts: 440
Nabru will become famous soon enough
Send a message via ICQ to Nabru
Quote:
Originally Posted by Codein View Post
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.
__________________
~Urban
Reply With Quote
  #9  
Old 05-29-2008, 09:19 PM
Stryke Stryke is offline
Scripter
Join Date: Apr 2008
Posts: 157
Stryke is an unknown quantity at this point
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|
Reply With Quote
  #10  
Old 05-29-2008, 09:59 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
PHP Code:
setshape2(83, {
  
2222222222222222,
  
22,  0,  0,  0,  0,  0,  022,
  
22,  0,  0,  0,  0,  0,  022
}); 
or something like that
__________________
Reply With Quote
  #11  
Old 05-29-2008, 10:01 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Stryke View Post
It actually does work as 1.5, believe it or not.
I seriously doubt it.

Most likely, you it's just rounding to 2.
__________________
Reply With Quote
  #12  
Old 05-29-2008, 10:02 PM
Rice2k Rice2k is offline
Rusty Bedsprings
Rice2k's Avatar
Join Date: Jul 2006
Location: Chesapeake,va
Posts: 120
Rice2k will become famous soon enough
Send a message via AIM to Rice2k Send a message via MSN to Rice2k
Quote:
Originally Posted by Stryke View Post
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.
Reply With Quote
  #13  
Old 05-29-2008, 11:30 PM
Stryke Stryke is offline
Scripter
Join Date: Apr 2008
Posts: 157
Stryke is an unknown quantity at this point
Thanks Chompy, it works
Reply With Quote
  #14  
Old 05-29-2008, 11:40 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Quote:
Originally Posted by Stryke View Post
Thanks Chompy, it works
no problem :]
__________________
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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