Script not running.

Discussion about Mods for Prison Architect

Moderator: NBJeff

Rufus
level1
level1
Posts: 25
Joined: Wed Oct 10, 2012 5:39 pm

Script not running.

Postby Rufus » Sun Sep 07, 2014 12:32 pm

I have a script in mod/scripts/name.lua I have an object called name. The script won't run. I know I spelt everything right, etc and I tried putting a simple tooltip setter in the create function for debugging but even that doesn't show up. Are there any common mistakes anyone knows about?
Suthek
level1
level1
Posts: 29
Joined: Mon Sep 01, 2014 5:23 pm

Re: Script not running.

Postby Suthek » Sun Sep 07, 2014 12:42 pm

Did you give your object the Scripted-property?
Rufus
level1
level1
Posts: 25
Joined: Wed Oct 10, 2012 5:39 pm

Re: Script not running.

Postby Rufus » Sun Sep 07, 2014 5:29 pm

I didn't even know that was a thing. Please, elaborate.
Suthek
level1
level1
Posts: 29
Joined: Mon Sep 01, 2014 5:23 pm

Re: Script not running.

Postby Suthek » Sun Sep 07, 2014 8:12 pm

You add the line

Properties Scripted

to your object in the materials.txt. That tells the game that there's a script file it needs to pay attention to.
User avatar
Phraxas
level2
level2
Posts: 107
Joined: Sun Aug 31, 2014 12:10 am
Location: USA - PA

Re: Script not running.

Postby Phraxas » Mon Sep 08, 2014 3:39 pm

That would definitely be the most major issue. If it still doesn't run, I'd think "name" would be reserved. But I think the real issue is that you didn't plug it in.. ie. call it scripted.
Rufus
level1
level1
Posts: 25
Joined: Wed Oct 10, 2012 5:39 pm

Re: Script not running.

Postby Rufus » Mon Sep 08, 2014 4:24 pm

Yep, scripted works - thanks!

Return to “Modding”

Who is online

Users browsing this forum: No registered users and 2 guests