Aller au contenu

Photo

A tool to fix placeables that don't work when you click on them


  • Veuillez vous connecter pour répondre
7 réponses à ce sujet

#1
Tchos

Tchos
  • Members
  • 5 054 messages

Here's yet another topic whose appropriate subforum is unclear, since this topic is about playing the official campaigns, playing user-made modules, scripting, and mistakes in building. 

 

Sometimes I might be playing a module and find that a chest or another usable object does nothing when I click on it, and I know that it's supposed to.  I, and many other modders here, know that this is the result of a placeable having 0 hit points, usually caused by converting an environmental object into a placeable.  Most non-modding players probably would not know this.

 

In the past, if I've wanted to find out what was in that chest or fire whatever script was supposed to fire when clicking on the object, I've gone into the toolset to see, and add HP to the object, but had to revert to an older save if I had one, since changes in placed objects don't take effect in a saved game if you've visited the area.  Quite a bother.

 

I recently wrote a script to add hit points to an object while playing the game, by selecting it and running the script.  I had to try a lot of methods, but ultimately it works as intended -- the objects become able to fire their scripts, open their inventories, or whatever they were supposed to do.  Would others find this useful?


  • GCoyote aime ceci

#2
kamal_

kamal_
  • Members
  • 5 250 messages
Does it work immediately, so you can run it and things now work without having to leave the game?

#3
Tchos

Tchos
  • Members
  • 5 054 messages

Yes.  Target a faulty object, run the script, wait 1 second, and use the object.



#4
Carcerian

Carcerian
  • Members
  • 1 108 messages

Workaround: As a possible alternative, when a player can't reach a PLC's "activation node", instead make the "real" PLC unselectable, and make a smaller or invisible object fire your script instead (adjust Z-Axis as required)



#5
GCoyote

GCoyote
  • Members
  • 341 messages

Crap, now I have to recheck all the work I did last week.  :angry:

 

Thanks for the info and yes, I would like to see the script.  ;) 



#6
Tchos

Tchos
  • Members
  • 5 054 messages

Carcerian: You seem to be describing a different problem.  This is about placeables that the builder mistakenly left with 0 hit points, which cannot be activated.  The script allows the player within the game to correct this problem immediately without opening the toolset. 

 

It would be possible to address the problem you mention in a similar script, which would deactivate a nearby placeable and spawn a copy of the placeable in a script that the player can run through the console like this one, but it would be solving a different problem, not being a workaround to the problem described here.



#7
GCoyote

GCoyote
  • Members
  • 341 messages

Okay, I just rechecked the work I did last week and a half dozen objects had this bug.  Talk about timing!

 

Thanks guys!  :)



#8
Tchos

Tchos
  • Members
  • 5 054 messages

Glad to have prevented your module from needing a script like this.  :)  I'll post it as a project on the usual sites soon, though.


  • GCoyote aime ceci