Hmm, well there's no EndIf and the end of the If clause. I think the script sequence is meant to skip any errors like that. Also what Item is being added? Also you had "End Gamemode", I don't think that is an actual operation. All you need is "End"
Scriptname AAATest
float fquestdelaytime
short doonce
Begin GameMode
if (doonce == 0)
message "Doonce is 0"
set doonce to 1
player.additem f 100
set fquestdelaytime to 60
EndIf
End
Sorry, I should've been more specific!
Yes, Jeff, the script is supposed to add 100 gold to the player every minute.
But the script doesn't run in game at all. I don't see the message that doonce is 0. Attempting 'set aaatest.doonce to 0' results in the engine saying that the variable doesn't exist!
Spiney, yeah, I forgot to put in the endif when I typed it!
I was under the assumption though that End basically signaled the end of the script, rather than the end of the GameMode block? I've seen other scripts that had End GameMode and the next block would be a Begin MenuMode that would run when any menus are open....
Scriptname AAATest
float fquestdelaytime
short doonce
Begin GameMode
set doonce to 0
if (doonce == 0)
message "Doonce is 0"
set doonce to 1
player.additem f 100
set fquestdelaytime to 60
EndIf
End
Scriptname AAATest
float fquestdelaytime
short doonce
Begin GameMode
set doonce to 0
if (doonce == 0)
message "Doonce is 0"
set doonce to 1
player.additem f 100
set fquestdelaytime to 60
EndIf
End
Hm thanks for that! But it seems that the script isn't running at all, despite me specifically enabling the associated esp.
Thanks Andere for that link! It seems quite useful.
You don't need to set "doonce" to 0 - all variables start at 0 by default.
Not to be rude, but did you attach the script to an object or quest?
Quest scripts should be set as such and attached to quests flagged as "start game enabled".
Object scripts should be defined as such and (if you want the script to run when the player isn't near the object) flagged as a quest item.
Oh - and your script will cease function after running once. You'll want:
Scriptname AAATest
float fquestdelaytime
short doonce
Begin GameMode
if (doonce == 0)
message "Doonce is 0"
set fQuestDelayTime to 60
set doonce to 1
[You can have "player.additem Gold001 100" here, if you want. Otherwise, the player will begin receiving gold one minute, five seconds into the start of the game.]
return
endif
player.additem f (You needn't put the base ID here - the editor ID, "Gold001" works as well) 100