Larian Banner
Previous Thread
Next Thread
Print Thread
Changing NPC property via osiris? #631951
18/10/17 12:27 PM
18/10/17 12:27 PM
Joined: Sep 2017
Posts: 159
M
monzua Offline OP
member
monzua  Offline OP
member
M

Joined: Sep 2017
Posts: 159
Hi I want to Change the "teleportable" flag via osiris Story script based on specifc conditions in runtime.

Is that possible or is there a different way to block teleport skill to work on a target based on an osiris Event during combat?

thx!

Last edited by monzua; 18/10/17 12:28 PM.
Re: Changing NPC property via osiris? [Re: monzua] #631979
18/10/17 03:06 PM
18/10/17 03:06 PM
Joined: Sep 2017
Posts: 35
UK
Scottworld Offline
apprentice
Scottworld  Offline
apprentice

Joined: Sep 2017
Posts: 35
UK
Bump...

I would also like to change the "player" to "true"

am almost at the point where I got an NPC to join a party after a dialogue.

From digging about... it seems that there are a number of calls to add an NPC to the party (and also set what type of character they are). I have not found exactly how this is done.

Here is the relative story code... I think they use.


//REGION Recruitment
IF
DialogEnded("Lohse_Recruitment",_)
THEN
ObjectClearFlag(CHARACTERGUID_S_Player_Lohse_bb932b13-8ebf-4ab4-aac0-83e6924e4295,"FTJ_LohsePlayPossesseddAnimation",0);

IF
ObjectFlagCleared("FTJ_LohsePlayPossesseddAnimation",CHARACTERGUID_S_Player_Lohse_bb932b13-8ebf-4ab4-aac0-83e6924e4295,_)
THEN
CharacterSetAnimationOverride(CHARACTERGUID_S_Player_Lohse_bb932b13-8ebf-4ab4-aac0-83e6924e4295,"");

PROC
PROC_GLO_PartyMembers_Add(CHARACTERGUID_S_Player_Lohse_bb932b13-8ebf-4ab4-aac0-83e6924e4295,(CHARACTERGUID)_Avatar)
AND
NOT DB_GlobalFlag("FTJ_LV_SetUp")
THEN
ObjectSetFlag(_Avatar,"GLO_Lohse_RecruitedInFortJoy");

PROC
PROC_GLO_PartyMembers_Add(CHARACTERGUID_S_Player_Lohse_bb932b13-8ebf-4ab4-aac0-83e6924e4295,(CHARACTERGUID)_Avatar)
AND
DB_GlobalFlag("FTJ_LV_SetUp")
THEN
ObjectSetFlag(_Avatar,"GLO_Lohse_RecruitedInLV");

Re: Changing NPC property via osiris? [Re: monzua] #632035
18/10/17 07:20 PM
18/10/17 07:20 PM
Joined: Mar 2016
Posts: 506
Belgium
T
Tinkerer Offline

addict
Tinkerer  Offline

addict
T

Joined: Mar 2016
Posts: 506
Belgium
Originally Posted By: monzua
Hi I want to Change the "teleportable" flag via osiris Story script based on specifc conditions in runtime.

Is that possible or is there a different way to block teleport skill to work on a target based on an osiris Event during combat?

If you look at the stats for the teleport skills (Stat editor -> Projects -> Shared -> SkillData -> Skill_Teleportation), then in the column "TargetConditions" you can see "(Character|Dead);!Grounded". This means the target must be a living character or dead, and it must not have the "grounded" status. Hence, this will block teleportation indefinitely:
Code:
ApplyStatus(_Char,"GROUNDED",-1.0);


To remove it:
Code:
RemoveStatus(_Char,"GROUNDED",-1.0);

Re: Changing NPC property via osiris? [Re: Scottworld] #632038
18/10/17 07:24 PM
18/10/17 07:24 PM
Joined: Mar 2016
Posts: 506
Belgium
T
Tinkerer Offline

addict
Tinkerer  Offline

addict
T

Joined: Mar 2016
Posts: 506
Belgium
Originally Posted By: Scottworld
Bump...

In the future, please don't hijack threads. Create new ones for different questions (and there's really no need to bump threads if they haven't been answered within 3 hours).

Quote:

I would also like to change the "player" to "true"

am almost at the point where I got an NPC to join a party after a dialogue.

To turn a character into a player and have them join the party, use the PROC_GLO_PartyMembers_Add(_CompanionChar,_RecruiterChar) procedure.

To remove them again, use PROC_GLO_PartyMembers_Remove(_CompanionChar,1) .

Re: Changing NPC property via osiris? [Re: monzua] #632090
18/10/17 10:56 PM
18/10/17 10:56 PM
Joined: Sep 2017
Posts: 35
UK
Scottworld Offline
apprentice
Scottworld  Offline
apprentice

Joined: Sep 2017
Posts: 35
UK
Thanks for that... you must work for my manager, as you have just copied my question, including the answer I proposed and then posted it as the solution. You will go far, my friend....

I have created a new thread... as requested... if you could show us how to add an NPC to the party after accepting (via a dialog) by setting the flags that would be most useful to the community,

http://larian.com/forums/ubbthreads.php?ubb=showflat&Number=632089#Post632089

and am looking forward to the answer to the original question (in detail) ... or mine (which I think is related)


Moderated by  Dom_Larian, Larian_Koala 

Powered by UBB.threads™ PHP Forum Software 7.6.2