americanwierdo Posted March 1, 2017 Share Posted March 1, 2017 For my next mod, I want to do a scene where the player walks into an empty room, picks up a note on the wall and suddenly 6 enemies appear right behind them. How do I do that? What kind of script would that need? Just something simple like that is all I need to know. Thank you for your time. -Americanwierdo Link to comment Share on other sites More sharing options...
Mktavish Posted March 1, 2017 Share Posted March 1, 2017 (edited) Since notes don't have any script attachment ... all you can do is run a script some other way , that uses this function ... http://geck.bethsoft.com/index.php?title=GetHasNote Like for example : you place a trigger around the note large enough to account for the proximity that the player is able to pick up the note. Then attach an object script to it like this ... SCN MyNoteTriggerScript Begin OnTriggerPlayer If GetHasNote MyAmbushNote MyAmbushNPCs.Enable ; or what ever method you wish to place the ambushing npc's Disable endifEnd Edited March 3, 2017 by Mktavish Link to comment Share on other sites More sharing options...
Ladez Posted March 1, 2017 Share Posted March 1, 2017 Alternatively, you can set up an activator or a misc. item that adds the note and starts the ambush when activated/picked up. Then you avoid checking GetHasNote every frame. Link to comment Share on other sites More sharing options...
americanwierdo Posted March 3, 2017 Author Share Posted March 3, 2017 Like for example : you place a trigger around the note large enough to account for the proximity that the player is able to pick up the note. Then attach an object script to it like this ... Well what I normally do is create an Object with the holotape model so that I can add in the script that the player recieves a note and that the holotape object is removed, so that can work instead. So I just do NPC.enable in the script? Is that the Reference or the ID? I'm gonna go ahead and assume it's the Reference, but if not be sure to tell me. Either way, thanks for your help. Link to comment Share on other sites More sharing options...
Mktavish Posted March 3, 2017 Share Posted March 3, 2017 (edited) Like for example : you place a trigger around the note large enough to account for the proximity that the player is able to pick up the note. Then attach an object script to it like this ... Well what I normally do is create an Object with the holotape model so that I can add in the script that the player recieves a note and that the holotape object is removed, so that can work instead. So I just do NPC.enable in the script? Is that the Reference or the ID? I'm gonna go ahead and assume it's the Reference, but if not be sure to tell me. Either way, thanks for your help. It is the Ref-ID you would put here >>> MyRefID.EnableBase-ID's cannot be disabled ... therefore they cannot be enabled ... they just exist But you don't have to drop actors in the rendor window , mark them "initially disabled" then give them a Ref-ID.To get a bunch of baddies to pop in and ambush the player. X marker with PlaceAtme ... or use leveled actors. And ya ... the holo tape model is just a mesh , but the base-Id object , could not be an actual note then. It would be a misc Item , or activator like Ladez mentioned . Base-ID/Ref-ID notes do not have that kind of trigger functionality. Not from picking them up , or reading them. Edited March 3, 2017 by Mktavish Link to comment Share on other sites More sharing options...
Mktavish Posted March 3, 2017 Share Posted March 3, 2017 (edited) Alternatively, you can set up an activator or a misc. item that adds the note and starts the ambush when activated/picked up. Then you avoid checking GetHasNote every frame. I didn't think that check every frame would be such a big deal ... especially if it is limited to a small area/time frame of the game. But oh wait ... yes it needs a disable call in the script then ... Edit up above ^^^ Edited March 3, 2017 by Mktavish Link to comment Share on other sites More sharing options...
uhmattbravo Posted March 3, 2017 Share Posted March 3, 2017 I would use the holotape model as an activator with something like this on it: Begin OnActivate If isActionRef player == 1 Player.addnote (note's baseID)(Initially disabled NPC a refID). Enable(Initially disabled NPC b refID). Enable(Initially disabled NPC c refID). Enable(Initially disabled NPC d refID). Enable(Initially disabled NPC e refID). Enable(Initially disabled NPC f refID). Enable(ActivatorRef).disable(ActivatorRef).markfordelete Endif End MkT's suggestion about using Xmarkers and the placeatme function with baseID's will work too. I use it for repeatable spawns, but since this sounds like a one time event, the enable method will work. If the activation adds the note and triggers the rest, you can avoid the gethasnote check. Link to comment Share on other sites More sharing options...
Recommended Posts