Jump to content

Teleporter Modding Help


Recommended Posts

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

 

Link to comment
Share on other sites

  • Replies 55
  • Created
  • Last Reply

Top Posters In This Topic

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

Edited by Be3lzeBot
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Edited by Swat715
Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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?

Edited by Swat715
Link to comment
Share on other sites

The teleportPlayer spells does ...something to the player, and any npc you use it on. If I remember correctly, teleportEffectOutPlayer makes them invisible, and you have to call the in-version to become visible again?
I always use the non-player versions, as they seem purely cosmetic.

 

 

You could replace your floating button with InstituteControlPanelButton01? -It has a foot.

Link to comment
Share on other sites

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.
Link to comment
Share on other sites

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

Edited by LoneRaptor
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...