Jump to content

Recommended Posts

I am currently making something that is supposed to be repaired through the settlement menu before it can be used, but I am having trouble setting a stage to which it is already destroyed. I have made it so that it does self dps, I have tried editing its health perc, and I can't seem to get it to be able to be repaired without having to shoot it myself. I don't know what the issue is, as I've tried everything... Is there something I am missing?I am currently making something that is supposed to be repaired through the settlement menu before it can be used, but I am having trouble setting a stage to which it is already destroyed. I have made it so that it does self dps, I have tried editing its health perc, and I can't seem to get it to be able to be repaired without having to shoot it myself. I don't know what the issue is, as I've tried everything... Is there something I am missing?

Link to comment
Share on other sites

Sorry if this is an unhelpful question, but why do you want something that has to be repaired as soon as it has been made? If it's just to make the player spend more resources, why not change the recipe for it?

 

Is it possible to have a script basically drop a small grenade on the object? A custom explosive with a tiny blast radius? My thinking being the game has some sort of logic against an object killing itself. What if you just damage the object via scripting and blame the damage on something besides the object itself? Idk if there's a function for that.

 

Another idea, is this an object that a player is only going to build one of? You could add an activate via a perk that says repair, which grants them the ability to use the object.

Link to comment
Share on other sites

Sorry if this is an unhelpful question, but why do you want something that has to be repaired as soon as it has been made? If it's just to make the player spend more resources, why not change the recipe for it?

 

Is it possible to have a script basically drop a small grenade on the object? A custom explosive with a tiny blast radius? My thinking being the game has some sort of logic against an object killing itself. What if you just damage the object via scripting and blame the damage on something besides the object itself? Idk if there's a function for that.

 

Another idea, is this an object that a player is only going to build one of? You could add an activate via a perk that says repair, which grants them the ability to use the object.

Ever heard of repairable sanctuary? Yeah, trying to make an updated version.

Link to comment
Share on other sites

Sorry if this is an unhelpful question, but why do you want something that has to be repaired as soon as it has been made? If it's just to make the player spend more resources, why not change the recipe for it?

 

Is it possible to have a script basically drop a small grenade on the object? A custom explosive with a tiny blast radius? My thinking being the game has some sort of logic against an object killing itself. What if you just damage the object via scripting and blame the damage on something besides the object itself? Idk if there's a function for that.

 

Another idea, is this an object that a player is only going to build one of? You could add an activate via a perk that says repair, which grants them the ability to use the object.

I looked into a script that can damage the object and it is possible, however, I don't have much experience in scripts... Is there a tutorial you can recommend?

Link to comment
Share on other sites

So I made a simple script that damages the object, but it failed to compile with just one error... Any help would be awesome! Here's the script:

 

Scriptname DYDJC_DamageObject extends ObjectReference Native
; Damages bridge or house.

Event OnInit()
ObjectReference.DamageObject(100.0)
EndEvent

 

And the error:

 

DYDJC_DamageObject.psc(5,17): cannot call the member function DamageObject alone or on a type, must call it on a variable.

Link to comment
Share on other sites

If the script is attached to the object which should be damaged, use:

Self.DamageObject(100.0)

or even shorter:

DamageObject(100.0)

The other thing is: I'm in doubt that you can use "Native" for your script. I think, you may use "Static" though.

Scriptname DYDJC_DamageObject extends ObjectReference Native
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...