Jump to content

Scripting help for the Noob


Pendraz

Recommended Posts

Hello everybody, i just started to mess around with the GECK and the scripting for Fallout 3, i am a total noob when it comes to this stuff, so i would love to get a little bit of input on how to make this two lines script to work, just to understand the basis to then go back and work on it on my own, i think i am doing something terribly wrong but i can't understand what it is.

 

Scriptname TEST

 

begin GameMode

 

if Player.IsMoving == 4

player.setav luck 10

endif

 

END

 

As said, this script isn't supposed to have any meaning (as of yet). It's just a test on my part to learn how to use the conditions/functions, but sadly i am already stuck before even starting basically, i don't understand why it doesn't work.

I have already tried to modify the value of the condition "ismoving" to something else, or to use forceav/modav instead of setav, but it doesn't change anything.

The esp gets saved/compiled correctly in the GECK, but when i get in game the script won't work, it doesn't activate. (i did make sure the .esp is loaded of course)

What am i missing here?

 

I am sorry if, like i am sure, it's a very stupid problem, and that the answer could have been found on the guide in the official website. I did look there for a while but couldn't find a solution, i guess it might have to do with my English being far from perfect which didn't allow me to understand something.

 

Anyway i would really appreciate any help to get started.

Thank you all in advance.

Link to comment
Share on other sites

im still geting the hang of moding id add the variable ( float IsMoveing ) to the Begining after the scn then test to see if that worked. also if thats a Qoet like it says the scriptname should be scn not scriptname.

 

if not trie some thin else.

Link to comment
Share on other sites

What do you have the script attached to? A script will do nothing unless it is started by something. (quest, perk, item, activator)

 

Try this:

 

scn scriptname

 

begin onequip

 

if Player.IsMoving == 4

player.setav luck 10

endif

 

END

 

make sure that the script type is set to item.

 

then make a copy of an armor and set it to use this script.

Link to comment
Share on other sites

Hey, thanks to both of you for the input.

 

Nick2kman: i have tried to add "float ismoving" just after scn scriptname, but when i try to save the script in the GECK, it tells me that ismoving is not a valid variable's name.

 

I did add scn before scriptname name of the script

 

SpeedyB64: I don't have the script attached to anything specific right now. So there's no way to make a script work unless it's activated by something specific? Because i seemed to have understood that "Begin GameMode" was used in order to let the game make a check every frame to see if the conditions of the script were met.

I ask it because i have seen many mod's scripts starting with "Begin GameMode" and they don't seem to be linked with any specific item/perk or activator.

I tried to save the script as effect, quest and object, but it didn't work in any case.

 

Any possibility to make the script work without having to change the starting condition? (onequip onactivate etc)

Link to comment
Share on other sites

Scripts can't run on their own. The begin gamemode is mostely used for scripts with quests. What you do is make a new quest and set it to run that script then set the quest to start game enabled. I haven't worked with perks yet but you can make a hidden perk that has the effect I think.
Link to comment
Share on other sites

Ah i see, then all these mods that i have seen so far must have had a hidden quest/perk linked to the script that i wasn't aware of.

Thank you very much for the clarification, I'll try to look in the GECK for a way to add a new quest/perk and see if i can attach the script to it, will update here if i manage to make it work :)

 

Edit: Thanks again Speedy, i have managed to make it work, now i can start messing around with the script itself to make it look like i want, *cheers

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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