Jump to content

Red Diamond Recon Marker. Mesh and Texture?


Recommended Posts

On my God, this is so useful. I will take close look at your poses. And by the way, do you happen to know if there is a way I can do a real time scanning that is more efficient than onTimer event? I was thinking to use onTimer to scan nearby characters (except player) each 1s, and doing a while loop with FindRandomActor function that has area like 1000 game units. Then I can probably get rid of the awful projectile (only can pentrate small transparent -> suck) and the awful particle effects.

Link to comment
Share on other sites

I'd suggest OnDistanceGreaterThan combined with FindRandomActor. I'd used this method before, but for static objects, anyways NPCs don't use to move very far from their spots.


The idea is dropping an xMarker and search for a random actor at a certain radius, at same time register for a distance event, when the distance between the player and the xMarker is greater than the radius you move the xMarker to the player (move the xMarker reference instead of dropping a new one) and search for an actor again, and so on.


If you use a small radius, you'll be searching more frequently than using a big radius, but obviously in a smaller area.

Edited by DieFeM
Link to comment
Share on other sites

I never thought about that. Doing a small area will avoid to rapidly find a same actor. This should do the trick. I guess I will drift a script here (tomorrow or after tomorrow), so you guys may take look or throw comments here whenever you like. Again much appreciated for the help.

 

In addition, I have one question about FindRandomActorRef function, so if we use player as the center and searching for nearby actor reference, assuming we have 5 actors (including player self) in the valid area, how many time the FindRandomActorRef function needs to run in order to find all actors without repeated actor reference? I know this function just return a single actor not an actor array.

Link to comment
Share on other sites

In addition, I have one question about FindRandomActorRef function, so if we use player as the center and searching for nearby actor reference, assuming we have 5 actors (including player self) in the valid area, how many time the FindRandomActorRef function needs to run in order to find all actors without repeated actor reference? I know this function just return a single actor not an actor array.

 

If what you want is finding all actors then that's not the appropriate function for your use case, you could use FindAllReferencesWithKeyword(Form arKeywordOrList, float afRadius) instead. For example, depending on what kind of actors you want find, you can use on keyword or a From List of keywords for the first arguments, just for humanoid actors you could use ActorTypeNPC.

 

Searching from the xMarker:

 

ObjectReference[] kActorArray = xMarkerRef.FindAllReferencesWithKeyword(ActorTypeNPC, 9000)

 

Then you can iterate the resulting array, discard dead ones, and add the ones you want to a reference collection that manages how the actors are treated, like adding keywords, packages, whatever you need, and also handling the removal from such collection on death by attaching a script to the collection with the event OnDeath and call RemoveRef. You could do all of that in this same script, but I think that could slow dawn the processing of the script if there are too many actors, so using a ref collection alias seems like a better distribution of the workload.

Link to comment
Share on other sites

Actually, is any keyword or keyword formalist I can use to find ALL Actors regardless of their race, gender, ally, hostile enemy, faction,etc? If the NPC is the actor form then it will be selected, something like that.

 

You can use SUP_F4SE function "Find all actors in cell". Incredible plugin.

 

https://www.nexusmods.com/fallout4/mods/55419

But also a cloak magic effect will work if you set the condition to "IsActor". You can then tag them with a keyword, put them in an array (formlist works too), send a custom event or just interact with them directly from within the ActiveMagicEffect script. Beware the misleading parameter names though, range is defined by "magnitude" not "range", which is very weird but once you know it you know it.

Link to comment
Share on other sites

Actually, is any keyword or keyword formalist I can use to find ALL Actors regardless of their race, gender, ally, hostile enemy, faction,etc? If the NPC is the actor form then it will be selected, something like that.

 

In the CK, click on FormList, and create a new one, keep it open. Then go to keywords and filter by ActorType, it will show only actor type keywords, drag & drop them all in the form list, give whatever ID to the FormList and click ok to save it.

Then add a property in your script pointing to this FormList. By using it in FindAllReferencesWithKeyword as the arKeywordOrList argument you should find all kind of actors.

 

I don't think you actually want to target all actor types, for example turrets are actors, I don't think you want it to find turrets, do you?

So, you might want to check "Use Info" to find out what records use some of those keywords.

Link to comment
Share on other sites

 

But also a cloak magic effect will work if you set the condition to "IsActor". You can then tag them with a keyword, put them in an array (formlist works too), send a custom event or just interact with them directly from within the ActiveMagicEffect script. Beware the misleading parameter names though, range is defined by "magnitude" not "range", which is very weird but once you know it you know it.

 

This is great. I guess now I need to plan how to make this work. And I think the entire commonwealth is considered as one cells, so I'm not sure "Find all actors in cell" is good idea.

 

 

I don't think you actually want to target all actor types.

 

(Actually, I do. Any potential hostile or friendly target. And also you have some really great ideas about keyword stuff I think I can also detect some activators like traps and mines. I know its weird I use DetectLive as my spell name. I think I should change the name to hyper sense something like that).

 

Very inspiring and much appreciate you guys. I'm ready to start working on it. See you guys a day or two.

Link to comment
Share on other sites

For a tuneup, starting a finder quest to fill a ReferenceCollectionAlias with objects based on conditions can be A LOT faster/less overhead than the papyrus script find functions if you have to then iterate the found array for filter conditions.

 

I am migrating most of my (many) solutons that call repeat finds OnDistanceGreater for complete uGrids coverage from Papyrus to use finder quests.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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