PDA

View Full Version : SetLayerByName only goes through half the time...



wettechsupport
06-10-2012, 10:25 PM
I'm making a turn based system, so it's VERY important to move things-- such as the command selector-- on top of other things.

I use an entity called "Command" selector to go through things such as "Fight", "Magic," etc.


function OnPostInit() //run during the entity's first logic update
GetInputManager:AddBinding("down", "OnDown", this:GetID());
GetInputManager:AddBinding("up", "OnUp", this:GetID());
GetInputManager:AddBinding("return", "OnEnter", this:GetID());

this:SetLayerByName("GUI 3");
end

For some reason, the SetLayerByName works on the first party member but not the second (even though it's the same entity script). Are there only specific conditions that SetLayerByName() works?

Seth
06-12-2012, 02:38 AM
I'm making a turn based system, so it's VERY important to move things-- such as the command selector-- on top of other things.

I use an entity called "Command" selector to go through things such as "Fight", "Magic," etc.


function OnPostInit() //run during the entity's first logic update
GetInputManager:AddBinding("down", "OnDown", this:GetID());
GetInputManager:AddBinding("up", "OnUp", this:GetID());
GetInputManager:AddBinding("return", "OnEnter", this:GetID());

this:SetLayerByName("GUI 3");
end

For some reason, the SetLayerByName works on the first party member but not the second (even though it's the same entity script). Are there only specific conditions that SetLayerByName() works?

Hmm, no, it should work all the time. One idea is search all the examples for "SetLayerByName" and see if they use it any differently or if you can get them to show the same bug.