Project

General

Profile

Feature #4072

openmw-cs : extra modifying functions

Added by openmw hardcore 18 days ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Scripting
Target version:
Start date:
09/03/2017
% Done:

0%

Severity:
Normal

Description

add extra functions for modifying values

right now we only have these functions:

if current health is 20/400
sethealth 1000 will make it 1000/1000 ; setting both current and max to 1000, ratio becomes the same after the function
modhealth 1000 will make it 1020/1400 ; adding 1000 to both current and max health, ratio is the same before and after the function
modcurrenthealth 1000 will make it 400/400 ; adding 1000 to current health only, will not exceed the max health
gethealth ; returns current health

modifying can be more flexible, when we have, the following functions, for example:
setcurrenthealth 50 will make it 50/400 ; sets only the current health to the value, will kill the character if value is 0
setmaxhealth 50 will make it 20/50 ; sets only the max health to the value, will kill the character if value is 0
modmaxhealth 50 will make it 20/450 ; adds 50 to the max health.
getmaxhealth ; returns the max health

scripts can be less tedious and simpler, with these functions

Also available in: Atom PDF