Jump to content

LoneRaptor

Premium Member
  • Posts

    155
  • Joined

  • Last visited

Everything posted by LoneRaptor

  1. The best place to learn these functions is like SKK50 said in existing scripts or alternatively on the CK wiki: OnActivate() and MoveTo() This page is also very handy to keep bookmarked, it has all the available papyrus function usually with some example code. For an activator that when triggered teleports the player to a preset location you would need something like this (attached to the activator) Scriptname NameOfScript extends ObjectReference ObjectReference Property DestinationMarker Auto ; fill this property with the objectreference of the XmarkerHeading where you want the player to teleport to. ; optionally you can have some global variables here that get set to 1(on) when certain conditions are met. You can then add an if statement that decides if you can teleport or not. Event OnActivate(ObjectReference akActionRef) Game.GetPlayer().MoveTo(DestinationMarker) ;moves the player to the preset location EndEvent for the contitions you mentioned I would test something like this (haven't tested the code myself yet but i should work. Note the LR_ prefix is something i use for all my globals so they don't conflict with other mods so its best to use your own prefix Scriptname LR_TeleportScript extends ObjectReference ObjectReference Property TeleportDestination Auto GlobalVariable Property LR_PowerActivated Auto ;A global that gets set to 1 when the power is activated use GlobalVariable.SetValue(1) for this Bool Property LR_TeleporterConnected = False Auto ;if you want the player to connect the teleporter first the you can use this and set it to true when the teleporters are connected can also be done using a global variable Event OnActivate(ObjectReference akActionRef) If LR_PowerActivated.GetValueInt() == 1 ; only teleport when power has been connected if you also want to check if the teleporter is linked change it to this: If LR_PowerActivated.GetValueInt() == 1 && LR_TeleporterConnected Game.GetPlayer().MoveTo(TeleportDestination) EndIf EndEvent For the effects I would look at the teleporter in the ck and see how the script on that activates it.
  2. I have found that on my current install of the CK the preview for meshes is always black but pressing A solves this.
  3. You can't uncheck const because the script itself is marked as const. Remove the const flag at the end of your first line and then remove them from the 3 actors as well.
  4. The reason why you can't activate the shelf is because you don't have collision. When you replaced the default display case for the shelf You did this in nifscope right. Then you should be able to also copy the shelf's original collision mesh(the bhkNPCollisionObject node). If it gives you an error you might have to remove its target and re target it to the shelf after copying. After this you should be able to activate it. If you still can't you can verify if the collision is there and in the right place by placing one inside a test cell in the CK and pressing F4 which will show collision meshes.
  5. I managed to do this for my pizza mod see my signature the download includes the source scripts. But it is mostly hardcoded in the vanilla scripts. And its very tricky to add a new one without conflicting with every other mod that edits that script. If I remember correctly the WorkshopObjectScript holds the hardcoded 5 vendors and the WorkshopParent holds their associated levelled list witch are done using an array so you can inject new ones in there.
  6. To do this you can add 3 more ObjectReference properties to your script and then spawning them like this: Scriptname ZigguratSummonScript extends ObjectReference Const ObjectReference Property XMarker Auto Const ObjectReference Property XMarker02 Auto Const ObjectReference Property XMarker03 Auto Const ActorBase Property ZigguratSummonActor Auto Const ActorBase Property ZigguratSummonActor02 Auto Const ActorBase Property ZigguratSummonActor03 Auto Const ;Add these and don't fill them with anything in the CK ObjectReference Property Actor01 Auto ObjectReference Property Actor02 Auto ObjectReference Property Actor03 Auto ;events Event OnActivate(ObjectReference akActionRef) if (akActionRef == Game.GetPlayer()) If(!Actor01 && !Actor02 && !Actor03) ;If none of the properties are filled spawn the actors Actor01 = XMarker.PlaceActorAtMe(ZigguratSummonActor) Actor02 = XMarker02.PlaceActorAtMe(ZigguratSummonActor02) Actor03 = XMarker03.PlaceActorAtMe(ZigguratSummonActor03) debug.Notification("test") Else ;if any or all of the actors are alive then kill them and reset their properties. (Actor01 As Actor).Kill() (Actor02 As Actor).Kill() (Actor03 As Actor).Kill() Actor01.Delete(); this removes their bodies if you don't want that then you can remove these. Actor02.Delete() Actor03.Delete() Actor01 = None Actor02 = None Actor03 = None endif EndEvent This will keep repeating if you want it to only spawn and kill once the you'll have to add a bloolean property and add it to the first if statement.
  7. This does work quite well for global variables I haven't tried it on actors yet but it might work. I used it in my Commonwealth pizza mod. If you want an example have a look at the "LR_PizzaDeliveryScript.psc" in the optional downloads. In the esp it is attached to "LR_PizzaDeliveryQuest". I haven't tested if adding a string as the value works in game but the script compiles just fine if I do. Just don't try doing this on the pipboy because that doesn't work.
  8. Edit: ignore should have read the original post in more detail
  9. I looked into it some more and the original post from wim95 appears to be correct. The reason my method doesn't work is because the mats get their map marker from the WorkshopScript attached to the workshopRef (instead of the linked ref). Which in turn gets set by the WorkshopInitializeLocation quest script. this script gets the map marker from the location the player was in when the event was triggered and because there are two map markers close together hangman's alley and Flagon Tunnel (in adjacent cells and the hangman's alley one is right at the border between the two) it can choose the wrong map marker depending on where you were when the event triggered. I assume this event only triggers once but I'm not sure. A possible fix could be to add a script on the workshop ref at hangman's alley that makes sure the right map marker is selected. Something like this: (untested) ObjectReference Property MapMarker Auto ;fill this with the correct mapMarker (not the xMarkerHeading) WorkshopScript Property WorkshopRef auto ;fill this with the objectreference for the workshop Event OnWorkshopMode(bool aStart) ;event triggered when the player enters or exits the wrokshop mode if(WorkshopRef.myMapMarker != MapMarker); only change the map marker if needed WorkshopRef.myMapMarker = MapMarker EndIf EndEvent
  10. You can control where the player ends up when fast traveling by adding a linked ref to the map marker reference. The script on the fast travel mats does this by moving the linked ref form the map marker to itself when you place it. I had a quick look at the script for those mats and it uses a linked ref found on the workshop with the keyword "WorkshopLinkSpawn". Looking at the workshop at hangman's alley the linked ref with that keyword is not the one linked to the actual map marker. So to fix this all you need to do is remove that linked ref and make a new one to the correct marker (you can find it by looking at the linked references on the map marker) and using the correct keyword ("WorkshopLinkSpawn).
  11. when you create the archive with the creation kit you'll get a list of all textures, meshes, scripts... that will be included if you see anything there that you didn't create yourself then you can remove it from the list. If your mod doesn't add any new texures you can just delete the texures archive after the CK creates it. If didn't add any new scripts, models or sound files you can also delete the main archive and just upload the .esp on its own.
  12. like joerqc said you should be fine. The reason you see those trees as modded is because the creation kit gets its textures in the same way as the game, modded textures override the vanilla ones. You will have to make sure that when you create the archive using the creation kit that it doesn't add those textures as well. If you have placed any items that you have alternate textures installed for the creation kit might select the modded textures. This will not make that mod a requirement but you could be unintentionally redistributing someone else's work.
  13. As soon as you need to save a new file/ edit an existing one you can't add it on PS4. You can for simple operations reuse existing scripts or part of them by using only some of the properties. But this gets very time consuming as you need to find a script that has properties of the correct type, extends the correct form, has the code you need and preferably uses properties for its variables and not just hardcoded values. For quest and terminal fragments it gets even trickier because the code you need to reuse has to be on the correct terminal/quest entry.
  14. I get that error as well but the animation will still work. Are you testing this in game or in the editor. Because the animation will only play in game. I'm not sure if the scripts folder came with the fallout 4 install or the Creation Kit. I think it was the Creation Kit that added that. You could try reinstalling it or I seem to remember a repair option in the Bethesda.net launcher You could try that first.
  15. For the StartOn you should have a little checkbox appear when you click on edit property click on that and the value will change to true (It might say something else next to it) Have you extracted the archive "Base.zip" inside Fallout4\Data\Scripts\Source\Base ? if not extract it.
  16. There is already a script in the game to do this. Find the PackIn called KlaxonLightPackIn. This also includes the sound effect (if you don't want the sound you can just remove the placed sound marker). You can set them up to ba always on in the properties of that script or you can turn them on from another script on an activator or a terminal for example. The script has 3 properties to control how they work (AutoOff, AutoOffTime and StartOn). AutoOff by default is set to True If you want them to keep going forever you'll have to edit the value but don't click on the checkbox. If you want the lights/animation to keep going for some time but turn off after a set time you can leave the AutoOff to its default True and change the AutoOffTime property to the time you want them to stay on for in seconds. The StartOn property is set to false by default if you want them to be on without activation you can change this to True. If you want the lights to be turned on from another script the you only have to add 2 lines to it the above mentioned properties will still be used ObjetReference Property KlaxonRef Auto ;the property for the placed movable static not the light object create one for each light you need to control or use an array ;somewhere else in the script inside and OnActivate event for example KlaxonRef.Activate(Game.GetPlayer()) ; Game.GetPlayer() can be replaced by a property for the player ref. again create one of these for each light you need to control or use a loop in the case of an array
  17. You should be able to extract the BA2 archives to your data folder using archive extractor or the one that comes with the CK(Fallout 4\Tools\Archive2). Then when you create your archive for your mod using the creation kit it will find them and package them in the new BA2 archives.
  18. If you can get permission from the original authors to do so you can copy them(copy as new record) into your esp using FO4Edit first and then build with the copied ones.
  19. Yes, if they don't have those mods installed the items from them will not show up.
  20. You'll have to open the mod you want to use parts of in FO4edit and in the file header mark It as esm (in the record flags section) and save the mod. You should now be able to use it without losing everything when reopening it.
  21. The function you mean is probably PathToReference. Which you should be able to use by making an actor like mentioned above and then placing some markers around your track and using PathToReference to move to the first one then on completion (function is latent) use PathToReference again on the next marker and so on. This way you don't need to use AI pacages. And then just looping this.
  22. The way I would try to do this is by using the FO4 VFR Tool by greebtea101 which allows you to search trough all the voice files and extract individual ones. Then in the CK you can create the sound descriptor using the voice file you extracted. in a script you can then play that file using the Play() function.
  23. You can do this by selecting one of the movable statics in the render window and pressing Ctrl + F in the menu that shows up you can select the item you want it to be replaced by. And uncheck the 3 checkboxes at the bottom. If the item you want to replace isn't the same type as the item you want to replace it with it will not show up in the dropdown unless you uncheck the checkbox "Same base object type only".
  24. As far as I know that is a bug from the vanilla game not sure how or if it can be fixed.
×
×
  • Create New...