Note: This is an archived post that was originally sent to the Hollywood mailing list on Sun, 10 Jan 2010 12:00:34 +0100
Hi!
I learned that the automatic id creation creates id types #LIGHTUSERDATA. SetLayerName() can accept #NUMBER for the first parameter. So, how can I rename a layer that created with auto id?
[10 Jan 2010] #LIGHTUSERDATA, rename layer
- airsoftsoftwair
- Posts: 5443
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
[10 Jan 2010] Re: #LIGHTUSERDATA, rename layer
Note: This is an archived post that was originally sent to the Hollywood mailing list on Sun, 10 Jan 2010 22:24:26 +0100
This won't work. The only thing you can do now is convenient assignment of a name to a layer, e.g.
This will automatically insert the brush under the name "mylayer". You no longer have to hassle with ids if you do it this way.
Um, why is everyone suddenly doing the layer stuff wrong? There is no auto id creation for layers at all... you can't do things like:Hi!
I learned that the automatic id creation creates id types #LIGHTUSERDATA. SetLayerName() can accept #NUMBER for the first parameter. So, how can I rename a layer that created with auto id?
Code: Select all
; BAD CODE!
EnableLayers
new_layer = DisplayBrush(1, 0, 0)
Code: Select all
; GOOD CODE!
DisplayBrush(1, 0, 0, {Name = "mylayer"})
[10 Jan 2010] Re: #LIGHTUSERDATA, rename layer
Note: This is an archived post that was originally sent to the Hollywood mailing list on Sun, 10 Jan 2010 23:42:16 +0100
Hello Andreas
Ok, so the new syntax let me change:
to just this:
That's great. Thanks to clarify that.
Hello Andreas
Ok, so the new syntax let me change:
Code: Select all
InsertLayer(0,#ANIM,id, x, y, True)
SetLayerName(0,"hal")
Code: Select all
DisplayAnimFrame(id, x, y,1,{hidden=True, name="hal"})
- airsoftsoftwair
- Posts: 5443
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
[11 Jan 2010] Re: Re: #LIGHTUSERDATA, rename layer
Note: This is an archived post that was originally sent to the Hollywood mailing list on Mon, 11 Jan 2010 12:10:41 +0100
Yep, exactly. You can even specify the insert position using the "InsertPos" tag. You can work entirely without using any hardcoded layer IDs. You can just work with names.Hello Andreas
Ok, so the new syntax let me change:
InsertLayer(0,#ANIM,id, x, y, True) SetLayerName(0,"hal")
to just this:
DisplayAnimFrame(id, x, y,1,{hidden=True, name="hal"})