View Single Post
  #3  
Old 07-14-2002, 05:29 AM
adam adam is offline
http://wiki.graal.us/
adam's Avatar
Join Date: Nov 2001
Posts: 2,247
adam has a spectacular aura aboutadam has a spectacular aura about
Send a message via AIM to adam
NPC Code:

if (weaponfired){
setarray this.check_tiles,3;
setarray this.chang_tiles,3;
this.check_tiles = { 1652,1653,1668,1669};
this.chang_tiles = { 1802,1803,1818,1819};
for (this.t=0;this.t<64+64*64;this.t++){
for (j=0;j<arraylen(this.check_tiles);j++){
if (board[this.t]==this.check_tiles[j]){
board[this.t]=this.chang_tiles[j];
}elseif(board[this.t]==this.chang_tiles[j]){
board[this.t]=this.check_tiles[j];
}
}
}
updateboard 0,0,64,64;
}




This will work.... but only on half of the level.

don't ask me why I don't know. if you notice anything wrong with it tell me.

I would use x and y but that would require a 3 nested loops. That doesn't work for some reason.
__________________
Rogue Shadow (TCN)(NAT)(Global Development Team)

For development help, contact the patrons of the #graaldt irc channel below, I am usually there.
Click Here to Join IRC Chat Now! -- irc.freenode.net Channel: #graaldt
Quote:
<Dustyshouri> no, RogueShadow is always talking about scripts lol
<Dustyshouri> in fact, he pretty much brought Graal back as a topic single-handedly
Reply With Quote