Jump to content

Swat715

Members
  • Posts

    28
  • Joined

  • Last visited

Posts posted by Swat715

  1.  

    Im adding the new object refrence to the power switch? and then replacing the whole thing?

    Yes that will work but also setup the new object as the enable parent for the spark/smoke/sound effects.

    The script has only changed by adding 2 lines to enable/disable the marker so just adding those 2 lines would be enough (starting from Event the 4th and the 9th line where added).

     

     

    okay so whenever I add effects just use the enable marker as the parent and I wont have to worry about scripts?

  2.  

    There is an EnableMarker in the statc category that you can use. Place one (these are invisible in game) and use that as the enable parent.

    Then in the script add a property: (ObjectReference Property EnableMaker Auto) fill it with the ref for the enableMarker and change the script to this:

    Event OnActivate(ObjectReference akActionRef)
        If ActivatorRef.IsDisabled();if the teleporter activator is disabled enable it
            ActivatorRef.Enable();disables the teleporter activator
            EnableMaker.Enable()
            EmitterRef.PlayGamebryoAnimation("stage3loop", True);starts animation stage3loop
            SoundEffectIncetanceID = OBJTeleporterJammerLP.Play(EmitterRef);starts the sound effects
        ElseIf !ActivatorRef.IsDisabled();if the teleporter activator is enabled disable it
            ActivatorRef.Disable();enables the teleporter activator
            EnableMaker.Disable()
            If SoundEffectIncetanceID ; checks if there is sound playing
                EmitterRef.PlayGamebryoAnimation("stage1", True); stops the animation
                Sound.StopInstance(SoundEffectIncetanceID) ;stops the audio loop
                ;SoundEffectIncetanceID = None ; clears the inctance property so the script knows there is no sound playing
            EndIf
        EndIf    
    EndEvent
    

     

    Im adding the new object refrence to the power switch? and then replacing the whole thing?

  3. You are amazing! it works! i cant thank you enough, seriously! is how hard would it be to add little effects here in there like sparks and smoke just minor stuff like that later? just to give the area the feeling like theres power. (if that makes sense lol) and 2 minor problems with the teleporting is when you load up the game it makes the same sound as when you teleport. and when you teleport it hurts you. other than that its golden.

  4. Just wanna double check I changed the right one

     

    Event OnActivate(ObjectReference akActionRef)
    If ActivatorRef.IsEnabled()
    ActivatorRef.Disable()
    EmitterRef.PlayGamebryoAnimation("stage3loop", True)
    SoundEffectIncetanceID = OBJTeleporterJammerLP.Play(EmitterRef)
    ElseIf !ActivatorRef.IsDisabled()
    ActivatorRef.Enable()
    If SoundEffectIncetanceID
    EmitterRef.PlayGamebryoAnimation("stage1", True)
    Sound.StopInstance(SoundEffectIncetanceID)

    EndIf
    EndIf
    EndEvent

  5. Okay so here's what I've got.

     

    ActivatorRef 00CustomSwat715_Activator (Teleporter)

    EmiterRef 00Custom_Swat715_Emitter (Emitter)

    OBJTeleporterJammerLP OBJTeleporterJammerLP (Autofill)

     

    And this script is on the power Switch activator and the teleport script is on the teleport activator.

    the only thing I can think of is maybe sense I'm using a custom id reference for them?

  6. So I booted up the game and activated the power switch and nothing happened. Either I put the script in the power switch but it was suppose to go into the teleport activator or I might have messed up the properties? For the activatorRef is that suppose to be the power switch or teleporter?

  7. These errors are because the default script adds a const flag to the end of the scriptname (first line of the script) if you remove that it should work.

     

    Scriptname Swat715_EmitterActivator:Swat715_EmitterActivator extends ObjectReference Const ObjectReference Property ActivatorRef Auto

     

    That one? and if so just the const or everything after?

  8. The compilation error is because I made a mistake in the script i posted the line: SoundEffectIncetanceID = None won't work because you can't set an int property to none. If you remove that line it should work.

    with store power state i mean create a global variable that you can then reference somewhere else to check if the power is on or not (default value = 0 when powered set it to 1)

    you can do this with NamOfGlobal.SetValue(1) to change it to 1. You can read the value with NameOfGlobal.GetValueInt()

     

     

     

    Swat715_EmitterActivator\Swat715_EmitterActivator.psc(3,25): const scripts may only contain const auto properties. Property ActivatorRef cannot be defined

     

    Swat715_EmitterActivator\Swat715_EmitterActivator.psc(3,25): const scripts may not contain data, script variable ::ActivatorRef_var cannot be defined

     

    Swat715_EmitterActivator\Swat715_EmitterActivator.psc(4,25): const scripts may only contain const auto properties. Property EmitterRef cannot be defined

     

    Swat715_EmitterActivator\Swat715_EmitterActivator.psc(4,25): const scripts may not contain data, script variable ::EmitterRef_var cannot be defined

     

    Swat715_EmitterActivator\Swat715_EmitterActivator.psc(5,15): const scripts may only contain const auto properties. Property OBJTeleporterJammerLP cannot be defined

     

    Swat715_EmitterActivator\Swat715_EmitterActivator.psc(5,15): const scripts may not contain data, script variable ::OBJTeleporterJammerLP_var cannot be defined

     

    Swat715_EmitterActivator\Swat715_EmitterActivator.psc(6,13): const scripts may only contain const auto properties. Property SoundEffectIncetanceID cannot be defined

     

    Swat715_EmitterActivator\Swat715_EmitterActivator.psc(6,13): const scripts may not contain data, script variable ::SoundEffectIncetanceID_var cannot be defined

     

    Swat715_EmitterActivator\Swat715_EmitterActivator.psc(20,0): mismatched input 'EndEvent' expecting ENDIF

     

    No output generated for Swat715_EmitterActivator:Swat715_EmitterActivator, compilation failed.

  9.  

    Here's the list of the references to help better understand.

     

    00Custom_Swat715_PowerSwitch (Power Switch Activator: When activated Enables the Teleport activator and EmitterON to no longer be initially disabled. And Turns EmitterOFF to disabled.)

     

    00Custom_Swat715_EmitterOFF ("Standard Emitter" [OFF] Initially Enabled, Disabled by Power Switch)

     

    00Custom_Swat715_EmitterON ("Powered Emitter" [ON] Initially Disabled, Enabled By Power Switch. Will include Effects and sounds)

     

    00CustomSwat715_Activator ("Teleporter Activator" Initially Disabled, Enabled by Power Switch)

     

     

     

    I'm terrible at explaining things so Hopefully this helps.

    There is no need to have those 2 emitters.

    Instead of enabling and disabling them you can create one emitter and activate/deactivate the effects on that.

    using the same activator:

    ObjectReference Property ActivatorRef Auto ;objectreference of the teleporter activator
    ObjectReference Property EmitterRef Auto ;objecreference of the emitter
    Sound Property OBJTeleporterJammerLP Auto;sound effects
    Int Property SoundEffectIncetanceID Auto Hidden ; no need to fill this the script will do that
    
    Event OnActivate(ObjectReference akActionRef)
        If ActivatorRef.IsDisabled();if the teleporter activator is disabled enable it
            ActivatorRef.Disable();disables the teleporter activator
            EmitterRef.PlayGamebryoAnimation("stage3loop", True);starts animation stage3loop
            SoundEffectIncetanceID = OBJTeleporterJammerLP.Play(EmitterRef);starts the sound effects
        ElseIf !ActivatorRef.IsDisabled();if the teleporter activator is enabled disable it
            ActivatorRef.Enable();enables the teleporter activator
            If SoundEffectIncetanceID ; checks if there is sound playing
                EmitterRef.PlayGamebryoAnimation("stage1", True); stops the animation
                Sound.StopInstance(SoundEffectIncetanceID) ;stops the audio loop
                SoundEffectIncetanceID = None ; clears the inctance property so the script knows there is no sound playing
            EndIf
        EndIf    
    EndEvent
    
    

    You could add in a global variable to store the power state if you need to know in another script or as a condition for certain effects.

     

     

     

    Holy Crap Wasn't Expecting to see this that quickly lol

    I tried adding the script to the Power Switch Activator Script (Blank script) and it says compilation failed? Also what do you mean by store power state?

  10.  

     

    These effects don't require power. They are actually animations inside the nif for that model wich you can play using PlayGamebryoAnimation()

     

    you can do this by adding something like this to the activator:

    ObjectReference Property EmitterRef Auto ;fill this with the reference of the emittor
     
    EmitterRef.PlayGamebryoAnimation("stage3loop", True); place this inside the OnActivate event
    

    There are more than just this animation in the nif, you can find them using nifscope in the animation dropdown. then you can replace stage3loop with the name of the animation you would like

    This only plays the visual effects for sound effects you have to find the corresponding sound descriptor and play that at the same time as the animation using the following line:

    ;First add 2 more properties:
    Sound Property OBJTeleporterJammerLP Auto; you should be able to auto fill this
    Int Property SoundEffectIncetanceID Auto Hidden ; no need to fill this the script will do that, this will later be used to stop the sound effect
     
    SoundEffectIncetanceID = OBJTeleporterJammerLP.Play(EmitterRef);place this below the PlayGamebryoAnimation line
    

    Both the animation and the sound effect are looping so you'll have to stop them at some point. This can be done on a timer or using an activator when you want them to stop. To stop both use the following lines:

    Sound.StopInstance(SoundEffectIncetanceID) ;stops the audio loop
    EmitterRef.PlayGamebryoAnimation("stage1", True); stops the animation loop
    

     

    okay so I'm using a separate activator (power Switch) to spawn in the teleport activator so its initially disabled. I'm doing this to give the illusion that there's "power" being used. Now for the Emitter sound and effects if I make 2 versions of the emitter 1 with sounds and effects and apply your script to the power switch activator would this work?

     

     

    Here's the list of the references to help better understand.

     

    00Custom_Swat715_PowerSwitch (Power Switch Activator: When activated Enables the Teleport activator and EmitterON to no longer be initially disabled. And Turns EmitterOFF to disabled.)

     

    00Custom_Swat715_EmitterOFF ("Standard Emitter" [OFF] Initially Enabled, Disabled by Power Switch)

     

    00Custom_Swat715_EmitterON ("Powered Emitter" [ON] Initially Disabled, Enabled By Power Switch. Will include Effects and sounds)

     

    00CustomSwat715_Activator ("Teleporter Activator" Initially Disabled, Enabled by Power Switch)

     

     

     

    I'm terrible at explaining things so Hopefully this helps.

  11.  

    These effects don't require power. They are actually animations inside the nif for that model wich you can play using PlayGamebryoAnimation()

     

    you can do this by adding something like this to the activator:

    ObjectReference Property EmitterRef Auto ;fill this with the reference of the emittor
     
    EmitterRef.PlayGamebryoAnimation("stage3loop", True); place this inside the OnActivate event
    

    There are more than just this animation in the nif, you can find them using nifscope in the animation dropdown. then you can replace stage3loop with the name of the animation you would like

    This only plays the visual effects for sound effects you have to find the corresponding sound descriptor and play that at the same time as the animation using the following line:

    ;First add 2 more properties:
    Sound Property OBJTeleporterJammerLP Auto; you should be able to auto fill this
    Int Property SoundEffectIncetanceID Auto Hidden ; no need to fill this the script will do that, this will later be used to stop the sound effect
     
    SoundEffectIncetanceID = OBJTeleporterJammerLP.Play(EmitterRef);place this below the PlayGamebryoAnimation line
    

    Both the animation and the sound effect are looping so you'll have to stop them at some point. This can be done on a timer or using an activator when you want them to stop. To stop both use the following lines:

    Sound.StopInstance(SoundEffectIncetanceID) ;stops the audio loop
    EmitterRef.PlayGamebryoAnimation("stage1", True); stops the animation loop
    

     

    okay so I'm using a separate activator (power Switch) to spawn in the teleport activator so its initially disabled. I'm doing this to give the illusion that there's "power" being used. Now for the Emitter sound and effects if I make 2 versions of the emitter 1 with sounds and effects and apply your script to the power switch activator would this work?

  12. I was able to finally get the activator to work and make a functional power switch. But it leaves me with another question, I have the teleport emitter (Static/Non workshop Version) as a cosmetic piece to my teleporter and was curious if there was a way to have the blue lights and sound effects to be used without power? And how do you add visual effects to activators? for example casue a spark by using an activator?

  13. I'm confused. So you are trying to use power, but outside of a workshop area? Why even?

    I thought you wanted to make some part of your mod buildable.

     

    What exactly are you trying to do atm?

     

    im making a science facility which is a small portion of my mod, part of the quest requires you to go to different locations in the facilty which is why I was trying to implement the teleporters. so the teleporters are static which is why I was trying to find a way to make them powered. you basically just find a switch to turn on the teleporters which will open new areas in the facility.

     

    Edit: So i may have come up with a simpler and less complicated way to do what im trying to do, i just need a manual activator/trigger that works like a button but is invisible and a semifunctional power switch it really just needs to be an activator but doesn't have to produce power. also out of curiosity is it possible to group objects together in the ck to make it "preset?" for the lake of a better word.

  14. Almost ready to give up on the power portion of the teleporters. I've all day attempting to get it to work and nothing has. I've tried making the "WorkshopPowerSwitchbox01" to always have power but it doesn't want to work outside a buildable area. I've tried linking it directly to the Button that activates the teleporter but the switch itself never powers on and when I add the keyword "WorkshopStartUnpoweredOff" to the button it still remains functional. I've looked at some mods on nexus to try and help figure it out but its all workshop based, I tried look at the museum in concord because it had a generator there but I'm not sure if its functional. Ive also noticed when teleporting sometimes I take damage and even though its linked to the xmarker it doesn't teleport you directly on it, but like 10 feet away. You guys have definitely earned my respect cause doing this is stressful lol

  15.  

    That may be my go to but im messing with it to find a way to make it so once you walk onto the teleporter your basicly inside the button so no matter where you look as long as you are on the teleporter you can activate it. Kind of like a trigger box but you have to activate it manually.

     

     

    You could make a trigger the size of the teleporter and in its primitive tab select player activation. this should do what you want. The only issue is that it can be activated from outside the teleporter. This can easily be fixed by creating a second trigger as an actual trigger and changing the code on the activator to this (leave the properties and scriptname as they are):

    Event OnInit()
        Self.BlockActivation(True, True) ;This disables the activator initialy
    EndEvent
     
    Event OnActivate(ObjectReference akActionRef)
        If !Self.IsActivationBlocked() ; this makes sure the player can't accidentally activate the activator even if they can't see it
            Game.GetPlayer().MoveTo(TeleportDestination)
        EndIf
    EndEvent
    

    And adding the following script to the trigger:

    ;scriptname part goes here (extends ObjectReference)
     
    ObjectReference Property ActivatorRef Auto ; fill this with the activator's reference
     
    Event OnTriggerEnter(ObjectReference akActionRef)
        If akActionRef == Game.GetPlayer(); this makes sure only the player can enable the activator
            ActivatorRef.BlockActivation(False) ; this enables activation again
        EndIf
    EndEvent
    
    Event OnTriggerLeave(ObjectReference akActionRef)
        If akActionRef == Game.GetPlayer()
            ActivatorRef.BlockActivation(True, True) ; this disables the activator again after the player leaves it
        EndIf
    EndEvent
    

    You can add additional checks to these if you end up needing power or not

    Whenever I use a trigger with and without plaver activation nothing happens. Im using the defaultemptytrigger, is there a specific trigger I need to be using?

     

    edit: I added a defaultactivateself script to see if it was needed but with player activation it woulnt work but when I disable player activation it works but can only be used once. But was still unable to use a trigger for an activator.

  16. For the effects (and any other stuff too), you can look around in my Immersive Teleportation mod (see signature). The source code should be included in the BA2.

     

    There might indeed be a trick to using the player variant of the spell, but I can't remember anymore. It might include fading out the screen, maybe more.

     

    sweet ill take a look tonight, I like where the teleporter is right now but I'm trying to get it as close to the actual teleporter so looking at your mod with you being a more experienced Modder will help a lot.

  17. That may be my go to but im messing with it to find a way to make it so once you walk onto the teleporter your basicly inside the button so no matter where you look as long as you are on the teleporter you can activate it. Kind of like a trigger box but you have to activate it manually.
  18. Power requirement is an AV, you set that in the object's properties. Look at something like the recruitment beacon to see how it's set up. It's something like "RequiredPowerAV" and it's value will be your power requirement. You might also need the keyword called something like "WorkshopCanBePowered".

    And you need a mesh which has an attach point for the wire if you want to actually attach wires to it.

     

    For the spell: There are four spells in total: two for teleporting in and two for out, each available in a player and a NPC version. I THINK the player versions are called like TeleportEffectInPlayer.

    You should look at how the Institute teleport scripts work. Searching for usages of the player versions of the effects should point you into the right direction.

    I think it was something like:

    Apply the Teleport Out effect onto the player.

    MoveTo the player somewhere

    Apply the Teleport In effect.

     

    So if I only do the required power is the a way to link a WorkshopPowerSwitchbox01 directly to the teleporter so I don't have to do wires?

  19. Real quick I wanna thank you guys for all the help I know it was probably frustrating trying to explain all this to somone with 0 experciance in scripting. I truly appreciate it! The good news is right now the teleport works with sound and effects, the only things could use help with now is to make an invinsble "button" so when you step on the teleporter no matter where you press it will activate cause right now its just a floating butting lol. Also is there a way to do the power requirement without setting it up as a workshop?

  20. For the teleport effect, add a new SPELL Property, it should auto-fill if you call it "TeleportEffectIn".

    Then add this line somewhere around the moveTo line:

     

    Game.GetPlayer().AddSpell(TeleportEffectIn, false) ;silent

     

    i did this but it didn't auto fill, what do I do manually? nvm it worked lol.

  21. The first script only has one property, the second one has 2.

    What object did you change it to?

    i think the power requirement is either a property on a script attached to each workshopobject(i think this is called workshopobjectscript but i'm not sure) or a keyword and the main settlement script (can't recall what that is called now).

    When you clicked save did the compiler give you an error?

    The lightning effects don't necessarily have to be controlled via script i just assumed they were if not that try to find the effect itself in the ck and look at the use info to see what uses them.

     

    Here's Some screen shots of what made it work I used the first example that you showed me because I wasn't sure about on how to do all of it so I tried the simple route. So far I have the functional teleport with changed sounds but no effects or power requirement.

     

    Images:

    9606644-1552524260.jpg

     

    9606644-1552524301.jpg

     

  22. To add a script in the CK click add, give it a name and uncheck the constant checkbox, click ok the documentation string is not needed.

    next the properties window will open. You can either click on add property and add the properties that way or click on cancel, right click on the script and select "edit source".

    A very basic text editor will open and in there you can paste the script i posted minus the scriptname line as that will already be generated.

    Click file save some information will appear in the compiler output. after that you can close this window and fill the properties using the property button next to the list of scripts

    if you named the property for the global variable the same as the editor id of the global then you can select it and click on auto fill and the ck will fill it for you. For objectReferences you will have to select it in the worldspace by clicking edit value and then pick reference in render window

     

    Okay so I Used I followed every step, but it didn't work and I'm assuming its because I used a "DefaultActivateSelfTrigger" sense it has a "defaultactivateself" script. Another this I've noticed is under properties there is only destination marker, is that suppose to be the only property or is there suppose to be more?

     

    Edit: So i managed to get it work with a button, but are you able to change the model to somthing else? when i changed it to a differnt object it wasnt activateable. Also i couldnt find the script to make the lightning effect when i activate the teleporter. and for it to require power to use would that be a script aswell?

×
×
  • Create New...