Decoration Placement Different from Script

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
Post Reply
User avatar
Lark
Posts: 178
Joined: Wed Sep 19, 2012 4:23 pm
Location: Springfield, MO USA

Decoration Placement Different from Script

Post 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
Lmaoboat
Posts: 359
Joined: Wed Apr 11, 2012 8:55 pm

Re: Decoration Placement Different from Script

Post by Lmaoboat »

I don't believe you can replace walls one the map has been loaded
User avatar
Neikun
Posts: 2457
Joined: Thu Sep 13, 2012 1:06 pm
Location: New Brunswick, Canada
Contact:

Re: Decoration Placement Different from Script

Post 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
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
  • Message me to join in!
User avatar
Lark
Posts: 178
Joined: Wed Sep 19, 2012 4:23 pm
Location: Springfield, MO USA

Re: Decoration Placement Different from Script

Post 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
Lmaoboat
Posts: 359
Joined: Wed Apr 11, 2012 8:55 pm

Re: Decoration Placement Different from Script

Post by Lmaoboat »

If you have the room, you could just place empty squares around it so there's no walls there.
Post Reply