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 12-04-2009, 11:34 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
gettileset()

How do you use this to pull a certain tileset? b/c putting one with or without quotes doesnt work, and its not loading any of them on the server its on, just pics1.png. If that cant be used, what could you do to substitute for that?
__________________
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 12-04-2009, 11:41 PM
Switch Switch is offline
o.o
Switch's Avatar
Join Date: Jan 2007
Location: Philadelphia
Posts: 3,038
Switch has a spectacular aura about
Send a message via MSN to Switch
It's used to get the main tileset being used at the moment.
PHP Code:
//#CLIENTSIDE
function onCreated() {
  
removetiledefs();
  
addtiledef("mytileset.png"""0);
  echo(
gettileset());

Would return mytileset.png.
__________________
Oh squiggly line in my eye fluid. I see you lurking there on the peripheral of my vision.
But when I try to look at you, you scurry away.
Are you shy, squiggly line?
Why only when I ignore you, do you return to the center of my eye?
Oh, squiggly line, it's alright, you are forgiven.
Reply With Quote
  #3  
Old 12-04-2009, 11:49 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
Well we were using that on an online editor, so its in a diff wep, dont think that would work right, more of a setimg and gettileset() is in that.
__________________
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
  #4  
Old 12-05-2009, 12:02 AM
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
example:
PHP Code:
showimg(202gettileset(), this.conv_tcx 16this.conv_tcy 16); 
its not getting the current tileset on the level or the main one the server uses, only pics0.png.
tried
PHP Code:
gettileset(armageddon-sde-tileset1.gif
and
PHP Code:
gettileset("armageddon-sde-tileset1.gif"
too
__________________
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
  #5  
Old 12-05-2009, 12:05 AM
Switch Switch is offline
o.o
Switch's Avatar
Join Date: Jan 2007
Location: Philadelphia
Posts: 3,038
Switch has a spectacular aura about
Send a message via MSN to Switch
It has no parameters needed.

Edit:
addtiledef2() tilesets won't be read by gettileset().
__________________
Oh squiggly line in my eye fluid. I see you lurking there on the peripheral of my vision.
But when I try to look at you, you scurry away.
Are you shy, squiggly line?
Why only when I ignore you, do you return to the center of my eye?
Oh, squiggly line, it's alright, you are forgiven.

Last edited by Switch; 12-05-2009 at 12:19 AM..
Reply With Quote
  #6  
Old 12-05-2009, 12:18 AM
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
Switch says addtiledef2 was interfering, in case anyone else runs into this.
__________________
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
  #7  
Old 12-05-2009, 12:22 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
gettileset() only grabs the main tileset being set(addtiledef). Addtiledef2's are rendered separately, on a 'layer' above the main tileset, rather than actually being inserted into it. There is currently no simple way to manage all the addtiledef2's, however, but it's been suggested before.
Reply With Quote
  #8  
Old 12-05-2009, 12:30 AM
Switch Switch is offline
o.o
Switch's Avatar
Join Date: Jan 2007
Location: Philadelphia
Posts: 3,038
Switch has a spectacular aura about
Send a message via MSN to Switch
Quote:
Originally Posted by DustyPorViva View Post
gettileset() only grabs the main tileset being set(addtiledef). Addtiledef2's are rendered separately, on a 'layer' above the main tileset, rather than actually being inserted into it. There is currently no simple way to manage all the addtiledef2's, however, but it's been suggested before.
Maybe gettilesets() which returns in an array a 1 for the main tileset followed by the image, and a 2 for all addtiledef2's followed by the image. Or gettileset2() which returns all addtiledef2's.
__________________
Oh squiggly line in my eye fluid. I see you lurking there on the peripheral of my vision.
But when I try to look at you, you scurry away.
Are you shy, squiggly line?
Why only when I ignore you, do you return to the center of my eye?
Oh, squiggly line, it's alright, you are forgiven.
Reply With Quote
  #9  
Old 12-05-2009, 12:32 AM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
gettileset() only returns the main tileset (addtiledef), not parts (addtiledef2).
It's calculating the image and offset for each tile when drawing it. There is currently no way to get the current tile sets except by drawing them on a drawing panel ("TILES")
Reply With Quote
  #10  
Old 12-05-2009, 12:33 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
Quote:
Originally Posted by Switch View Post
Maybe gettilesets() which returns in an array a 1 for the main tileset followed by the image, and a 2 for all addtiledef2's followed by the image. Or gettileset2() which returns all addtiledef2's.
Well, I've suggested that the current visible tileset(compilation of the main and secondary) be flattened into a panel image, and thus with another suggestion to be able to access panel images via panel.image, easily accessible.
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 07:21 AM.


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