Thankfully, all matters pertaining to the database issues have now been sorted, and I have been able to return to adding to the module content in general. This has included more conversations, decorating some areas and basically adding content in different areas as I decide to do it. And it was as I was adding one piece of content involving a placeable object, I made a discovery regarding hitpoints of objects: If a placeable is not given any hitpoints, then it can have a different reaction with script.
Should I Stay or Should I Go?
I designed a placeable object that presents the player a GUI when they click on it. However, I discovered (after comparing another placeable object to this one), that where the new object had zero hitpoints (HPs) assigned to it, a PC would not move up to the object (as if interacting with it) before presenting the GUI. On the other hand, if the same placeable was assigned a few HPs, then the PC would run up to the object as if interacting with it just fine.
What Shall I do?
Furthermore, I discovered that a placeable with or without HPs will also elicit a different response from the script attached to it. This is a little hard to explain, but it's as if a placeable without any HPs is treated as a "non-responsive" object compared to one that does have HPs. Now, this may be obvious to some builders (and already known by them), but I had no idea that this distinction of HPs for placeables had, and is why I am now mentioning it in case others did not know either. For instance, in the same test, the placeable with no HPs would not fire another script attached to it when certain variables are met, compared to the placeable that did have HPs associated with it!
The Script Function
The function involved in the initial script I was using is GetPlaceableLastClickedBy. Whether the responses I was having are restricted to this single function or not, I do not know. However, if you do use it, or have found PCs not responding to placeables in the way you might expect, then check the placeable's HPs, as it makes a difference as to whether they have any or not!
New Area Design
On another point, I am pleased to report that Ryan of Eguintir's Ecologies is hard at work finishing off/designing a couple of interior areas for me. Ryan has already designed some areas for The Scroll (Pt 2), but these latest additions will be used in The Scroll (Pt 1). When these two interior areas have been finished, only one or two minor interiors remain, requiring minimal work.
I thank my readers again for their patience with me on this project, and I hope their patience will be rewarded with an exciting module to play. The amount of time to develop a module does not guarantee such of course, but I do hope the wait will be worth it one way or another.
4 comments:
One point I'll add. If you convert a placeable to an environmental object, and then convert is back, it both no longer has hit points even if it did before, and has it's faction set to player (hostile is the default faction for placeables).
But yes, objects need hit points to run scripts or have conversations.
Good point Kamal. Env to Plc and vice versa. I forgot to mention that as well ... and it is well worth mentioning, as I only discovered that a short while ago as well!
Lance.
What do you know.
I never bothered to look at the stats when returning an object to a placeable from an environmental object. I figured it was just a toolset bug that wrecked the object and made it so scripts wouldn't fire.
Hi Shaughn,
Yes, it is hard to recognise when things are "broken" or simply altered in some way. This was one of those discoveries that was useful to know ... hence the blog.
Lance.
Post a Comment