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 10-02-2011, 06:23 PM
Emera Emera is offline
Delterian Hybrid
Emera's Avatar
Join Date: Mar 2011
Location: Newcastle Upon-Tyne
Posts: 1,704
Emera is a jewel in the roughEmera is a jewel in the rough
Showing level lines

I was wondering, how would I make a script determine what level I am in, detect the outline of the level and show them using lines? Like FowlPlay4's OLNE. If anybody can help me out with this, it would be great!
__________________
Reply With Quote
  #2  
Old 10-02-2011, 06:28 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
You could just draw 64 horizontal lines, and 64 vertical lines to 'outline' it.

I.e:

PHP Code:
//#CLIENTSIDE
function onCreated() {
  for (
temp.0temp.64temp.x++) {
    
with (findimg(200 temp.x)) {
      
polygon = {
        
temp.x0temp.x64
      
};
    }
  }
  for (
temp.0temp.64temp.y++) {
    
with (findimg(300 temp.y)) {
      
polygon = {
        
0temp.y64temp.y
      
};
    }
  }

You'll have to tweak for GMAPs though by calculating the top-left position. You can see how I do it in my OLNE code.
__________________
Quote:
Reply With Quote
  #3  
Old 10-02-2011, 06:30 PM
Emera Emera is offline
Delterian Hybrid
Emera's Avatar
Join Date: Mar 2011
Location: Newcastle Upon-Tyne
Posts: 1,704
Emera is a jewel in the roughEmera is a jewel in the rough
Quote:
Originally Posted by fowlplay4 View Post
You could just draw 64 horizontal lines, and 64 vertical lines to 'outline' it.

I.e:

PHP Code:
//#CLIENTSIDE
function onCreated() {
  for (
temp.0temp.64temp.x++) {
    
with (findimg(200 temp.x)) {
      
polygon = {
        
temp.x0temp.x64
      
};
    }
  }
  for (
temp.0temp.64temp.y++) {
    
with (findimg(300 temp.y)) {
      
polygon = {
        
0temp.y64temp.y
      
};
    }
  }

You'll have to tweak for GMAPs though by calculating the top-left position. You can see how I do it in my OLNE code.
I just found through echoing that the level width is 640 x 640 (64 X 64)
I have been studying your code for neatly 2 hours and I seem to be getting nowhere.
__________________
Reply With Quote
  #4  
Old 10-02-2011, 09:27 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
A level is 64 times 64 tiles in size. Just show a horizontal and a vertical line every 64 tiles. Done.
Reply With Quote
  #5  
Old 10-02-2011, 09:31 PM
Emera Emera is offline
Delterian Hybrid
Emera's Avatar
Join Date: Mar 2011
Location: Newcastle Upon-Tyne
Posts: 1,704
Emera is a jewel in the roughEmera is a jewel in the rough
Quote:
Originally Posted by Crow View Post
A level is 64 times 64 tiles in size. Just show a horizontal and a vertical line every 64 tiles. Done.
Finished. Thanks guys.
__________________
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 04:38 AM.


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