Bioware Archive
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
DKIM Added to mail server - to improve email activation.
Home
Help
Login
Register
Bioware Archive
»
Bioware Archive V2
»
Builders - Scripting
»
SetLocalInt in OnDeath-script
« previous
next »
Print
Pages: [
1
]
Author
Topic: SetLocalInt in OnDeath-script (Read 315 times)
Legacy_Green_Dragon123
Newbie
Posts: 22
Karma: +0/-0
SetLocalInt in OnDeath-script
«
on:
March 11, 2011, 02:38:26 pm »
I want to set a LocalInt in the same way as in conversations, but when a NPC dies instead. Is it possible? I haven´t been able to get it to work this far. Here´s what I´m using in case I´m doing something wrong.
Placed on the NPC´s OnDeath-event:
void main()
{
SetLocalInt(GetPCSpeaker(), "KILLEDHAROLD", 1);
}
And in the "Text appears when.."-script in a conversation with another NPC:
int StartingConditional()
{
int nKilledHarold = GetLocalInt(GetPCSpeaker(), "KILLEDHAROLD") == 1;
return nKilledHarold;
}
Thanks
Logged
Legacy_Thayan
Sr. Member
Posts: 435
Karma: +0/-0
SetLocalInt in OnDeath-script
«
Reply #1 on:
March 11, 2011, 03:02:46 pm »
Change GetPCSpeaker() in the OnDeath script to GetLastKiller()
Modifié par Thayan, 11 mars 2011 - 03:10 .
Logged
Legacy_Green_Dragon123
Newbie
Posts: 22
Karma: +0/-0
SetLocalInt in OnDeath-script
«
Reply #2 on:
March 11, 2011, 04:02:27 pm »
Yes, I figured it out. Thanks for your reply.
Logged
Print
Pages: [
1
]
« previous
next »
Bioware Archive
»
Bioware Archive V2
»
Builders - Scripting
»
SetLocalInt in OnDeath-script