Jump to content

Home

Invisible Spawn problem ...


GeorgNihilus

Recommended Posts

Hi. Well, now I have spawned a couple of Mandalorians somewhere and curiously they are invisible, like if they have stealth generators but they don't. Even spawning them with player_male aspect or commoners aspect without any armors or mandalorians armors still show them invisible.

oh and fighting them don't turn them visible either ...

 

I've used the same scripts in other modules and that didn't happen :confused: ...

 

ideas? thanks on advance :)

Link to comment
Share on other sites

I have tried in both the Dxun jungle and the Dxun landing modules, first I thought the stealthy mandalorians in the jungle module could be affecting somehow the spawns but later I tried in the landing module and invisibility persists.

 

Previously it worked in a Telos polar module, inside Atris academy.

It's very strange because even the bodybags doesn't appear :fist: ...

 

thanks :)

Link to comment
Share on other sites

this script is for on Notice field of the utcs:

 

// script for OnNotice script field in Scripts tab for 2º mandalorian in Dxun jungle mod

 

#include "k_inc_generic"

 

void main() {

 

int bRun;

float fRange;

float fTimeout;

 

// Get object reference to the NPC I just spotted.

object oSeen = GetLastPerceived();

object oPC = GetFirstPC();

object oMaS = GetObjectByTag("ff_mandscout2");

 

// If the character I see is the player character ...

// AND I haven't already done this...

if (GetLastPerceptionSeen() && oSeen == GetFirstPC() && !GetLocalBoolean(OBJECT_SELF, 50)) {

 

// Set that I've done this...

SetLocalBoolean(OBJECT_SELF, 50, TRUE);

 

// Stop doing anything I'm currently doing.

ClearAllActions();

 

// Attacks PC when seeing him/her

AssignCommand(oMaS, GN_DetermineCombatRound(oPC));

 

}

// Not seeing the player, or this has already been done. Do standard AI instead.

else {

ExecuteScript("k_ai_master", OBJECT_SELF, 1002);

}

}

 

and this one spawn the mandalorians:

 

void main() {

 

float x1=-69.60f; // 1º mandy coords

float y1=68.54f;

float z1=120.195f;

float o1=254.27f;

 

vector vecNPC=Vector(x1,y1,z1);

location locNPC=Location(vecNPC,o1);

 

// set coordinates for 2nd mandalorian

float x2=-62.85f;

float y2=63.428f;

float z2=120.214f;

float o2=202.34f;

 

vector myVe2 = Vector(x2,y2,z2);

location locNPC2 = Location(myVe2, o2);

 

// create new mandalorians

object oNPC=CreateObject(OBJECT_TYPE_CREATURE,"ff_mandscout",locNPC);

object oNPC2=CreateObject(OBJECT_TYPE_CREATURE,"ff_mandscout2",locNPC2);

 

}

 

and there's one more for the On Spawn field, I'll post it later ... :)

 

so? :raise:

Link to comment
Share on other sites

Uh....... :confused: I'm not very good with scripts. I've only made 5 scripts, 2 of which I think don't even work, so I can't really help you, so ask a scripting expert. Sorry. :giveup: But I'm not at my best right now. I'm having a migraine. Just, I hope you find and fix your error.

Link to comment
Share on other sites

I don't see any logical errors in the script, but it does seem a little clunky with too many unnecessarily declared variables. If you are only calling those vector locations one time, it is far more efficient to simply use the coordinates in your vector call rather than load it with one-use statically assigned variables.

 

However, the above quibble has nothing to do with what is not working... unless it is the extra spaces in your last two lines (I'm sure this is a copy/paste error, but maybe not). Note that scout has extra spaces....

Link to comment
Share on other sites

Yeah some unnecessary variables were kept from the script I edited, and thanks for clearing the vector locations issue. Anyway, as u said, I don't see any relation with the fact that my mandalorians are spawned invisible, it's like their texture is missing or something but they're not. Or like if they had stealth devices activated but they don't have.

So, everything works (the spawn, the mandalorians attacking me as they should, EXCEPT this very odd invisibility issue).

 

Here u have to take a look at the OnSpawn script, although it's just the default k_def_ambmob one with comments in or out to walk randomly:

 

//:: k_def_ambient

/*

Inteligent Ambient Custom On Spawn In Script

*/

 

#include "k_inc_generic"

#include "k_inc_debug"

 

void main()

{

// WALK WAYPOINT BEHAVIORS (Comment In or Out to Activate ) ****************************************************************************

//GN_SetSpawnInCondition(SW_FLAG_WAYPOINT_WALK_CIRCULAR);

//GN_SetSpawnInCondition(SW_FLAG_WAYPOINT_WALK_ONCE);

//GN_SetSpawnInCondition(SW_FLAG_WAYPOINT_WALK_PATH);

GN_SetSpawnInCondition(SW_FLAG_WAYPOINT_WALK_RANDOM);

//GN_SetSpawnInCondition(SW_FLAG_WAYPOINT_WALK_RUN);

//GN_SetSpawnInCondition(SW_FLAG_WAYPOINT_WALK_STOP); //Causes the creature to pause for 1 - 3 seconds at a waypoint

//GN_SetSpawnInCondition(SW_FLAG_WAYPOINT_WALK_STOP_LONG); //Causes the creature to pause for 6 - 12 seconds at a waypoint

//GN_SetSpawnInCondition(SW_FLAG_WAYPOINT_WALK_STOP_RANDOM); //Causes the creature to pause for 1 - 12 seconds at a waypoint

//GN_SetWalkWayPointsSeries(1); //If this function is uncommented a number from 1 to 99 must be passed. This number represents

//a waypoint series that uses the string "01" through "99" instead of the creature's tag.

// eg. WP_22_01 through WP_22_05. 22 is the series number set with this function.

 

//GN_SetSpawnInCondition(SW_FLAG_FAST_BUFF);

//GN_SetSpawnInCondition(SW_FLAG_AMBIENT_ANIMATIONS);

GN_SetSpawnInCondition(SW_FLAG_AMBIENT_ANIMATIONS_MOBILE);

//This will play Ambient Animations until the NPC sees an enemy or is cleared.

//NOTE that these animations will play automatically for Encounter Creatures.

//GN_SetSpawnInCondition(SW_FLAG_ON_DIALOGUE_COMPUTER);

//When a creature with this flag is talked to a computer dialogue will come up instead of the usual screens.

 

// CUSTOM USER DEFINED EVENTS

/*

The following settings will allow the user to fire one of the blank user defined events in the NW_D2_DefaultD. Like the

On Spawn In script this script is meant to be customized by the end user to allow for unique behaviors. The user defined

events user 1000 - 1010

*/

//GN_SetSpawnInCondition(SW_FLAG_EVENT_ON_HEARTBEAT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1001

//GN_SetSpawnInCondition(SW_FLAG_EVENT_ON_PERCEPTION); //OPTIONAL BEHAVIOR - Fire User Defined Event 1002

//GN_SetSpawnInCondition(SW_FLAG_EVENT_ON_ATTACKED); //OPTIONAL BEHAVIOR - Fire User Defined Event 1005

//GN_SetSpawnInCondition(SW_FLAG_EVENT_ON_DAMAGED); //OPTIONAL BEHAVIOR - Fire User Defined Event 1006

//GN_SetSpawnInCondition(SW_FLAG_EVENT_ON_DISTURBED); //OPTIONAL BEHAVIOR - Fire User Defined Event 1008

//GN_SetSpawnInCondition(SW_FLAG_EVENT_ON_COMBAT_ROUND_END); //OPTIONAL BEHAVIOR - Fire User Defined Event 1003

//GN_SetSpawnInCondition(SW_FLAG_EVENT_ON_DIALOGUE); //OPTIONAL BEHAVIOR - Fire User Defined Event 1004

//GN_SetSpawnInCondition(SW_FLAG_EVENT_ON_DEATH); //OPTIONAL BEHAVIOR - Fire User Defined Event 1007

//GN_SetSpawnInCondition(SW_FLAG_EVENT_ON_DISTURBED); //OPTIONAL BEHAVIOR - Fire User Defined Event 1008

//GN_SetSpawnInCondition(SW_FLAG_EVENT_ON_BLOCKED); //OPTIONAL BEHAVIOR - Fire User Defined Event 1009

//GN_SetSpawnInCondition(SW_FLAG_EVENT_ON_FORCE_AFFECTED); //OPTIONAL BEHAVIOR - Fire User Defined Event 1010

 

// DEFAULT GENERIC BEHAVIOR (DO NOT TOUCH) *****************************************************************************************

 

GN_SetDayNightPresence(AMBIENT_PRESENCE_ALWAYS_PRESENT);

 

GN_SetListeningPatterns(); //This function although poorly named sets up the listening patterns and other important data for the

//creature it should never be removed.

GN_WalkWayPoints();

}

thanks :)

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...