Jojash Posted April 12, 2013 Share Posted April 12, 2013 (edited) Yes, you need to attach it to a quest for it to have any effect. If you tick "Start Game Enabled" then your script will run as soon as the game starts. You might want to have a look at this tutorial if you're very new to modifying New Vegas, it's a tutorial for Fallout 3, but it's still very valid and it'll introduce you to most of the concepts involved. If you want to learn more about scripting, I'd also take a look at this. I hope this helps! :smile: Edited April 12, 2013 by Jojash Link to comment Share on other sites More sharing options...
Shkipan1 Posted April 12, 2013 Author Share Posted April 12, 2013 (edited) Yes, you need to attach it to a quest for it to have any effect. If you tick "Start Game Enabled" then your script will run as soon as the game starts. You might want to have a look at this tutorial if you're very new to modifying New Vegas, it's a tutorial for Fallout 3, but it's still very valid and it'll introduce you to most of the concepts involved. If you want to learn more about scripting, I'd also take a look at this. I hope this helps! :smile:I see. The scripting isn't too difficult(even though I fail at them), I just didn't know I had to make a quest in order for it to have any effect :smile: Is that the case with all scripts that are not linked to anything? Thanks for you help, I really appreciate it! However one last thing and then I won't be bothering you haha.. I hope. I'm currently trying to get an NPC to equip a weapon, but he just won't do it. I have attached the script I made to the npc. It looks like this: scn EquipWeapon short doOnce BeginGameMode if(doOnce == 0) NPCEngineRoomREF.EquipItem WeapLaserRifle 1; set doOnce to 1; endif end Any idea why it's not working? Edited April 12, 2013 by Shkipan1 Link to comment Share on other sites More sharing options...
Jojash Posted April 12, 2013 Share Posted April 12, 2013 (edited) If a script isn't linked to anything then, no, it won't do anything. A script is like a notepad document. It's not going to do anything on its own. You need to do something with it for it have an effect, for a script, you link it to something, for a notepad document you show it to someone for it to affect them. As for your script, first, if you've linked it to the NPC you want it to work on, use "GetSelf" rather than using the NPC's reference. For example: Scn ExampleScript Ref rMe Short DoOnce Begin GameMode If DoOnce == 0 Set rMe to GetSelf Set DoOnce to 1 Endif End This means that "rMe" corresponds to the NPC that the script is linked to, and you can do stuff with said NPC. Next, you have the "HideMessage" flag set to one. This will do nothing since the NPC wouldn't receive a message about the weapon being equipped anyway! Finally, you should make sure that the NPC actually has the weapon you want them to equip. If you don't want to do that via script you can just add it in the GECK easily enough. On a side note, if you don't want the NPC to unequip the laser rifle later, you can set the unequip flag to one, that'd look something like rSelf.EquipItem WeapLaserRifle 0 1 This means that the laser rifle cannot be equipped. I've left the "Hide Message" flag at 0 as it doesn't make a difference whether or not it's ticked or not. If it were 1 it would make no difference to the script. Anyway, if anything's unclear feel free to ask. It's not a bother! :smile: Edited April 12, 2013 by Jojash Link to comment Share on other sites More sharing options...
Shkipan1 Posted April 12, 2013 Author Share Posted April 12, 2013 (edited) If a script isn't linked to anything then, no, it won't do anything. A script is like a notepad document. It's not going to do anything on its own. You need to do something with it for it have an effect, for a script, you link it to something, for a notepad document you show it to someone for it to affect them. As for your script, first, if you've linked it to the NPC you want it to work on, use "GetSelf" rather than using the NPC's reference. For example: Scn ExampleScript Ref rMe Short DoOnce Begin GameMode If DoOnce == 0 Set rMe to GetSelf Set DoOnce to 1 Endif End This means that "rMe" corresponds to the NPC that the script is linked to, and you can do stuff with said NPC. Next, you have the "HideMessage" flag set to one. This will do nothing since the NPC wouldn't receive a message about the weapon being equipped anyway! Finally, you should make sure that the NPC actually has the weapon you want them to equip. If you don't want to do that via script you can just add it in the GECK easily enough. On a side note, if you don't want the NPC to unequip the laser rifle later, you can set the unequip flag to one, that'd look something like rSelf.EquipItem WeapLaserRifle 0 1 This means that the laser rifle cannot be equipped. I've left the "Hide Message" flag at 0 as it doesn't make a difference whether or not it's ticked or not. If it were 1 it would make no difference to the script. Anyway, if anything's unclear feel free to ask. It's not a bother! :smile:Oooh now I see :smile: yes the Hide Message thing was just a mistake, I wanted to make sure he coundn't unequip the gun.. I shall try what you've told me and see how it works out. Once again I can't thank you enough, things are starting to make some serious sense ^^ EDIT: Nope, I can't get it to work. I simply put rMe.EquipItem WeapLaserRifle 0 1 in between Set rMe to GetSelf and DoOnce to 1. I'm using an actorbase, could that be the problem? Edited April 13, 2013 by Shkipan1 Link to comment Share on other sites More sharing options...
Recommended Posts