Class PapyrusLatentCall
- Namespace
- SkyrimForge.Papyrus
- Assembly
- SkyrimForge.Game.dll
The suspended script a latent native left waiting, and the value that resumes it. A Return() overload resumes it.
public sealed class PapyrusLatentCall
- Inheritance
-
PapyrusLatentCall
- Inherited Members
Remarks
papyrus.RegisterLatentStatic("MyScript", PapyrusType.Int, "SlowDouble", [PapyrusType.Int],
(call, waiting) =>
{
int value = call.GetArgument(0).Int;
tasks.AddTask(() => waiting.Return(value * 2));
return true;
});
A script whose value never arrives waits for the run of the session, and nothing here counts the returns made against a stack.
Methods
Return()
Resumes the script with None, which a latent function declaring no return type returns.
public void Return()
Exceptions
- InvalidOperationException
The Papyrus VM does not exist yet or has been destroyed.
Return(bool)
Resumes the script with a bool.
public void Return(bool value)
Parameters
valuebool
Exceptions
- InvalidOperationException
The Papyrus VM does not exist yet or has been destroyed.
Return(int)
Resumes the script with an int.
public void Return(int value)
Parameters
valueint
Exceptions
- InvalidOperationException
The Papyrus VM does not exist yet or has been destroyed.
Return(float)
Resumes the script with a float.
public void Return(float value)
Parameters
valuefloat
Exceptions
- InvalidOperationException
The Papyrus VM does not exist yet or has been destroyed.
Return(string)
Resumes the script with a string.
public void Return(string value)
Parameters
valuestring
Exceptions
- ArgumentNullException
valueisnull.- InvalidOperationException
The Papyrus VM does not exist yet or has been destroyed.
Return<TForm>(TForm?)
Resumes the script with a form, bound to the class the function was registered as returning, or with None where form is null.
public void Return<TForm>(TForm? form) where TForm : struct, IForm
Parameters
formTForm?
Type Parameters
TForm
Exceptions
- InvalidOperationException
The Papyrus VM does not exist yet or has been destroyed.
Return<TForm>(TForm)
Resumes the script with a form, bound to the class the function was registered as returning.
public void Return<TForm>(TForm form) where TForm : IForm
Parameters
formTForm
Type Parameters
TForm
Exceptions
- ArgumentNullException
formisnull.- InvalidOperationException
The Papyrus VM does not exist yet or has been destroyed.