Jump to content

Is it possible .... ?


Recommended Posts

Good evening (again)!

 

For a mod that I plan to make I would like to ask, if a few things that I had in mind are actually possible within Fallout4:

 

  1. Can you make smoke (from a fire or something) follow a curved wall up, so that it does not "clip" straight through it?
  2. Can you somehow make a script that gets the current height above ground of an object?
  3. Can you "group" multiple static objects and doors (and their door-markers) together and move them all at once with a script? The "move something with script" would be possible, but the door thing?
  4. Can you make a script do something if a global variable has a certain value? For example enable a fire if a global variable == 1. Where wouldI "put" this script? Attatch it to the object that should be enabled? But how do I make it "update" to check the global variable every time, not only when it is loaded? It would be nice if there was something like an "interrupt" function that does something if a certain condition is met, no matter what else is going on at that moment.
    (I am a bit fammiliar with "scripting" but for me the most difficult question is always "What do I attatch the script to?")

That would be all for now. Maybe you can already tell from the questions what I am planning to do :wink:.

Link to comment
Share on other sites

 

4. Can you make a script do something if a global variable has a certain value? For example enable a fire if a global variable == 1. Where wouldI "put" this script? Attatch it to the object that should be enabled? But how do I make it "update" to check the global variable every time, not only when it is loaded? It would be nice if there was something like an "interrupt" function that does something if a certain condition is met, no matter what else is going on at that moment.

Curious, although not sure, if Globals are able to work that way. What i could think of, if supposed to be used internally and have a unified style, an alternative GlobalVar might be created as a script Property for an object (e.g. a script for a unique XMarker instance, or maybe a Quest). Property Set func should send a custom event then (possibly, depending on the input value), and all objects of interest should catch that - gonna work like a broadcast interrupt. https://www.creationkit.com/fallout4/index.php?title=Custom_Papyrus_Events

In theory, a circular timer can be created to monitor existing Globals and send the interrupt (or perform an action directly), that's not very performance-friendly way, i think, depends.

ps. Or maybe a script (which sends "interrupt" events OnEffectStart/End) bound to a conditional magic effect, sitting on the player.

Edited by hereami
Link to comment
Share on other sites

Thanks for the quck reply!

I just remembered that you could use the "condition" thing for quest stages to check the value of a global variable. I think that would work for this.

I thought that if I attatch the script to a object it will only run once when the object is loaded or activated or whatever. (onEvent)

I am not really used to this type of "programming". I mean I did a bit of scripting for Skyrim, but that was something simple, like if you activate something the script does stuff.

But yesh, I think the quest stage condition thing might work for this.

So that's one of the (so far) four questions answered ...

Thank you!

Link to comment
Share on other sites

 

But yesh, I think the quest stage condition thing might work for this.

Not like that. Quest was meant as a parent/owner for a script. You need to track global's change moment in some other way, if really need a native Global. Again, conditional spell/mgef seems the best, most simple at least. A Mgef script will initiate tasks OnEffectStart/OnEffectEnd (either cast Event, or handle objects directly, or set quest stage etc.), and all of value tracking job is done by game.

But some dummy quest is needed anyway - to apply the spell to player.

2. What for? If needed for npc-activator interaction, GetActivationHeight condition may be used. Don't know how to determine height of landscape above zero at a given coordinate, unless that's an npc standpoint.

Link to comment
Share on other sites

 

 

But yesh, I think the quest stage condition thing might work for this.

Not like that. Quest was meant as a parent/owner for a script. You need to track global's change moment in some other way, if really need a native Global. Again, conditional spell/mgef seems the best, most simple at least. A Mgef script will initiate tasks OnEffectStart/OnEffectEnd (either cast Event, or handle objects directly, or set quest stage etc.), and all of value tracking job is done by game.

But some dummy quest is needed anyway - to apply the spell to player.

2. What for? If needed for npc-activator interaction, GetActivationHeight condition may be used. Don't know how to determine height of landscape above zero at a given coordinate, unless that's an npc standpoint.

 

What? (Sorry if I don't understand / seem too stupid)

Do you mean I check the global variable with the "conditions" thing of the "magic effect"? And attatch the script i want to run to that magic effect? Wouldn't that be basically the same as using the quest stage condition thing?

 

2. Yeah, I know there is a way to determine the distance between 2 objects with a script. So I maybe I could "spawn" a MISC object, wait a bit (for it to fall to the ground), get the distance to the fallen object and then delete it, so I don't leave trash everywhere.

You ask why I would need distance to ground: I know this might be a bit to difficult to realize for a "beginner" like me, but for Skyrim there was a mod that added a player controlled airship to the game that you could fly around with. Would be awsome if something like that were in FO4 .... And it would be nice if you got a warning when you get too close to the ground, right?

And no I haven't really startet on this, at the moment I am just trying to figure out if it would even be possible.

And some of the questions I asked are for "something else" that I am working on, especially the question about smoke going up a curved wall without ugly clipping ......

Link to comment
Share on other sites

 

 

  1. Can you make smoke (from a fire or something) follow a curved wall up, so that it does not "clip" straight through it?

 

Are you talking about an FX? Smoke is animated so you would have to animate it to curve, or it may be possible to do it in the nif file. I am not sure, or maybe use some of the ones in game and place them at an angle going up the wall?

Edited by MisterRADical
Link to comment
Share on other sites

 

 

 

  1. Can you make smoke (from a fire or something) follow a curved wall up, so that it does not "clip" straight through it?

 

Are you talking about an FX? Smoke is animated so you would have to animate it to curve, or it may be possible to do it in the nif file. I am not sure, or maybe use some of the ones in game and place them at an angle going up the wall?

 

Ok, that "place it at an angle" might work until I get comfortable enough with 3DSMAX to do animation stuff. Thanks!

Link to comment
Share on other sites

 

Do you mean I check the global variable with the "conditions" thing of the "magic effect"? And attatch the script i want to run to that magic effect? Wouldn't that be basically the same as using the quest stage condition thing?

Condition goes to spell, script goes to mgef. Conditions for a quest stage are only checked at the exact moment, when stage is set, conditions for a spell effect are evaluated constantly and control, if the effect is active or not, thus reflect changes immediately (approx. 1 sec).

 

Airship drone in Skyrim? Cool...

Link to comment
Share on other sites

 

 

Do you mean I check the global variable with the "conditions" thing of the "magic effect"? And attatch the script i want to run to that magic effect? Wouldn't that be basically the same as using the quest stage condition thing?

Condition goes to spell, script goes to mgef. Conditions for a quest stage are only checked at the exact moment, when stage is set, conditions for a spell effect are evaluated constantly and control, if the effect is active or not, thus reflect changes immediately (approx. 1 sec).

 

Airship drone in Skyrim? Cool...

 

Ahhhh ... I think I get it!

Yeah, I tried to use the QuestStage condition and it didn't work right.

By the way, the Skyrim mod I was talking about is here (I didn't create it, of course): https://www.nexusmods.com/skyrim/mods/24234

Link to comment
Share on other sites

  • Recently Browsing   0 members

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