dantedevil
Well-known member
I have this entity that in the header of its txt has setlayer -2. This entity is characterized by having many custom animations, plus I always place it against the background.
Now I'm going to use one of their custom spawns, but I want to put it ahead of the players (like a frontpanel).
Because this entity already have a lot of "follows", instead of creating an anim follow new with different setlayer, I thought about placing the setlayer, in the spawn in level script.
So here my try:
Unfortunately, it did not work ...
Am I doing something wrong, or is that the setlayer function can not be used in the spawn in level?
Code:
spawn codes
@script
void main() {
performattack(getlocalvar("self"), openborconstant("ANI_freespecial1"));
} @end_script
coords 143 188
flip 1
at 0
Now I'm going to use one of their custom spawns, but I want to put it ahead of the players (like a frontpanel).
Because this entity already have a lot of "follows", instead of creating an anim follow new with different setlayer, I thought about placing the setlayer, in the spawn in level script.
So here my try:
Code:
spawn codes
@script
void main() {
void self = getlocalvar("self");
changeentityproperty(self, "setlayer", 2);
}
performattack(getlocalvar("self"), openborconstant("ANI_freespecial2"));
}
@end_script
coords 370 271
flip 1
at 0
Unfortunately, it did not work ...
Am I doing something wrong, or is that the setlayer function can not be used in the spawn in level?
Last edited: