Jump to content
⚠ Known Issue: Media on User Profiles ×

kwong96

Members
  • Posts

    13
  • Joined

  • Last visited

Everything posted by kwong96

  1. just an initial thought in regards to setting the stage, make sure you have "allow repeated stages" on the quest data tab.
  2. As an update to this... Some ai packages aren't working. Apparently if I do an Action with a package templated from Activate I can get the npc to finally interact with the chair. Now the problem is I'm not receiving the "OnSit" events for it. I RegisterForRemoteEvent(refAliasToNPC.GetActorRef(), "OnSit") and have an Event Actor.OnSit(Actor akSender, ObjectReference akFurniture) , but it doesn't seem to be getting the event call. I'm guessing it is being sent silently with the Activate package. I'll mark this solved I guess since I'm probably starting to get away from what the topic title is.
  3. heh, welcome. Hopefully that'll work for you and at least get you started on what you want to do.
  4. You can take a look at TeleportInSpellEffect and SynthTeleportGrenade to see how bethesda dealt with grenades and spawning actors. Looks like they use the target of the OnEffectStart. Edit: Ok give me a few to upload some screenshots. Working teleport grenade incoming. ..................... So, I duplicated a fragGrenade, fragGrenadeProjectile, fragGrenadeExplosion, and InstituteBeaconSpawn. Make sure you edit the names in the proper fields at least for the fragGrenade weapon so you can find your grenade in-game. Next, add a new script to your duplicate InstituteBeaconSpawn and I checked off "Is Marker" and "Ignored By Sandbox" since it is an activator and I wouldn't want it messing up some random NPC's ai, though, you might want to find another object to use. I just grabbed this one because it was quick. http://i63.tinypic.com/5bu2ra.jpg For the script: Scriptname Nog_teleportSpawner extends ObjectReference Const Actor Property PlayerRef Auto Const Mandatory Event OnLoad() PlayerRef.MoveTo(self) endEventand lastly, you need to set the object in the explosion effect under "Placed Object". http://i65.tinypic.com/35mp99j.jpg That should be it. Just add it to your inventory in-game and toss one. Edit: Oh and make sure you set damage to 0 or you might end up hurting yourself. I would also look into expanding on the script to make sure you don't let the player kill themself with this if you pop into a bad area or from falling... unless you want that to be able to happen, heh. But you prob will need to add some extra stuff if you don't want the player to get stuck somewhere. I can't say if you could potentially end up inside an object with this or not. It's just a hastily put together teleporter.
  5. At least OnInit works for you. I don't know why OnQuestInit didn't show anything with that since I did try it myself and it worked. Unless your quest isn't loading properly. You should be able to double check in-game by doing "sqs questname" from the console. If it isn't showing as running then that might be why. I just double checked and mine is extended from "Quest Conditional", possible that has something to do with it as well since Actor PlayerRefTwo = Game.GetPlayer() inside of OnQuestInit() compiles fine for me, but again mine extended with "Conditional" at the end. Just to make sure... I just made a blank script... Scriptname TrashScript extends Quest Event OnQuestInit() Actor PlayerRef = Game.GetPlayer() if PlayerRef.WaitFor3DLoad() Debug.MessageBox("The player has loaded his 3d") endif endEventand this compiled with no errors for me. So I'm at a loss as to why.
  6. I might have missed something there. So teleMarker is the variable to store what type of object you want to spawn. That has to be set in the property window. That is what will be set to the xMarker or for a visual representation to test it, the DiamondSignMegSurgery02NoCol, both of which are of Form Type Static. I'll see if I can add a picture in a min. The teleDest can just be a regular variable in the script, I missed that part, because you are setting it in the script. WarpGrenadeMarker or WarpGrenadeObject needs to be the object you are referencing so the game knows where to spawn the teleMarker. How you figure out how to obtain that info is up to you. You can try GetTargetActor(), but I think that will look for an actor the explosion "hits" and not the Object the magic effect is on or just use "target" from OnEffectStart. Sorry, it's been awhile since I've touched activemagiceffects so I don't recall off-hand how to find the object the magic effect is attached to. Scriptname WarpGrenadeSCR extends activemagiceffect Form property teleMarker auto ObjectReference property WarpGrenadeMarker auto ObjectReference teleDest Event OnEffectStart (Actor target, Actor caster) teleDest = WarpGrenadeMarker.PlaceAtMe(teleMarker, abDeleteWhenAble = True) EndEvent Event OnEffectFinish(Actor target, Actor caster) target.MoveTo(teleDest) EndEventhttp://i63.tinypic.com/35kj0g1.jpg
  7. I can't say if it is the "best" way to do it, maybe someone more experienced with CK can answer that, but it is how I would do it as well. As to the code, that's weird it can't find "Game". Try adding a property for the PlayerRef instead then. Compile and open the properties panel and the PlayerRef should be able to autofill, otherwise select "any" for the cell and PlayerRef('Player') for the reference. Actor Property PlayerRef Auto Const Event OnQuestInit() if PlayerRef.WaitFor3DLoad() Debug.MessageBox("The player has loaded his 3d") endif EndEvent
  8. To create an xmarker (which is a static object) you need a form property. Then you can use PlaceAtMe on it. Scriptname WarpGrenadeSCR extends activemagiceffect Form property teleMarker auto ObjectReference property teleDest auto Event OnEffectStart (*function variables here*) teleDest = theObjYouWantToPlaceAt.PlaceAtMe(teleMarker, abDeleteWhenAble = True) ; Up to you if you want the marker to delete itself once the game has no loaded ref to it. EndEvent Event OnEffectFinish(Actor target, Actor caster) target.MoveTo(teleDest) EndEventIn the property section of the script you can then select xMarker or xMarkerHeading as a STATIC form type depending on what you need to use and it will create a new marker for you. To test it you can just select DiamondSignMegSurgery02NoCol to see something in-game to make sure it is spawning correctly.
  9. From my experience so far, OnQuestInit() will not show a debug.messagebox() without some help. You could try adding event onquestinit() Actor PlayerREF = Game.GetPlayer() if PlayerREF.WaitFor3DLoad() Debug.MessageBox("The players 3d has loaded") endif endevent and then it should show up for you. I just tried it and it worked for me, though, my PlayerRef is pulled from a ref alias. Otherwise I think the init section happens so early in load that your screen isn't even loaded yet for the messagebox to fire properly.
  10. So I almost have it fixed... I think. If someone comes across something similar I'll put what I remember doing that seemed to have an effect and maybe it can help them. I tried a lot of different things that I can't recall all of. I started with trying to make it simpler than what I was using. The first sign of promise was when I just tried simplifying my spawn by putting it in the fragment section of the stage that starts the scene with just: newRefAliasName.ForceRefTo(objectToSpawnAtRefAliasName.GetRef().PlaceActorAtMe(actorBasePropName))My previous spawn function was a bit more in depth since I need to add the new npc to a settlement. Then I added the new ref alias to the scene and put a travelThenFace package on it. The destination was set to an XMarkerHeading I spawned in script prior to starting the scene. This worked, so I tried setting the actor base to the one I created. That worked too. Yay, promise. Heh, or so I thought. Bunch of changes and reloading with no progress on the main alias and I finally said forget it, I'm starting from scratch. Now, I wiped the scene, saved, reloaded the data file, and made a new scene. I have no other scenes except this one. I added 3 phases, the ref alias for the npc, checked allow dialogue camera, added an action package to phase 1 of type package template'd from TravelWithWarp and ignore marker or heading and warp in dialogue set true. The destination is an XMarkerHeading (created prior to the scene starting in script). And the flags are set for Aggro radius behavior, load into furniture, and must complete (mainly to ensure the npc stands where I want them to if another actor happens to cross their path and cut them short). For Phase 2 I added an action package template'd from TravelThenSit with basically the same settings. The npc will spawn and travel now, but the phase 2 package is still not working. So I've changed phase 2's package to just Sit. Again, the npc will spawn, travel, and then .... just stand there until I go into workshop mode and select them with 'command'. At that point the npc will finally 'sit'. At least I feel like i'm getting a better idea of what's wrong now. I'm using a custom craft-able barber chair as the destination point. When I use a basic Travel package with an XMarkerHeading it seems to work, so, I'm thinking it has to do something with blockactivation or maybe Ignored by sandbox (though I wouldn't think that would apply to a non-sandbox package). I don't know if anyone else has come across something similar with any other type of furniture, but now it definitely seems like there is some issue with the npc not wanting to run their ai package because of some furniture setting somewhere. I'm just not sure where yet since they will actually use the furniture if I select command while in workshop mode. Especially since I don't have to command them onto the object, just simply ... turning on?... command let's them find and interact with the furniture.
  11. Ok, so... I added another npc to the scene, this one is already loaded. Then I moved the action package down onto that npc and it works. Apparently, I didn't try using enough different actors. So I'm guessing it is either something to do with creating the npc or the actor base I'm trying to use. Gonna try going through more of the default actors available and see if they work. I'm hoping it is just the one I chose to copy not having the right factions or something and not that I'm spawning the actor.
  12. Thanks ajs52698. I'm checking all of my conditions again and seeing what happens when I change ones that can be changed. So far nothing though. I had one on the object used for the destination, removed it since I realized I didn't need it anymore and could just change the reference to a specific reference as I set it in script now. That didn't help. Changed phase 1 from 'end on action 1' to 'end on all actions complete'. That didn't help. Other than those, though, I don't have any condition checks that happen after the scene starts and the ai package would be applied. It's just so weird, it's like there's a condition somewhere asking if 'isCommandedState' else don't run ai package. Gonna keep looking, though.
  13. Hello Nexus, Hopefully someone has experienced something similar to this and will be able to give some insight as to what is causing it. I've tried searching for something like this on here, google, and for both Fallout 4 and Skyrim with no success yet. Some info first. So I have a quest made, it starts fine. I have a quest script attached that registers for a scene OnEnd event so I can start the scene in this quest, that runs fine. I create a new actor based off EncWorkshopNPCFemaleFarmer01 with a workshopnpcscript attached to it and setup for allowCommand, allowMove, allowCaravan, and workshopparent filed in. The npc gets created fine and I ForceRefTo a Referience Alias, then start my scene. In the scene I have an action package templated from Travel. It is set to run on the npc alias and the destination is set to another alias. Now for the issue. The npc spawns and just stands there unless I go into workshop mode and 'command' the npc. I do not have to actually tell them to go anywhere, just select them and start the 'command' state. Then the npc will start traveling. I just can't seem to figure out what would possibly be causing this to happen. I've tried various combinations: - flag checks on the package - setting must complete - changed the settings on the workshpnpcscript - removed the workshopnpcscript - edited the flags in the scene - tried the default npc rather than my custom one. If any more info is necessary let me know.
×
×
  • Create New...