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-14-2011, 10:32 PM
Astram Astram is offline
Era iPhone PR
Astram's Avatar
Join Date: Aug 2010
Posts: 324
Astram can only hope to improve
Send a message via AIM to Astram
Tile Manipulation Help!

Hi, I've been learning how to manipulate tiles lately. But I don't know how to change tiles. Etc. Lets say you want to make all the green rocks in the level be black rocks. Or turn all the grass in to water. How would I do that? Please help.
__________________
-Toad
The worlds biggest Toad fan...
Era iPhone FTW!


Reply With Quote
  #2  
Old 10-15-2011, 12:14 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Look at this. Also look at the various level editors posted in the code gallery.
__________________
Reply With Quote
  #3  
Old 10-15-2011, 12:26 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
PHP Code:
//#CLIENTSIDE
function onCreated() {
  for ( 
i=0i<64i++ ) {
    for ( 
j=0j<64j++ ) {
      if ( 
tiles[i,j] == ) {
        
tiles[i,j] = 0;
      }
    }
  }
  
updateboard(...);

Something along those lines.
Reply With Quote
  #4  
Old 10-15-2011, 04:27 PM
Astram Astram is offline
Era iPhone PR
Astram's Avatar
Join Date: Aug 2010
Posts: 324
Astram can only hope to improve
Send a message via AIM to Astram
But how do I change the tiles @ tiles[i,j]?
__________________
-Toad
The worlds biggest Toad fan...
Era iPhone FTW!


Reply With Quote
  #5  
Old 10-15-2011, 06:11 PM
iBeatz iBeatz is offline
Kavan
iBeatz's Avatar
Join Date: Dec 2010
Location: Northern Ireland, UK
Posts: 154
iBeatz will become famous soon enough
Send a message via Yahoo to iBeatz
Quote:
Originally Posted by Astram View Post
But how do I change the tiles @ tiles[i,j]?
Just do what scriptless did above, but change the value for the tile equality check and the tile value setting.

ie.
PHP Code:
tiles[i,j] = 0x0;   // Top left tile in the tileset 
Tile hex values can be found using GraalEditor.exe.
__________________

Intelligence without ambition is like a bird without wings.

Reply With Quote
  #6  
Old 10-17-2011, 04:19 AM
Astram Astram is offline
Era iPhone PR
Astram's Avatar
Join Date: Aug 2010
Posts: 324
Astram can only hope to improve
Send a message via AIM to Astram
How do I find hex values...
__________________
-Toad
The worlds biggest Toad fan...
Era iPhone FTW!


Reply With Quote
  #7  
Old 10-17-2011, 04:47 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
I think the hex values are in the "tilearray" button in the offline level editor. Tho the editor itself seems to crash alot on my pc. It just seems to never open but runs as a process.. =/
Reply With Quote
  #8  
Old 10-17-2011, 06:26 AM
Tricxta Tricxta is offline
The Muffin Man
Tricxta's Avatar
Join Date: Oct 2010
Location: Australia
Posts: 563
Tricxta is a jewel in the roughTricxta is a jewel in the rough
scriptless is correct, you just press this button:


It's nifty because it puts the tiles into the array format straight away
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 10:03 AM.


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