![]() |
screwy stake
1 Attachment(s)
watch the vid you'll understand, all I basically did was translate the hammer script to GS2, also this is a gmap, so it might be a gmap bug?
|
Quote:
|
You need to use updateboard(x, y, width, height);
|
I do use update board
and for some odd reason I can't post the script because it says my browser sends some unknown request to the server and the server doesn't understand. >_> (forums server) |
It could be because of you're on a gmap?
Also, attach the script in a txt if you want others to look at it... either way you're better off making your own hammer script as I believe the old one used board[], which tiles[] is preferred over. |
1 Attachment(s)
here, I tried tiles and would not even return that the tiles was stake.
|
tiles[] is a special array that works like:
tiles[x,y] Because it's so special, you can't copy another array into it, sadly. :( Dusty is right, it might be odd because you are on a gmap. |
*wait for a reply by Stefan for one of his uber awesome fixes*
|
Just rescript it from scratch. Trying to update an old script like that for GS2 is a waste of time. You could duplicate it in such few of lines now by just rescripting it.
|
I'm not too good with how to detect tiles. Do you know a tutorial somewhere?
|
Best way is to do something like...
PHP Code:
PHP Code:
Early apologies for the sloppy instructions, if you need something more in-depth I can do that. But hopefully this is enough to get you started. |
ah yes plenty I get the gist of it, thanks ^^
|
ok I got it working with tiles and it works flawless in a single level. I have deduced it is a gmap problems. let say I'm in gmap_b2.nw and I hit a stake well it updates the level gmap_a1.nw, not the level I'm in. I tried that %64 thing and it doesnt work and could someone explain to me what %64 does?
|
Quote:
PHP Code:
PHP Code:
|
Well, % is modulus, which is the remainder of division.
So on a gmap, the gmap acts as one giant level, so instead of your coordinates being from 0-64, it's 64*amount of gmap levels+player's actual coordinates in the level. So... if you want the coordinates of the player in the actual level, not gmap, you'd do player.x%64 which translates to divide the player's x by 64, and return the remainder, which in this case would be the player's coordinates in relation to the level, not the gmap. Also, you might want to try this, along with the player.x/y%64: level.tiles[blah,blah] level.updateboard(x,y,2,2); |
level. on serverside is a gmap (if you are in one) while it is a single level on the clientside so you don't want to use modulus.
|
I'm confused now. What did a stake turn into when pressed, the sign hole?
|
it works I got it, I just used tiles instead of board (did the little conversion between the two) and then I completely removed that modulus thing. ^^ thanks guys, would rep but it says I need to spread some around first XD lol
EDIT Yes rufus |
Quote:
|
Quote:
http://img135.imageshack.us/img135/5...erstakeja1.png |
I made tiles nearly like that ;p
|
| All times are GMT +2. The time now is 06:31 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.