Fertal Posted January 30, 2009 Share Posted January 30, 2009 Hi to everyone I'm trying to edit my first mod. I wrote a script like this: ScriptName NewSetPASCRIPT int doOnce begin MenuMode 1027 set doOnce to 0 if doOnce == 0 set doOnce to 1 ; Do something endif end begin GameMode if doOnce == 1 set doOnce to 0 ; Do something else endif end Well, how can I apply this code to the player? I want that this script is available immediatly without the player have anithing to activate (an object, a perk selectable on LevelUp Menu, a quest) Thanks Link to comment Share on other sites More sharing options...
Lingwei Posted January 30, 2009 Share Posted January 30, 2009 You could try creating a dummy quest and attaching it as a quest script. int doOnce Aren't variables meant to be declared as shorts long and floats? Or should I be reading the Geck wiki in a more indepth way... Link to comment Share on other sites More sharing options...
Fertal Posted February 2, 2009 Author Share Posted February 2, 2009 You could try creating a dummy quest and attaching it as a quest script. this is my problem: how to attach the test script to a quest (or a perk, it's the same, not?) hidden and add this immidiatly the to player without activate anything. I look the code of the WellRested "PerK", but this is activated by the activation of a bed... Link to comment Share on other sites More sharing options...
thc1234 Posted February 2, 2009 Share Posted February 2, 2009 as was said - Quest - start game enabled. it will run it's script all the time. how to attach script to quest:create scriptcreate questselect script in quest data combo box :P anyway AFAIK all quest scripts run treir gamemode block in like 5 seconds (there is game setting iirc) which may be a little bit too slow. Link to comment Share on other sites More sharing options...
SpeedyB64 Posted February 2, 2009 Share Posted February 2, 2009 Create a new quest (under actor effects in the object window) and select that script as the quest script, set the quest to "start game enabled" That should run it on load then run the script. Link to comment Share on other sites More sharing options...
Fertal Posted February 2, 2009 Author Share Posted February 2, 2009 thank you very much, and sorry, it's my first script/mod ;) Link to comment Share on other sites More sharing options...
SpeedyB64 Posted February 2, 2009 Share Posted February 2, 2009 You're welcome :thumbsup: Everyone has to start somewhere. Link to comment Share on other sites More sharing options...
Fertal Posted February 3, 2009 Author Share Posted February 3, 2009 first step done, script attached to a quest... second step: in my script there some GetActorValue/SetActorValue. Compiling the script as Quest Script, this commands generates a Warning and the script does not save... how can I resolve? Can I attach an Object/Effect Script to a Quest?Is a problem of "Non-reference scripts"? in that case, how can I use the commands GetActorValue/SetActorValue in my script? thank you again for your help and sorry for my non-perfect english :P Link to comment Share on other sites More sharing options...
SpeedyB64 Posted February 3, 2009 Share Posted February 3, 2009 Your script should be set as a quest script and should start with "begin Gamemode" Link to comment Share on other sites More sharing options...
Fertal Posted February 3, 2009 Author Share Posted February 3, 2009 Your script should be set as a quest script and should start with "begin Gamemode" then, if you read the code on my first post, you'll see that I have two blocks: Begin MenuMode 1027 and Begin GameMode. I simply invert the order of the two blocks? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.