lostone1993 Posted November 13, 2010 Share Posted November 13, 2010 Does anyone know if you can have 2 begin blocks in a Fallout New vegas script, I know you can in fallout 3- I used it a lot but this script will not work Also this is an example not what I am working on or even properly functional just using as an example the New Vegas gsck would reject this even though the fallout3 geck would not, does anyone know why ? scn randomscript ref selfshort death Begin ondeath set self to getself self.add laserpistol 1 set death to 1end begin onactivate set self to getself if death == 0 else self.kill endifend Link to comment Share on other sites More sharing options...
documn Posted November 13, 2010 Share Posted November 13, 2010 I assume this is an object script that is attached to an actor? I have not had any problems with two blocks in one script. I see a couple potential problems: The ondeath block should have Additem instead of Add. This is probably what is preventing your script from saving. Also, I'm not sure if laserpistol is a valid editor id, but I assume you're using a correct one in your real script. The onactivate block looks like it wants to kill the actor when you activate it, however the only time the kill command will run is if the actor is already dead. The GECK should be fine with this section of the script though. Link to comment Share on other sites More sharing options...
SmileyCat Posted November 13, 2010 Share Posted November 13, 2010 I am using three blocks in a script and it works as intended. Link to comment Share on other sites More sharing options...
Cipscis Posted November 13, 2010 Share Posted November 13, 2010 Using GetSelf in that way does nothing but invite trouble. The following two pieces of code will do exactly the same thing, except the version that uses GetSelf is slightly less efficient and will not work under some conditions:Begin OnActivate player Kill End ref self Begin OnActivate player set self to GetSelf self.KillActor End The GECK will refuse to save if it detects any error, although it won't tell you what the problem is. You can fix that by using this - The GECK PowerUp for New Vegas The problem in this case seems to be that you're trying to use "Add" instead of AddItem. The doesn't recognise it as a function, so the script won't save. There is no problem whatsoever with using multiple begin/end blocks in a single script. Cipscis Link to comment Share on other sites More sharing options...
lostone1993 Posted November 14, 2010 Author Share Posted November 14, 2010 okey thanks, but i was just using that code as an example i has nothing do with my promblem i know that you can have two or more blocks and are happy now must have been an error somewhere else in my code ,thanks for attached link as well Link to comment Share on other sites More sharing options...
Recommended Posts