![]() |
Setting different tilesets
I can't believe I've forgotten this much, but here is the code first:
PHP Code:
|
As I have learnt debugging is the key.
Have you tried something like this? PHP Code:
|
player.level.name?
|
PHP Code:
|
What I posted works, it's just bound to be taking more memory than I need. I was looking for someone to point me in a different direction of setting different tilesets on a gmap. I know it's probably not good to be user onPlayerEnters on a gmap, and there has got to be a better way of doing tilesets like I'm trying to do without using an array of levels, because I only know to use onPlayerEnters with the array, nothing else worked. Help plz. :(
Also we are using .gif because .png kept giving us problems lately. Not sure with exactly what, I just know because that is what I was told. |
Quote:
|
Quote:
Quote:
I'd rather use some way for it onCreated to set it all once, but it seems it has to check the array every time on enters to use an array. I really don't like doing it that way, it's just been so long I don't remember how I used to do it. |
Quote:
|
Yeah, it wouldnt change correctly. If i started in one tileset, then walked to another, it wouldnt change to the main tileset like it was supposed to. Thats why I put onPlayerEnters, and it works, but I know it's the worst of all ideas.
|
Maybe setting a clientr variable to the tileset when you enter a level and then if that changes do the script?
I can't remember but to get the tileset I think it's GetTileDef(); |
if you ever go classic, Skyld will run through your code to check for anything bad and advise. I wouldn't worry about process memory at such an early stage.
|
Yeah Capt. GScript will help ya most likely, I mean I tearms of pc graal it can handle alot of memory intensive codes but iDevices, I'm not so sure about.
So as Andrew said, don't worry about it too much. Well unless you're trying to do a 0.05 second serverside timeout.. |
Quote:
|
Quote:
|
Well whoever neg repped me at least I am trying to help.
|
The second part of my quest was if there was a different, or better way to make
PHP Code:
|
Just do:
addtiledef("haha.png", "world_", 1); All levels with the world_ prefix will use the haha tileset. Then you can use: addtiledef("default.png", "", 1); As a catch all and have other levels use the default tileset instead unless there's a more specific tiledef for the levels the player is in. |
Its part of the gmap that has to change so if there is a way to make like world_af11 and up a tileset then below different that is what I need. I'm not asking for a handout either, I just have no idea how to do it and I've been searching a few days and found nothing. Was thinking looping it to catch but just havent tried yet.
|
| All times are GMT +2. The time now is 11:12 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.