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 03-19-2004, 07:22 PM
CyberFly CyberFly is offline
Registered User
Join Date: Mar 2004
Location: UK
Posts: 6
CyberFly is on a distinguished road
Send a message via AIM to CyberFly Send a message via Yahoo to CyberFly
Tiles??

i think this might have alot to do with math. im not that good in math. lets say i want the tilenumber thats supposed to be in tiles[x,y]=tilenumber; to be the pics1.png pxel starting at pixel-x 1120 and pixel-y 416.
__________________
*CyberFly
Reply With Quote
  #2  
Old 03-19-2004, 07:27 PM
-Ramirez- -Ramirez- is offline
Registered User
Join Date: Jun 2002
Location: USA, Ohio
Posts: 729
-Ramirez- has a spectacular aura about-Ramirez- has a spectacular aura about
Re: Tiles??

You can place the tile in the level, select it, then click "Export Tiles Array" to see the hex value of the tile. It can be used directly in scripts in comparison with a tiles[x,y] value.
__________________
Kat
Reply With Quote
  #3  
Old 03-19-2004, 07:41 PM
WanDaMan WanDaMan is offline
Master Tux
WanDaMan's Avatar
Join Date: Aug 2002
Location: England, United Kingdom
Posts: 5,571
WanDaMan is a jewel in the roughWanDaMan is a jewel in the rough
Send a message via MSN to WanDaMan
I think it would be good if
Stefan made a onwall command and offwall
Like
onwall=0-345,0-346; and such and
offwall=0-342,0-343; If you get me,Would be easier and understandable i beleve.
__________________
V$:CONFL16T
Reply With Quote
  #4  
Old 03-19-2004, 08:44 PM
tlf288 tlf288 is offline
Registered User
tlf288's Avatar
Join Date: Nov 2001
Location: new account: Trevor
Posts: 0
tlf288 is on a distinguished road
Send a message via AIM to tlf288 Send a message via Yahoo to tlf288
Quote:
Originally posted by WanDaMan
I think it would be good if
Stefan made a onwall command and offwall
Like
onwall=0-345,0-346; and such and
offwall=0-342,0-343; If you get me,Would be easier and understandable i beleve.
I agree (partly). If there was a file stored on the server named, lets say tiles.ini, then you could store on/offwall tile indeces like so:

NPC Code:

;Sections:
; onwall - tiles that are onwall
; water - tiles that are water
;
;all other tiles are considered regular walkable tiles
[onwall]
87,1023,154,674

[water]
67,98,1006,442



Then to expand it even more you could set sections that set a flag to true for custom ingame settings, such as:

NPC Code:

in tiles.ini
[tileFlag1]
34,82,10,67

in a gani script
if (tileFlag1)
// do special effect type things



Of course there would be many more tile indeces under each section, but you get the idea.

This is for those that say just script a new movement system:
Lets face it, scripting a movement system is really really hard. Although scripting a movement system is the best approach, with all the new servers and seemingly lack of talent this seems to be the easiest approach for customizing the movement system.
__________________
new account: Trevor
Reply With Quote
  #5  
Old 03-19-2004, 08:47 PM
WanDaMan WanDaMan is offline
Master Tux
WanDaMan's Avatar
Join Date: Aug 2002
Location: England, United Kingdom
Posts: 5,571
WanDaMan is a jewel in the roughWanDaMan is a jewel in the rough
Send a message via MSN to WanDaMan
I agree, it'd be alot easyier
__________________
V$:CONFL16T
Reply With Quote
  #6  
Old 03-20-2004, 03:15 AM
CyberFly CyberFly is offline
Registered User
Join Date: Mar 2004
Location: UK
Posts: 6
CyberFly is on a distinguished road
Send a message via AIM to CyberFly Send a message via Yahoo to CyberFly
Re: Re: Tiles??

Quote:
Originally posted by -Ramirez-
You can place the tile in the level, select it, then click "Export Tiles Array" to see the hex value of the tile. It can be used directly in scripts in comparison with a tiles[x,y] value.
thats not what i mean!!!!

You know pics1.png? if you have the pixel-x 0 and pixel-y 16 there, you start on the flower. pixel-x 640 and pixel-y 432 is the snow flower!

Is there a way to get from those, to tiles[x,y]= number?


I have attached an image so you can see it better..
Attached Thumbnails
Click image for larger version

Name:	pics1.jpg
Views:	176
Size:	308.5 KB
ID:	27780  
__________________
*CyberFly
Reply With Quote
  #7  
Old 03-20-2004, 03:23 AM
Riot Riot is offline
Delteria Management
Join Date: Nov 2003
Location: Seminole County, Florida
Posts: 280
Riot is on a distinguished road
You mean like these?
http://forums.graal2001.com/forums/s...threadid=50030

http://forums.graal2001.com/forums/s...threadid=50006

Otherwise the hex values is the tiles[x,y] values.
Reply With Quote
  #8  
Old 03-20-2004, 03:29 AM
-Ramirez- -Ramirez- is offline
Registered User
Join Date: Jun 2002
Location: USA, Ohio
Posts: 729
-Ramirez- has a spectacular aura about-Ramirez- has a spectacular aura about
Re: Re: Re: Tiles??

Quote:
Originally posted by CyberFly
Is there a way to get from those, to tiles[x,y]= number?
Do you mean convert the pixel coordinates to the hex value that the level editor gives you? If so, I know there's a way, but I don't know it off the top of my head.
__________________
Kat
Reply With Quote
  #9  
Old 03-20-2004, 07:40 AM
Dach Dach is offline
call me Chad, it's cooler
Dach's Avatar
Join Date: Aug 2002
Posts: 1,899
Dach is on a distinguished road
Quote:
Originally posted by tlf288


This is for those that say just script a new movement system:
Lets face it, scripting a movement system is really really hard. Although scripting a movement system is the best approach, with all the new servers and seemingly lack of talent this seems to be the easiest approach for customizing the movement system.
I made the one on Adiarde in the past like 3 days. It's got some (quite) minor bugs, but overall it is very nice.

but anyway, what are you guys suggesting exactly? I'm not sure I get it..
__________________
Scripting Documents:Old Script Documentation-Movement Tutorial
Reply With Quote
  #10  
Old 03-20-2004, 08:13 AM
tlf288 tlf288 is offline
Registered User
tlf288's Avatar
Join Date: Nov 2001
Location: new account: Trevor
Posts: 0
tlf288 is on a distinguished road
Send a message via AIM to tlf288 Send a message via Yahoo to tlf288
Quote:
Originally posted by Dach


I made the one on Adiarde in the past like 3 days. It's got some (quite) minor bugs, but overall it is very nice.
Your a very talented scripter though. I'm not sure if you're suggesting that everyone else should script their own. But if you are, you are wrong. Otherwise, sorry for my previous statement.


Quote:
but anyway, what are you guys suggesting exactly? I'm not sure I get it..
If you are asking me:
Ok, say a file named tiles.ini is stored on a server. Graal downloads it and parses all the information in it (look at my previous post). Then decides what tiles are onwall/water/etc.
__________________
new account: Trevor
Reply With Quote
  #11  
Old 03-20-2004, 12:06 PM
WanDaMan WanDaMan is offline
Master Tux
WanDaMan's Avatar
Join Date: Aug 2002
Location: England, United Kingdom
Posts: 5,571
WanDaMan is a jewel in the roughWanDaMan is a jewel in the rough
Send a message via MSN to WanDaMan
Re: Re: Re: Tiles??

Quote:
Originally posted by CyberFly

thats not what i mean!!!!

You know pics1.png? if you have the pixel-x 0 and pixel-y 16 there, you start on the flower. pixel-x 640 and pixel-y 432 is the snow flower!

Is there a way to get from those, to tiles[x,y]= number?


I have attached an image so you can see it better..
No it's not..
Each tile is 16 pixels, 16 x the number across (the number of tiles). Then do the same for the length; thats how I get the x and y (for addtiledef2).
if(tiles[playerx,playery] == value here){
Don't carry on like this :
if(tiles[playerx,playery] == value here || another || another ||etc) {
Add it into an array it's alot more better to read and all.
Well anyways I'll give you an example so that if they are on a specific tile something will happen. If some one hasn't posted by the time I get on my other computer I'll edit my post. Other than that I'll make a new post.
__________________
V$:CONFL16T
Reply With Quote
  #12  
Old 03-20-2004, 12:59 PM
Loriel Loriel is offline
Somewhat rusty
Loriel's Avatar
Join Date: Mar 2001
Posts: 5,059
Loriel is a name known to allLoriel is a name known to allLoriel is a name known to allLoriel is a name known to all
tiles[foo, bar] = pixel_x / 16 + pixel_y;
If I remember correctly.
Reply With Quote
  #13  
Old 03-20-2004, 04:52 PM
WanDaMan WanDaMan is offline
Master Tux
WanDaMan's Avatar
Join Date: Aug 2002
Location: England, United Kingdom
Posts: 5,571
WanDaMan is a jewel in the roughWanDaMan is a jewel in the rough
Send a message via MSN to WanDaMan
foo?
bar?
__________________
V$:CONFL16T
Reply With Quote
  #14  
Old 03-20-2004, 06:12 PM
VeX_RaT_Boy VeX_RaT_Boy is offline
WannaBe Scripter
VeX_RaT_Boy's Avatar
Join Date: Aug 2002
Location: Norway
Posts: 960
VeX_RaT_Boy is on a distinguished road
Send a message via ICQ to VeX_RaT_Boy Send a message via AIM to VeX_RaT_Boy Send a message via Yahoo to VeX_RaT_Boy
I think I know what you mean...check my script in the "Npc Showoff" thread!
__________________
-Kjetil Valen
Reply With Quote
  #15  
Old 03-20-2004, 08:19 PM
tlf288 tlf288 is offline
Registered User
tlf288's Avatar
Join Date: Nov 2001
Location: new account: Trevor
Posts: 0
tlf288 is on a distinguished road
Send a message via AIM to tlf288 Send a message via Yahoo to tlf288
Quote:
Originally posted by WanDaMan
foo?
bar?
Same as [x, y], [i, j], or [horizontalAxis, verticalAxis]. Just variable names.
__________________
new account: Trevor
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 06:14 AM.


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