Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 06-24-2010, 06:45 PM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
Tiles blocking

I have an array of tiles x,y and want them to block and not block in code. Is there something as simple as array.block()? Ive tried .block, .blocklocal, and .blockagain, but none worked.
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #2  
Old 06-24-2010, 07:02 PM
WhiteDragon WhiteDragon is offline
Banned
Join Date: Feb 2007
Posts: 1,002
WhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to behold
I don't think there is anything like that possible with default.
Reply With Quote
  #3  
Old 06-24-2010, 07:21 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
Nope... :{

Just move the tile to a blocking tile inside the pics1.png and re-name your image (not re-name to pics1.png...) sorry
__________________
Reply With Quote
  #4  
Old 06-24-2010, 07:39 PM
WhiteDragon WhiteDragon is offline
Banned
Join Date: Feb 2007
Posts: 1,002
WhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to behold
Quote:
Originally Posted by sssssssssss View Post
I have an array of tiles x,y and want them to block and not block in code. Is there something as simple as array.block()? Ive tried .block, .blocklocal, and .blockagain, but none worked.
However, if you want to block an specific area and not specific tiles, you can putnpc2 and do a setshape2 on it, which allows you to specify any shape you want to block (doesn't need to be just a rectangle).
Reply With Quote
  #5  
Old 06-24-2010, 09:09 PM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
Quote:
Originally Posted by WhiteDragon View Post
However, if you want to block an specific area and not specific tiles, you can putnpc2 and do a setshape2 on it, which allows you to specify any shape you want to block (doesn't need to be just a rectangle).
That might work better, although I would imagine if its for cliffing, it would lag if its a lot of areas all over the gmap? If it wont then thats my best bet.
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #6  
Old 06-24-2010, 09:24 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
not really lag... lol are you doing it for cliffs and cave enterence?
__________________
Reply With Quote
  #7  
Old 06-24-2010, 09:26 PM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
ran out of room on the tileset, so some cliffing that is by the water doesnt block, and it shouldnt per the tileset, but we can't move it, and we need it to block.
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #8  
Old 06-24-2010, 09:29 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
hmmm
just do in a script

HTML Code:
function onCreated() {
  this.b_area = {2, 2}; //32x32 px
  this.join("block_area");
}
in the class
HTML Code:
function onCreated() {
  this.setShape(1,16 * this.b_area[0], 16 * this.b_area[1]);

  save[1] = this.b_area[0];
  save[2] = this.b_area[1];
}
//#CLIENTSIDE
function onCreated() {
  this.setShape(1, 16 * save[1], 16 * save[2]);
}
Shouldn't cause any lagg
__________________
Reply With Quote
  #9  
Old 06-24-2010, 09:33 PM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
Thanks.
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #10  
Old 06-25-2010, 12:17 AM
napo_p2p napo_p2p is offline
oh snaps
napo_p2p's Avatar
Join Date: Sep 2003
Location: Pismo Beach, California
Posts: 2,118
napo_p2p has a spectacular aura aboutnapo_p2p has a spectacular aura about
Send a message via AIM to napo_p2p Send a message via MSN to napo_p2p
If it's just for looks, you can get the same effect using tile layers.
Reply With Quote
  #11  
Old 06-25-2010, 04:02 AM
Deas_Voice Deas_Voice is offline
Deas
Deas_Voice's Avatar
Join Date: Jun 2007
Location: Sweden
Posts: 2,264
Deas_Voice is a jewel in the roughDeas_Voice is a jewel in the rough
Send a message via AIM to Deas_Voice Send a message via MSN to Deas_Voice Send a message via Yahoo to Deas_Voice
Quote:
Originally Posted by napo_p2p View Post
If it's just for looks, you can get the same effect using tile layers.
tell us more
__________________
.
WTF is real life, and where do I Download it?
There is no Real Life, just AFK!
since 2003~
I Support~
ღAeonღ | ღTestbedღ | ღDelteriaღ

if you are going to rep me, don't be an idiot, leave your name!
I got nothing but love for you
Reply With Quote
  #12  
Old 06-25-2010, 04:04 AM
WhiteDragon WhiteDragon is offline
Banned
Join Date: Feb 2007
Posts: 1,002
WhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to behold
Quote:
Originally Posted by Deas_Voice View Post
tell us more
I think it'd just be a matter of laying down some block tiles, then on top of that laying whatever tiles you'd want to show.

I think tile layers are also manipulable by script as well if that approach is desired.
Reply With Quote
  #13  
Old 06-25-2010, 11:57 AM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
You can also counter this problem differently. If you have a wide range of tiles (you said you ran out of blocking tiles, so I guess you do) you could just lay the needed tiles over some already existing blocking tiles using addtiledef2(). For example, if you have some special mountain tiles, but there are no mountains near those watery cliffs, just use addtiledef2() in the levels where those watery cliffs are.
__________________
Reply With Quote
  #14  
Old 06-25-2010, 07:33 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
oo good idea @ Crow
__________________
Reply With Quote
  #15  
Old 06-25-2010, 08:07 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by xAndrewx View Post
oo good idea @ Crow
Out-of-the-box thinking
__________________
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 10:24 AM.


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