Jump to content

timtimman

Members
  • Posts

    32
  • Joined

  • Last visited

Everything posted by timtimman

  1. I don't know anything about layers or how those would work (don't have the CK). But wouldn't you be able to store your lights in the two layers as two different property arrays, and then just use a function to enable/disable all of them by looping through the property array? Light[] Property LightLayer1 Auto Light[] Property LightLayer2 Auto Function EnableAllLights(Light[] LightArray) int i = 0 While (i < LightArray.length) LightArray[i].EnableNoWait() i += 1 EndWhile EndFunction Function DisableAllLights(Light[] LightArray) int i = 0 While (i < LightArray.length) LightArray[i].DisableNoWait() i += 1 EndWhile EndFunction ; then use EnableAllLights(LightLayer1) DisableAllLights(LighLayer2) Or maybe as a RefCollectionAlias (don't quite understand how this works, but you would probably set it in the CK with references to all your lights) making use of EnableAll and DisableAll, which basically should do what the above script does. RefCollectionAlias Property LightLayer1 Auto RefCollectionAlias Property LightLayer2 Auto ; then use LightLayer1.EnableAll() LightLayer2.DisableAll() Hopefully this helps in some way, unless you haven't already solved it.
  2. Before reading on I just want to point out that I do not have the CK or the game on PC and can hence not verify that any of what I write actually works. However, based on all I've read and my understanding so far, this should work or at least be a nudge in the right direction. All I can do is read code and have no idea of the layout of the CK and changing stuff there. So, to continue. To your first question the answer is very simple: States. You code would simply become: Scriptname DashScript extends ActiveMagicEffect State Waiting Auto ; auto tells it to start in this state Event OnEffectStart(Actor akTarget, Actor akCaster) GoToState("Busy") ; sets the script to busy state, but the rest of the event will continue to run #...SOMETHING...# GoToState("Waiting") ; we're done so we can once again be used EndEvent EndState State Busy Event OnEffectStart(Actor akTarget, Actor akCaster) ; leave this empty as we don't want it to do anything if we're in this state EndEvent EndState I think you're original script would work, but the error was that you can't declare properties in script like this: "Bool Property canUse =false Auto". You should have either declared the property false in the CK, or have used a variable since you're script isn't a Const. Edit: You should be able to declare auto properties like that, sorry. Either way, states are the way to go. As for your second question, I'm not sure I completely understand what you're trying to do due to my limited understanding of the CK. But I don't think you can get way from using spells. Those are the only things (from what I've gathered) that can apply MagicEffects. But you can use AddSpell on any actor you wish to apply it to, as well as DispelSpell to remove it's effects. If if you want the LinkToDispell to be a Controller property, you should just define it as such and I think it will show up in the menus correctly: "Controller Property LinkToDispell Auto". I am assuming that you have another script named "Controller". Then just calling it as "LinkToDispell.EndCloakEffect()" should be enough. Otherwise, the way to call functions on remote scripts is through the use of CallFunction. The wiki entry is pretty self explanatory, but this shouldn't be needed in your case. I hope this has helped you somewhat, but I am limited in my situation not having access to the CK.
  3. From what I've gathered the SetAnimationVariableFloat seems to set the lights on/off and their respective attributes of a Light property, set using PlaceAtMe. I've found "flightintensity" (which probably is brightness), "fLightColor", "fDampRate" (maybe for fading?), "fToggleBlend" (either 1.0 or 0.0). As in the context: SetAnimationVariableFloat("flightintensity", 0.0) As for getting it to light up during the day you can use GetCurrentGameTime and have it change brightness and color to mach day and night. As you already know I don't have the CK to play with so this is hopefully the nudge you need to get it to work yourself. Good luck!
  4. Ok. We've fixed the detonator system but we don't know how to trigger a mine by script. These are just the vanilla mines duplicated. We've tried: DamageObjectFireFireTrap Does anyone know how to do it or is it all native functions not available to Papyrus? And in that case we'll need to write our own explosions with the placeAtMe(explosion) thing. Edit: Activate didn't work either...
  5. I'm not looking for GainLOS as you have to "know" what you're looking for (and as pointed out wouldn't be cross hair accurate). And from what I've gathered, it's very intensive with the added negative of making all registered objects persistent. The spell seems to be the best (but not really good) way of doing it. But would require a list with all references in the game (hardly convenient) not to mention that it would need to be updated at least 2 times per second to make a good "search". And it would work on statics (which I would like, but not a biggie). That would all probably be very taxing. I think I'm going to write this off and agree with DDProductions83, fubared. Thank you.
  6. I wonder if it is a way to get the ObjectReference of what you're currently looking at, as in what's in your crosshairs. There should be something since you have things react with the UI popping up "Activate" and such but is there any way to make a function in Papyrus? Or something akin to clicking the item to get the Ref with console up. I simply want to be able to select and manipulate any object. Best I've found so far is GetPlayerGrabbedRef but that only works for items that can be grabbed, and excludes too much not including Actors and other structures. One other way to do it is to have an invisible object with a trigger volume hovering in front of the player and using the OnTriggerEvent. But that doesn't trigger for everything either. Is there a function to find a Ref on a specific coordinate? Or on interception of something else? Any insight would be greatly appreciated.
  7. As the one who wrote the current script (which doesn't work) I was under the impression (for some stupid reason) that OnInit was only called the first time the object was instantiated, which I realize now obviously isn't the case. I haven't quite gotten grasps of Quests yet but will look into it. One question about RefCollectionsAlias (I assumes that's what you mean). If you have references to all mines in there, doesn't that make the mines persistent (never unload) or is that just for straight up defining them as properties? I agree that the stagger effect would be cool but I think using CustomEvents is the better option, you could them stagger anyway based on the distance from you, which I think would be even better. Please do shower me with information (if you have the time) as I don't have a PC capable of running the CK and game so I'm basing all my scripting off of the base scripts and CK wiki + any information I can find. Thanks for you help so far!
×
×
  • Create New...