Jump to content

help in scripting


Fertal

Recommended Posts

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

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

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

as was said - Quest - start game enabled. it will run it's script all the time.

 

how to attach script to quest:

create script

create quest

select 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

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

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

Archived

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

  • Recently Browsing   0 members

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