Page 1 of 1

Decoration Placement Different from Script

Posted: Wed Oct 03, 2012 6:25 pm
by Lark
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:

Code: Select all

defineObject{
  name = "plating",
  class = "Decoration",
  model = "assets/models/env/prison_secret_door.fbx",
  replacesWall = true,
  placement = "wall",
  editorIcon = 92  
  }
If I place the item using the editor, everything looks as desired (for now):
Image
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)
...but I get bad results:
Image
Can anyone help? Thank you! -Lark

Re: Decoration Placement Different from Script

Posted: Wed Oct 03, 2012 6:41 pm
by Lmaoboat
I don't believe you can replace walls one the map has been loaded

Re: Decoration Placement Different from Script

Posted: Wed Oct 03, 2012 11:38 pm
by Neikun
you've given me another alcove idea. :0
If it works, I'll post about it.

EDIT: viewtopic.php?f=14&t=3411&p=35463#p35463

Re: Decoration Placement Different from Script

Posted: Thu Oct 04, 2012 9:45 pm
by Lark
Lmaoboat wrote:I don't believe you can replace walls one the map has been loaded
Thank you, Lmaoboat. That does make sense now. I guess I'll just have to place these manually until I can get some custom graphics going.
Neikun wrote:you've given me another alcove idea. :0
If it works, I'll post about it.
I love your alcoves, Neikun! Thank you for all of your efforts.

I really need custom graphics for this project, but the plates look better than stone for now. I can do the 2D graphics, but I still don't have any idea how to turn them into a model that I can import. I think I need to wait for more tools to be developed. I'll keep working on my scripting and get to that later. Thanks, -Lark

Re: Decoration Placement Different from Script

Posted: Thu Oct 04, 2012 10:28 pm
by Lmaoboat
If you have the room, you could just place empty squares around it so there's no walls there.