|
addict
|
OP
addict
Joined: Jun 2013
|
How do I remove part of a DB, or a complete DB ? In this example: IF
ObjectFlagSet("restabortedfrommovement",_Player,_)
AND
DB_restingStatusDuration(_ShittyNight,_duration)
AND
DB_RestingPosition((CHARACTERGUID)_Player,_X,_Y,_Z)
AND
DB_restingremaining(_Player,(INTEGER)_RestingDuration)
THEN
ObjectClearFlag(_Player,"isResting");
//ObjectSetFlag(_Player,"resetTiredness"); //attention, doit absolument venir avant application de shitty night
ApplyStatus(_Player,"SHITTYNIGHT",_duration);
DisplayText(_Player,"You wake up to soon in a bad mood");
ProcObjectTimerCancel(_Player,"restIteration");
NOT DB_RestingPosition(_Player,_X,_Y,_Z);
NOT DB_restingremaining(_Player,_RestingDuration); It seems I need to call the 2 DBs, so that I can remove them (using NOT) However, is there a way to entirely remove a DB ? What would 1/NOT DB_RestingPosition(_Player); 2/NOT DB_RestingPosition(_Player,1,1,1); 3/NOT DB_RestingPosition(1); 4/NOT DB_RestingPosition(); 5/DB_RestingPosition(); do ?
|
|
|
|
addict
|
addict
Joined: Mar 2016
|
How do I remove part of a DB, or a complete DB ? In this example: IF
ObjectFlagSet("restabortedfrommovement",_Player,_)
AND
DB_restingStatusDuration(_ShittyNight,_duration)
AND
DB_RestingPosition((CHARACTERGUID)_Player,_X,_Y,_Z)
AND
DB_restingremaining(_Player,(INTEGER)_RestingDuration)
THEN
ObjectClearFlag(_Player,"isResting");
//ObjectSetFlag(_Player,"resetTiredness"); //attention, doit absolument venir avant application de shitty night
ApplyStatus(_Player,"SHITTYNIGHT",_duration);
DisplayText(_Player,"You wake up to soon in a bad mood");
ProcObjectTimerCancel(_Player,"restIteration");
NOT DB_RestingPosition(_Player,_X,_Y,_Z);
NOT DB_restingremaining(_Player,_RestingDuration); It seems I need to call the 2 DBs, so that I can remove them (using NOT) Nitpick: you cannot "call" DBs. You can either define/add (facts to) them, or undefine/delete (facts from) them. Or, as part of a condition, you can match them. However, is there a way to entirely remove a DB ? What would 1/NOT DB_RestingPosition(_Player); 2/NOT DB_RestingPosition(_Player,1,1,1); 3/NOT DB_RestingPosition(1); 4/NOT DB_RestingPosition(); 5/DB_RestingPosition();
do ?
They would all try to undefine the facts from those databases with those specific values. If these don't exist, nothing will happen. You can probably use https://docs.larian.game/Osiris/API/SysClear (which I just documented)
Last edited by Tinkerer; 27/10/17 08:11 PM.
|
|
|
|
addict
|
OP
addict
Joined: Jun 2013
|
Thanks a lot. So, once I define a DB, I cannot "destroy" it ?
|
|
|
|
addict
|
addict
Joined: Mar 2016
|
Removing all facts from a database effectively destroys it. There is no way you can detect in script that this database ever contained any facts afterwards.
|
|
|
|
addict
|
OP
addict
Joined: Jun 2013
|
Ok, that is clear, thanks a lot Tinkerer.
|
|
|
|
|