Jump to content

Scripting Help - Guides?


Recommended Posts

So I don't know how exactly to start this, as it's my first topic posted on this (or any) forum, so here goes.



I've been working on a mod for a while now (3-4 months approx) and although I'm relatively good at level design and the like and have accomplished quite a bit, after much planning and design, I've realized I've hit a bit of a snag: I can't really script. Like, pretty much at all.

While I have a bit of an understanding of how scripts work, where they come into play and what sort of scripts would likely be assigned to what, I am not advanced enough to be able to write scripts for some of the things I'd like to be able to write scripts for, and thus accomplish what I want to accomplish in my mod.

I have laughably basic knowledge of the logic behind scripts (If statements and such) from last year's 11th grade Computer Programming class in which I learned some coding through Java NetBeans as well as through using console commands in F3 , Vegas and Skyrim.

Because of this lack of knowledge, I'm looking for any guides/guidance on scripting that may be able to help me in my endeavours.





If it helps, here's a list of some of the scripts I'd like to be able to write:


- When you press the aim button whilst looking at an NPC, a message/dialog box pops up where you can cable tie someone. If this option is chosen, they play the kneeling/hands tied animation and are toggled as restrained

- if a button is pressed, NPCs (preferably enemies) are spawned at a given location

- if you pass a certain point, all NPCs in the area are aggro'd toward you

- If you take out your weapon, all NPCs in the area are aggro'd toward you

- If you activate an object, that object and a number of others disappear/ a given item/number of items is added to inventory


- if you are aggro'd by an NPC/number of NPCs and are hidden, removing a mask/apparel item removes aggro/reputation is reset


ANY help is much appreciated! :laugh:

Link to comment
Share on other sites



This gives you the basics of how to write a functional script.




This should go into more detail.


Both were the top two results when I searched for FONV tutorials for scripting in Google. Try researching a little before posting in the forums.


Some of the scripts you want to do are too advanced if you don't understand scripting syntax (grammar). The simplest one is the activate an object, get stuff in inventory one. I'd start out with that one, if I were you.

Edited by AxlDave
Link to comment
Share on other sites

Most modders are of the reverse-engineering type, as it can be difficult to find pertinent tutorials and don't have a pre-existing background in coding.


For instance, your "do-not-pass" scenario reminded me of an activator/script event in Fallout3 where a bomb goes off if you enter a certain boundary. And you play with it to your needs from there.

scn LDScientistBomb01SCRIPT

short isSequence			;  0 - Means sequence is not running, 1 - Means sequence is happening.
short soundStage
short doOnce
ref myLink
float Timer		;  This is how long each sequence happens.


Begin onLoad

	set Timer to 1



Begin onTriggerEnter
	if (isActionRef player == 1)

		if (doOnce == 0)
		set isSequence to 1
		set soundStage to 1
		set doOnce to 1




Begin gameMode
	if isSequence == 1
		if (soundStage == 1)
			set myLink to getLinkedRef
			set Timer to 1.5
			set soundstage to 2

		if (soundStage == 2)
			if (Timer < 0)
				LDFakeExplosion02REF.placeatme LDScientistExplosion 1
				set soundStage to 0
				set isSequence to 0
				set Timer to (Timer - GetSecondsPassed)


Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...