Aller au contenu

Photo

Following Andysks and ColorsFade's Companion Guide - At an Impass


  • Veuillez vous connecter pour répondre
11 réponses à ce sujet

#1
Sabranic

Sabranic
  • Members
  • 306 messages

When it comes time to spawn companions in an area, I am currently hitting a bit of a brick wall.  I have created a generic onload script for the area:

// Area OnClientEnter Bare Bones.nss
// client_enter_laboratory <--- Sabranic 1/5/16
/*
	Area OnClientEnter event handler template.
	Bare bones, useful to setup cutscene(s) to fire when the party enters via a party transition.
*/
// BMA-OEI 8/08/06




#include "ginc_cutscene"

int StartingConditional()
{
	// Event fired via non-party transition (Load Game, Client Join, etc.)
	if ( FiredFromPartyTransition() == FALSE )
	{
		return ( FALSE );
	}
	
	// Get party leader, force control of owned PC
	object oPC = GetFirstEnteringPC();
	object oLeader = GetFactionLeader( oPC );
	oPC = SetOwnersControlledCompanion( oLeader );
	
	object oSpeaker;
	string sDialog;
	
	// *** CUTSCENES START ***
	
	// Cutscene: TITLE_GOES_HERE
	// Uncomment and replace ( FALSE ) with condition to play cutscene
/*	
	if ( FALSE )
	{
		// Pre-cutscene setup
		// 
		oSpeaker = GetNearestObjectByTag( "TAG_OF_OWNER", oPC );	// Conversation owner
		sDialog = "DIALOG_GOES_HERE";								// Conversation file
		FireAndForgetConversation( oSpeaker, oPC, sDialog );
		return ( TRUE );
	}
*/
	
	//  *** CUTSCENES END ***
	
	// No cutscene pending, revert control to original character
	SetOwnersControlledCompanion( oPC, oLeader );
	return ( FALSE );
	
	
}

Ok everything is peachy.  Now I go to add the adapted spawning code from the guide:

int bSpawned = GetLocalInt(OBJECT_SELF, "SPAWNED");
if(!bSpawned)
{
// Spawn Safiya (id is eve)
SpawnNonPartyRosterMemberAtHangout("eve");
SetLocalInt(OBJECT_SELF, “SPAWNED”, TRUE);
}

The adapted code looks like this:

// Area OnClientEnter Bare Bones.nss
// client_enter_laboratory <--- Sabranic 1/5/16
/*
	Area OnClientEnter event handler template.
	Bare bones, useful to setup cutscene(s) to fire when the party enters via a party transition.
*/
// BMA-OEI 8/08/06




#include "ginc_cutscene"

int bSpawned = GetLocalInt(OBJECT_SELF, "SPAWNED");
if(!bSpawned)
{
// Spawn Safiya (id is eve)
SpawnNonPartyRosterMemberAtHangout("eve");
SetLocalInt(OBJECT_SELF, “SPAWNED”, TRUE);
}

int StartingConditional()
{
	// Event fired via non-party transition (Load Game, Client Join, etc.)
	if ( FiredFromPartyTransition() == FALSE )
	{
		return ( FALSE );
	}
	
	// Get party leader, force control of owned PC
	object oPC = GetFirstEnteringPC();
	object oLeader = GetFactionLeader( oPC );
	oPC = SetOwnersControlledCompanion( oLeader );
	
	object oSpeaker;
	string sDialog;
	
	// *** CUTSCENES START ***
	
	// Cutscene: TITLE_GOES_HERE
	// Uncomment and replace ( FALSE ) with condition to play cutscene
/*	
	if ( FALSE )
	{
		// Pre-cutscene setup
		// 
		oSpeaker = GetNearestObjectByTag( "TAG_OF_OWNER", oPC );	// Conversation owner
		sDialog = "DIALOG_GOES_HERE";								// Conversation file
		FireAndForgetConversation( oSpeaker, oPC, sDialog );
		return ( TRUE );
	}
*/
	
	//  *** CUTSCENES END ***
	
	// No cutscene pending, revert control to original character
	SetOwnersControlledCompanion( oPC, oLeader );
	return ( FALSE );
	
	
}

It throws the following error:  Invalid declaration type - it seems to hate "if(!bSpawned)"

 

Trying to figure out what I am doing wrong here.



#2
kevL

kevL
  • Members
  • 4 052 messages
this bit needs to go *inside* StartingConditional()
int bSpawned = GetLocalInt(OBJECT_SELF, "SPAWNED");
if(!bSpawned)
{
    // Spawn Safiya (id is eve)
    SpawnNonPartyRosterMemberAtHangout("eve");
    SetLocalInt(OBJECT_SELF, “SPAWNED”, TRUE);
}

edit: and, uh, i wouldn't use those funky quotation marks ....
  • Sabranic aime ceci

#3
Sabranic

Sabranic
  • Members
  • 306 messages

Gahhhh curse the $^@#^%& Microsoft Brand ™ punctuation.  That's what I get for cutting and pasting code. 

I have had that issue play merry hell with me at work too. 

 

Thanks for the quick reply, will try it out.

 

EDIT: worked and compiled - thank you very much!


  • GCoyote et ColorsFade aiment ceci

#4
kevL

kevL
  • Members
  • 4 052 messages

$^@#^%& Microsoft Brand ™


hmm wonder if i can change my XP loading screen to that ...

#5
Sabranic

Sabranic
  • Members
  • 306 messages

Amusing Anecdote: One of the legacy websites we maintain for the government, (built in the 1990's by brain damaged aardvarks), absolutely chokes to death if a user tries to input alternate characters anywhere in the admin - including public posts for bids. 

 

The users in question?  Aging government employees - lifers who started back when everything was hammered out on a typewriter - the "elites" among them had some experience with Word Perfect.  

 

Now, given that... imagine explaining to a group of 55 year old secretaries - who can barely open outlook without IT's help - how alternate ascii characters when cut and pasted from MICROSOFT WORD, (which shall hereto be referred to as "Luficer's Undead Aborted Child"),  causes the horrible legacy RFP bidding system, (that the bean-counters will never ever ever ever replace no matter how much of a disaster  it is - let alone security risk),  to choke to death on it's own tongue.

 

"”" and - (especially "-") are my mortal enemies.   It typically becomes my job to fix these sorts of issues... after some grandma types up their 23+ page bid in Lucifer's Undead Aborted Child, and then pastes the entire fetid mess into the decrepit admin - automatically transforming a heavily trafficked government bidding page into a broken hyper-calamity.

 

Did I mention that we offered to rebuild the entire back-end for FREE and they turned us down?  We made them sign plenty of documentation absolving us of all legal accountability.  It's not "if" but "when" the black hats get into it.


  • GCoyote aime ceci

#6
Sabranic

Sabranic
  • Members
  • 306 messages

After dealing with my Windows 8 box making me chose between disabling updates or dealing with Windows 10 nag-ware, and the STILL unresolved in Windows 7 32x wuaserv (Windows Update) RAM sucking bug on the windows 7 box, I'm starting to give serious consideration to building a Win XP 64 Pro box. 

 

hmm wonder if i can change my XP loading screen to that ...



#7
kevL

kevL
  • Members
  • 4 052 messages
here's a good read something to dream about,

me? I know one language: ASCII.
  • Sabranic aime ceci

#8
kevL

kevL
  • Members
  • 4 052 messages
xp-32 serves me well, bit low on ram tho.

#9
Sabranic

Sabranic
  • Members
  • 306 messages

Why yes you can....  I used Bootskin to change the bootscreen on my MAME cabinet, which is run by an XP box tucked into the base.

 

hmm wonder if i can change my XP loading screen to that ...



#10
kevL

kevL
  • Members
  • 4 052 messages
i would bookmark that but my Firefox bookmarks aren't working Lol

#11
GCoyote

GCoyote
  • Members
  • 341 messages

Amusing Anecdote: One of the legacy websites we maintain for the government, (built in the 1990's by brain damaged aardvarks), absolutely chokes to death if a user tries to input alternate characters anywhere in the admin - including public posts for bids. 

 

...

 

Did I mention that we offered to rebuild the entire back-end for FREE and they turned us down?  We made them sign plenty of documentation absolving us of all legal accountability.  It's not "if" but "when" the black hats get into it.

 

Some things never change. For about two - three years, the Gov't paid my company to have two of us review all incoming IT support requests and if needed, manually beat them into formats their tracking system could digest. Outlook/Word were the major source of unreadable crap. That was ~15 years ago.


  • Sabranic aime ceci

#12
Sabranic

Sabranic
  • Members
  • 306 messages

It's outrageous.  They are paying Microsoft enormous amounts of money to fly out every so often and support the server it runs on.  The main resistance to an upgrade is all coming from people on the top, and it's going to eventually  end up costing them many times what replacement would - the servers are filled to the brim with sensitive data, and a breech WILL make headlines if/when it happens.

 

Stupid.

 

My boss refers to the server as "time-bomb" in all official communication.


  • GCoyote aime ceci