Jump to content

Glowing items


raney

Recommended Posts

I'm new to the mod-developing scene, so there are a lot of things that I haven't yet learned about. I've done stuff with scripting in other game-development engines, so I'm not coming at this entirely in the dark. It's more like, I want to know if certain things are possible within the framework Bethesda's offered. I've been trying to come up with an idea for a good "starter mod"; one that could get me into the swing of things while also offering something that hasn't been done yet. I'm going to pitch one of my ideas, just to see if it's even possible.

 

The gist of it is, I want to make takeable items of a certain type "glow" when you are near and ready to take them. I'm not talking about replacing a texture with a brighter one, or using a glowmap to make items stand out. Rather, an effect that makes the item slowly fades in and out between its normal color and a slightly brighter one. The idea is simple, but I don't know if the execution is possible. If I were to do this in pseudo-code, it would look something like:

 

ITEM SCRIPT

if ((PLAYER.DISTANCE < N) & (PLAYER.HAS ME IN HIS OR HER SIGHTS :O))

{

while((t % 1/w) != 0){ // for one full period

object.brightness = 100 +A - A*cos(w*t); // Assuming 100 is like the default brightness or something

// Also, t is some magic global time variable that always increases so I don't have to worry about anymore loops

// I guess I could've done a for loop and declared t outside. d'oh.

}

object.brightness = 100; // just in case.

}

 

So the item will start glowing as soon as you look at it while close. It will then (hopefully) smoothly fade back to its default brightness either when the player looks somewhere else, or moves away a sufficient distance.

 

I'm sure there are means to determine if the player is close to an actor, and if the actor falls within the crosshair. Items already do these things and display "Take $ITEM_ID." What I do not know, is if it's possible to edit or amend the script that all items rely upon, and also if it's possible to set the brightness of an item.

 

The effect wouldn't be very useful, but it'd be one of those aesthetic enhancements that I think would feel pretty cool. So, is it possible? I'd like to get some feedback from someone who has experience scripting in...whatever it is Skyrim uses (I'll dig in deeper after I finish my grad school apps, promise!)

Link to comment
Share on other sites

  • Recently Browsing   0 members

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