latpilot.blogg.se

Bethesda creation kit wiki papyrus functions
Bethesda creation kit wiki papyrus functions







You can see that it is reporting that the "count" variable is 0.Ĭlose the console (~) and activate the pillar three times (in other words, get it to display the "Hello World!" message box three times). Now you should see the following in the console: Pull down the console (~) and while the console is "down" select the pillar (by clicking on it with the mouse) so that you see "'WETempActivator'" and a number in parentheses at the top. (Reminder: open the console with the tilde (~) key, and type:)įirst we need to check out the value of our "count" variable, which should be 0 before we do anything. Start up the game and move to the activator. Then hit the save button on the tool bar to save your plugin. Make sure you hit "OK" on the reference form to close it. Make sure the game isn't currently running. Looking at a script's variables at run time In other words, the variable on the left of the equals sign (=) should now be set to the value of the equation on the right side of the equals sign (=). Here we are saying, take whatever value is in the variable named "count" add 1 to it, and then take that value and store it back in the "count" variable. Your script should look something like this: Select "Edit Source", which will bring up the script editing window. Reopen the pillar's Reference window, and right-click on the HelloWorldScript on the Script tab. In this case we are going to give the script we wrote in the Hello World Tutorial a variable we will use to count the number of times the player activated it, and do something different each time. You can set them, you can increment and decrement numeric values, and you can retrieve their contents at a later date. You can think of a variable like a container for information or objects.

#Bethesda creation kit wiki papyrus functions how to

How to use a conditional if-then-else statement to add logic to your scripting.How to ask a script running in the game for the values of its variables.

bethesda creation kit wiki papyrus functions

  • How to create a comment to add notes to your script for future reference.
  • This tutorial assumes you have completed the Hello World Tutorial.

    bethesda creation kit wiki papyrus functions

    4 Conditional statements (if-then-else).3 Looking at a script's variables at run time.







    Bethesda creation kit wiki papyrus functions