![]() |
help me out will ya...(boards)
yes hi....uhmm... with the boards where you change tiles...
with updateboard etc...how do you know what tile has what id???? i mean it takes me hours to find the right tile i want... please help me out, and please do not spam this topic... :confused: :confused: |
Basically, you can get a tile's id by doing this:
board[x+y*64] In which x and y are the x and y positions of the tile in the level However if you want to know the ID of a tile to replace it with you use the following calculation: tilex+tiley*16 tilex and tiley are displayed under he location from which you normally select tiles in the editor if you hold your mouse over a tile. updateboard then needs to be done after any tile changes to make it visible, although the changes can only be seen by the player who is "running" the script. |
thank you,
I was looking for that (tilex+tiley*16) :) |
I got another question about this...
is it possible that you can add something in the code to let more tiles change without pasting everytime board[blabla]=blabla; updateboard blabla;? please help me out cause I'm annoying myself as hell of all that pasting maybe i didn't saw something...but thats cause its 2:42 am so please do not think i'm asking something stupid... thank you |
nm
i also just can use variables like this.x and this.y ... ;) |
what do you mean ?
you can run a function .. but the code would be like board[x+64*y]=tilex+16*tiley; updateboard x,y,1,1; or whatever... |
i know that liquid
but i mean i wanted to know if i can change more tiles in one code so i don't have to copy and paste a million times but now i tried this and it worked board[this.x+this.y*64]=tilex+tiley*16; updateboard this.x,this.y,1,1; now add a timeout out and stuff and you're done... please correct me if i'm wrong..;) |
put this on a playertouchme or weaponfired
updateboard HouseGround; |
oh yeah! add x and y to player(x and y)
|
Quote:
like I would make NPC Code: |
| All times are GMT +2. The time now is 12:37 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.