Help with your scripting

<SOLVED>Is there a limit on Layers?

<SOLVED>Is there a limit on Layers?

Postby CreativeOcclusion » 18 Feb 2016, 20:58

EDIT!!!...I figured it out 2 minutes after posting...I left out this code before the new layer:
Code: Select all
   height = screen.getHeight();
   width = screen.getWidth();


Is there a limit on Layers?...I am trying to make a newLayer for text...I have two already that work perfect...I am using the same code as the other two and just changing the Layer name...Surely if there is a limit it should be more than two...I have double checked the code a hundred times...This is the code in the onInit function:
Code: Select all
    obj = objID;
    ui.newLayer("ui3");
    ui.setLayer("ui3");
    ui.setFontSize(24);
    ui.newText("ui3",width/2-200,height/2-150);
    ui.setColor("ui3", 0, 0, 1);
    ui.text("ui3", "Gate Locked!..You need a Red Key!");
    ui.setLayerVisible("ui3",0);

The Layer is made visible in the onTrigger_Enter function with this code:
Code: Select all
ui.setLayerVisible("ui3",1);

Any help is appreciated...CO
Thanks, CreativeOcclusion
User avatar
CreativeOcclusion
Skyline Warrior
 
Posts: 366
Joined: 22 Jun 2015, 19:34
Location: Texas

Re: <SOLVED>Is there a limit on Layers?

Postby SolarPortal » 18 Feb 2016, 21:52

lol ;) That's good that you have fixed this.. :)
Skyline Game Engine - Lead Dev.
Please provide as much info as possible when asking for help.


Specs: OS: Win 10 64bit, CPU: Intel i7 4770 3.4ghz x 4 core(8 threads), GPU: Nvidia GTX 1060 6GB, Ram: 16gig DDR3, Windows on 250gb Samsung Evo 860

Twitter: @SolarPortal
Instagram: @SolarPortal
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3631
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer

Re: <SOLVED>Is there a limit on Layers?

Postby CreativeOcclusion » 18 Feb 2016, 22:19

Yeah, I was just being brain dead...I thought I double checked everything, but overlooked the simplest thing... :lol:
Thanks, CreativeOcclusion
User avatar
CreativeOcclusion
Skyline Warrior
 
Posts: 366
Joined: 22 Jun 2015, 19:34
Location: Texas

Re: <SOLVED>Is there a limit on Layers?

Postby StarFire » 18 Feb 2016, 22:54

it can happen :roll:
Dream the Journey, Live the Experience!
User avatar
StarFire
Skyline Founder
Skyline Founder
 
Posts: 1678
Joined: 03 Jan 2012, 18:50
Location: UK
Skill: Great creative
Skill: Programmer
Skill: 3D Modeller
Skill: 2D Artist
Skill: Level Designer


Return to Lua Scripting

Who is online

Users browsing this forum: No registered users and 1 guest