Graal Forums  

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

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 08-16-2008, 12:53 AM
Devenio Devenio is offline
Scripter
Devenio's Avatar
Join Date: Dec 2006
Posts: 28
Devenio is on a distinguished road
Tiles covertion to Image formula! [help?]

Example..
Image/Tile | ingame x,y| image x,y
black tile | 8,39 | 384,112
pics1.png | 15,255 | 2048,512

NPC Code:

//Forumla
temp.tile = tiles[int(mousex),int(mousey)];
temp.tx = BLAH;
temp.ty = BLAH;

//Display of tile
showimg( 200, "pics1.png", screenwidth/2, screenheight/2);
changeimgvis( 200, 4);
changeimgpart( 200, temp.tx, temp.ty, 16, 16);



Basically I need help figuring out what I need to put in temp.tx and temp.ty to get the correct coords to get the image to display the tile the mouse is over.

I've been trying to do this for 2 days now, and I just can't figure out the correct formula ... So could anyone help me ..
__________________

"Two things are infinite: the universe and human stupidity, and I'm not sure about the the universe.." -Einstein


Reply With Quote
 


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 08:29 PM.


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