Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 10-07-2014, 03:21 AM
scriptless scriptless is offline
Banned
Join Date: Dec 2008
Location: N-Pulse
Posts: 1,412
scriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to behold
canbepushed(); doesnt work if theres a wall on each side??

PHP Code:
Script help for '*push*':
TServerNPC.canbepushed()
TServerNPC.cannotbepushed() 
Using this serverside and noticing that a "block.png" cannot be pushed thru a gap that is 2 tiles wide dispite the fact that it would fit.. Does anyone know if there is a solution for this?

PHP Code:
function onCreated() {
  
canbepushed();

Attached Images
 
Reply With Quote
  #2  
Old 10-07-2014, 04:25 AM
MysticalDragon MysticalDragon is offline
Global Administration
MysticalDragon's Avatar
Join Date: Oct 2002
Location: Lynn Ma
Posts: 883
MysticalDragon is just really niceMysticalDragon is just really nice
Send a message via AIM to MysticalDragon Send a message via MSN to MysticalDragon
There is a few good solutions. One being, you could always make those two cavern pillars images and use setshape2. Another one one be to script your own push and pull system, that graal one is kinda sucky.
__________________
~Delteria Support
~Playerworld Support
~PWA Chief
http://support.toonslab.com
[email protected]



Reply With Quote
  #3  
Old 10-07-2014, 04: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
This bug has been around forever. There's a "pushpull" class in my Atlantis package you should check out.
__________________
Reply With Quote
  #4  
Old 10-07-2014, 05:03 AM
Jakov_the_Jakovasaur Jakov_the_Jakovasaur is offline
Deleted by Darlene159
Jakov_the_Jakovasaur's Avatar
Join Date: Sep 2013
Location: Deleted by Darlene159
Posts: 353
Jakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud of
is your block.png definitely 32 x 32 pixels?

the mainfile is 32 x 32, however i swear there has been at least one server with a 33 x 32 version of block.png that people have been downloading the entire time
__________________
This signature has been deleted by Darlene159.
Reply With Quote
  #5  
Old 10-07-2014, 05:17 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
Quote:
Originally Posted by Jakov_the_Jakovasaur View Post
is your block.png definitely 32 x 32 pixels?

the mainfile is 32 x 32, however i swear there has been at least one server with a 33 x 32 version of block.png that people have been downloading the entire time
Oh, yea, good point. The block.png in the screenshot is definitely the 33*32 one. Both canbepushed() and canbepulled() are still somewhat bugged, though.
__________________
Reply With Quote
  #6  
Old 10-07-2014, 02:23 PM
MysticalDragon MysticalDragon is offline
Global Administration
MysticalDragon's Avatar
Join Date: Oct 2002
Location: Lynn Ma
Posts: 883
MysticalDragon is just really niceMysticalDragon is just really nice
Send a message via AIM to MysticalDragon Send a message via MSN to MysticalDragon
Quote:
Originally Posted by Crow View Post
This bug has been around forever. There's a "pushpull" class in my Atlantis package you should check out.
This is what Delteria uses, its pretty sweet.
__________________
~Delteria Support
~Playerworld Support
~PWA Chief
http://support.toonslab.com
[email protected]



Reply With Quote
  #7  
Old 10-08-2014, 12:59 AM
scriptless scriptless is offline
Banned
Join Date: Dec 2008
Location: N-Pulse
Posts: 1,412
scriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to behold
Quote:
Originally Posted by Crow View Post
This bug has been around forever. There's a "pushpull" class in my Atlantis package you should check out.
I saw the onActionPushed function but hadn't actually tested it out. Saw it again in your script and decided just for the heck of it to try it. Thats a pretty nifty class you got there. I see some stuff about hourglass and other stuff in there... what exactly was ment to be the limitations of this script if you don't mind me asking?

I guess I have enough to solve my problem. I just needed to be able to push this block 1 direction, until it hit the wall. and with that function alone I can pretty easily do that without any wall checks even.
Reply With Quote
  #8  
Old 10-08-2014, 03:44 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
Only limitations were that the size of the object had to be 2x2 tiles. I was going to expand it to work with a dynamic object size, but never really got to it. The hourglass was for, well, the hourglass on Atlantis, which we used to reset puzzle objects and the player location in dungeons. Kinda like Lufia 2 does it.
__________________
Reply With Quote
  #9  
Old 10-09-2014, 01:31 AM
scriptless scriptless is offline
Banned
Join Date: Dec 2008
Location: N-Pulse
Posts: 1,412
scriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to behold
Ahh makes sense. Well its definitely a nice script. Appreciate you sharing it. I am asumming to make it dynamic size you would open the image and get the width/height from it and round up it to the nearest 16 pixels?
Reply With Quote
  #10  
Old 10-09-2014, 04:55 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
Quote:
Originally Posted by scriptless View Post
Ahh makes sense. Well its definitely a nice script. Appreciate you sharing it. I am asumming to make it dynamic size you would open the image and get the width/height from it and round up it to the nearest 16 pixels?
I'd probably just set the size in the object where I'm joining the class. But yes, this the code is tile based, it would have to be rounded.
__________________
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 05:40 PM.


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