

Moderator: NBJeff
knoest26 wrote:The reason he's sideways is because you probably set the rotatetype wrong and the reason he doesn't move is because he doesn't need to move.
The is no reason for him to move as he's not coded to wander around when he's idle and probably doesn't have a job
dsdude123 wrote:Ah, what should it be set to?
Phraxas wrote:dsdude123 wrote:Ah, what should it be set to?
0,0
knoest26 wrote:The reason he's sideways is because you probably set the rotatetype wrong and the reason he doesn't move is because he doesn't need to move.
The is no reason for him to move as he's not coded to wander around when he's idle and probably doesn't have a job
pcgrosen wrote:Entities seem to have a "JobId" property, and all jobs are given a number. Unfortunately, I don't think you can actually get the JobId for a given job, as Object.CreateJob() doesn't return anything. There may still be other ways to assign jobs, which I am looking into right now. I'll update with more info.
EDIT: Annnnnnnd it took me all of 20 seconds! If you define the job with the "Worker" attribute as the name of your entity, the entity should move to perform the job.
Code: Select all
BEGIN Job
Name TendVegetables
JobTime 0.1
Tool Trowel
Worker Prisoner
Qualification Horticulture
END
Code: Select all
Worker SystemAdministrator
Code: Select all
BEGIN Job
Name RepairComputer
JobTime 1.0
Tool Screwdriver
Worker SystemAdministrator
END
Code: Select all
Object.CreateJob("RepairComputer")
pcgrosen wrote:Here's what I mean:Code: Select all
BEGIN Job
Name TendVegetables
JobTime 0.1
Tool Trowel
Worker Prisoner
Qualification Horticulture
END
This is from the Vegetable Patch example mod. You could change the "Worker" line to something like this:Code: Select all
Worker SystemAdministrator
That would call the Systems Administrator to tend the vegetables. If you changed the other lines, too, you could come up with a more fitting job:Code: Select all
BEGIN Job
Name RepairComputer
JobTime 1.0
Tool Screwdriver
Worker SystemAdministrator
END
Then, inside of your script, you can call the function to create a job:Code: Select all
Object.CreateJob("RepairComputer")
I believe that would give you a functioning job for your System Administrator to perform.
Users browsing this forum: No registered users and 3 guests