Decoration Placement Different from Script
Posted: Wed Oct 03, 2012 6:25 pm
I want to make an alcove (one square "room") with different walls from a script. I have defined a custom object as follows - while I want a different image (rough wooden walls without pillars), that's well beyond me for now:
If I place the item using the editor, everything looks as desired (for now):
However, I want to place the different walls automatically via a script that does other things too:'
...but I get bad results:
Can anyone help? Thank you! -Lark
Code: Select all
defineObject{
name = "plating",
class = "Decoration",
model = "assets/models/env/prison_secret_door.fbx",
replacesWall = true,
placement = "wall",
editorIcon = 92
}
However, I want to place the different walls automatically via a script that does other things too:'
Code: Select all
spawn("plating", self.level, self.x, self.y, (self.facing+1)%4)
spawn("plating", self.level, self.x, self.y, (self.facing+2)%4)
spawn("plating", self.level, self.x, self.y, (self.facing+3)%4)
Can anyone help? Thank you! -Lark