Jump to content

Home

I need another script...


Exile007

Recommended Posts

First one:

 

int StartingConditional() {

int nResumeTalk = GetLocalBoolean(OBJECT_SELF,0);

return nResumeTalk;

}

 

I can't find the one that turns the enemy hostile, but that one is working fine.

 

So next, this one won't compile

 

void main()

{

//

GN_SetSpawnInCondition(SW_FLAG_EVENT_ON_DAMAGED);

 

GN_SetDayNightPresence( AMBIENT_PRESENCE_ALWAYS_PRESENT);

GN_SetListeningPatterns();

GN_WalkWayPoints();

}

 

 

And the last one, I think this one is to turn off the immortality.

 

void main()

{

int nCurrentHP;

int nUser = GetUserDefinedEventNumber();

if(nUser == 1006) // DAMAGED

{

nCurrentHP=GetCurrentHitPoints();

if (nCurrentHP<10) {

CancelCombat (OBJECT_SELF);

ClearAllActions();

ChangeToStandardFaction(OBJECT_SELF, 5);

 

//

SetLocalBoolean(OBJECT_SELF,0,TRUE);

 

//

SetMinOneHP(OBJECT_SELF,FALSE);

object oPC=GetFirstPC();

ActionDoCommand(ActionStartConversation(oPC));

}

 

}

 

And yeah, the enemy won't change back to neutral, and it's invincible.

 

}

Link to comment
Share on other sites

void main()
{
int nCurrentHP;
int nUser = GetUserDefinedEventNumber();
if(nUser == 1006) // DAMAGED
{
nCurrentHP=GetCurrentHitPoints();
if (nCurrentHP<10) {
CancelCombat (OBJECT_SELF);
ClearAllActions();
ChangeToStandardFaction(OBJECT_SELF, 5);

//
SetLocalBoolean(OBJECT_SELF,0,TRUE);

//
SetMinOneHP(OBJECT_SELF,TRUE);
object oPC=GetFirstPC();
ActionDoCommand(ActionStartConversation(oPC));
}

 

Try that ;)

Link to comment
Share on other sites

I can't find the one that turns the enemy hostile, but that one is working fine.

 

So next, this one won't compile

(snip)

 

In order to compile that script you need the line...

#include "k_inc_generic"

...at the top of the script. The script contains custom functions that will not be found unless you use the proper include file.

 

That you haven't compiled the OnSpawn script is most likely the cause of your problem, since the second script (which stops the fight) will not do anything at all without the setting it toggles.

 

 

#include "k_inc_generic"

void main() {
GN_SetSpawnInCondition( SW_FLAG_EVENT_ON_DAMAGED );
GN_SetDayNightPresence( AMBIENT_PRESENCE_ALWAYS_PRESENT );
GN_SetListeningPatterns();
GN_WalkWayPoints();
}

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...