More Awesome Than You!

The Bowels of Trogdor => The Small Intestines of Trogdor => Topic started by: Inge on 2005 November 16, 08:32:33



Title: Create New Object with dynamic GUID
Post by: Inge on 2005 November 16, 08:32:33
I want to do a conditional create of a job object - so the GUID will be read from an attribute on my controller.  I can only find how to create an object with a hard-coded GUID.   Only neighbours can be specified dynamically.    Is there any workaround to this (or some operand I have not discovered?)


Title: Re: Create New Object with dynamic GUID
Post by: J. M. Pescado on 2005 November 16, 09:48:50
According to some old grimy notes I have, setting flag 0x80 in what I think is the 6th box, will cause the creation function to use a GUID inputted inside temp 0/1. This may or may not produce the desired effect. It should be noted that you don't have to create job objects, though: Those are spawned automatically and always lurk offworld and invisible, so unless by "job object", you mean something other than traditional "careers", you probably shouldn't do that.

That, and you'd have to input these GUID values manually from somewhere anyway....


Title: Re: Create New Object with dynamic GUID
Post by: Inge on 2005 November 16, 10:04:53
Well I just accidentally wiped out my off-world job objects from my prison, and I have a need to recreate some of them :D

I wanted to allow my users to choose which prison officer career to associate with each prison, so I was going to dynamically generate a menu of careers, which they can choose from, putting the career GUID from their choice into two attributes.   At that point, the controller was meant to check the career was already spawned as an object or else spawn it.

I can't say I applaud this idea of having all the jobs on every lot.  Especially as each of them is running their own processing every hour to see if any of the sims are employed by them and need to go to work.   There's a hell of a lot of stringerage in memory, and users are making more careers all the time.

Maybe the game will regenerate a killed job object?


Title: Re: Create New Object with dynamic GUID
Post by: J. M. Pescado on 2005 November 16, 10:46:43
The game normally should regenerate a global object like that at every lot reload. As far as I can tell, the impact of an object that cycles approximately once per hour is minimal.


Title: Re: Create New Object with dynamic GUID
Post by: Inge on 2005 November 16, 11:58:30
Ah that's good then, there might not be an issue after all.