Let
A command for Oblivion Script Extender.
Syntax:
(nothing) Let expr := expr
The Let statement is OBSE's version of Oblivion's Set statement. It takes the form let expr1 := expr2 where expr1 evaluates to something which can hold a value, such as a variable or array element, and expr2 is an expression of a type which can be stored in expr1. Values within expressions can include arithmetic expressions, function calls, etc. The assignment operator checks the types of its operands, so it will allow assigning a number to a short variable but not to a string_var.
ExamplesEdit
string_var str array_var arr short num let str := "a string" let str := str[0:num] + player.GetName + " some more text" let arr := ar_Construct Map let arr[(num + player.GetPos Z) / player.GetPos X] := player.GetDistance someRef ^ 2