Recommended Posts

The map rotation in a few modules, like the Endar Spire, differs between the layout and the game (seemingly entirely to best fit the mini-map on screen) but the cardinal direction script constants remain the same. 0 degrees is always East.

Share this post


Link to post
Share on other sites

Yes. I think that is precisely what I read. Just pointing that in the E.S. you have to keep in mind that the cardinal points doesn't match and it can be confusing.

------------------------------------------------------------------------------------------------

If can be useful for people that find the same problem.

I've set another Trigger but due its position in the Module I've needed set it as "On Exit" instead "On Enter". Most of times it works fine but I realized that, once inside the area of activation, if I wait some time and a random NPC (in my case a droid walking between its waypoints) gets inside then outside before I do it, the Trigger was not working properly.

So I've changed the "Entering" instances of the Spawn Script for "Exiting", and works fine.

void main() {

    object oExiting = GetExitingObject();
    location lLoc = Location(Vector(29.35,104.59,-0.07), 270.0);

    if (GetIsPC(oExiting))
          {
            CreateObject(OBJECT_TYPE_CREATURE, "d_end_sith03", lLoc);
            CreateObject(OBJECT_TYPE_CREATURE, "d_end_sith02", lLoc);
            DestroyObject(OBJECT_SELF);
          }
}

Edit: btw, it's no so simple as <<ah, as it's an "On Exit" Trigger the Script must be "Exiting Object">> although seems so it's no so easy. It's related with how and when the Script gets the Object or/and different/multiple Objects. In this case the "Exiting" form fixed my issue.

Edited by Obi Wan Pere

Share this post


Link to post
Share on other sites

For evident esthetic reasons I don't want that the PC be facing the direction where the NPCs spawns (maybe I could try spawning first a smoke cloud in Fu-Manchu style but doesn't match with my idea of Star Wars :lol:) so I've tried forcing the face direction of the PC but it doesn't work.

void main() {

     location lLoc = Location(Vector(29.05,68.0,-1.27), 90.0);

          {
               object oPC = GetFirstPC();
               AssignCommand(oPC, SetFacing(315.0));
               CreateObject(OBJECT_TYPE_CREATURE, "d_end_sith03", lLoc);
               CreateObject(OBJECT_TYPE_CREATURE, "d_end_sith02", lLoc);
               DestroyObject(OBJECT_SELF);
          }
}

Besides that makes me think a thing that I had in mind some time ago but I couldn't get it work, that is that the NPCs be spawned (or loaded in the Module) in Stealth Mode, as they are in the Harbinger in TSL. Is it possible?

Share this post


Link to post
Share on other sites

Trying to orient the PC while the player is directly controlling them is pointless, as it will be ignored/overriden. You'll need to either put the trigger further away out of direct line of sight, or trigger a cutscene with a fade-out to hide the spawn-in.

As to the Harbinger assassins, no, you can't replicate their exact process, since Obsidian added new engine and script functions that allow for creatures to have their render status toggled on and off. You could approximate it by spawning them in off-screen with the stealth effect either applied in their OnSpawn or applied afterwards, then jump them into position. The Harbinger assassins don't get their render flag enabled for 2 seconds after they spawn, to allow time to add the stealth effect. They then have an OnDamage event in their UserDefine script that removes the stealth effect. This also uses an added function not in K1, but I think that could be gotten around by chaining a few other functions together (presumably why Obsidian added a new function to do it in one command).

  • Thanks 1

Share this post


Link to post
Share on other sites

So I can spawn the NPCs in a Loc I'm sure is out of sight of the PC (and that do not active the combat mode) then apply the Stealth Effect, then make jump the NPCs to the desired Loc? that is the trick?

And if it works as it has to do, the NPCs spawn in the desired Loc in Stealth Mode, and when "see/perceive" the PC they enter in Combat Mode (they're hostile from the start) deactivating the Stealth Mode, isn't it?

And how apply the Stealth Effect?

Share this post


Link to post
Share on other sites

As I said above, the stealth effect gets disabled when they take damage. You can try the attached. The xxx_ud script needs to be added to the UTC's UserDefine script slot. The xxx_sp script gets added to the OnSpawn script slot. You can rename them whatever you want, just don't let the filename exceed 16 characters.

I'm not entirely sure if the UserDefine script will work properly or not, so you'll have to see what happens. Also you need to wait for at least 2.1 seconds after you spawn them to jump them to the new location to make sure the OnSpawn script has finished.

Invis_Assassins.7z

Share this post


Link to post
Share on other sites

Padawan, there is a very large difference between "this doesn't work" and "I don't know how to make this work".

Simply saying "it doesn't work" is not helpful in trying to diagnose a problem. Lay out exactly what you did and how you did it.

  • Like 1

Share this post


Link to post
Share on other sites

Mmm... Semantic matters? I agree. Perhaps you're beginning to see my point when I ask a clarification (and that I have to make a double interpretation, first from english, after -the most problematic for me- the scripts itself) and that never has been a secret that I have no idea of scripting, keeping in mind that 2 months ago I even didn't know how extract a file and 1 month ago I didn't know what kind of files they are and the function of the .nss/.ncs

Anyway, honored to be a Padawan (even if you have to be the Master ...sometimes :P:lol:). So I'd ask tons of patience and do not cross a line, often very thin.

-----------------------------------------

Last night was too late for test in deep and today I've had to let it just after post, so neither.

I have no tools for take videos in game and I don't think a screenshot be useful, just say that the graphics are corrupted until the NPC is decloacked. I didn't modify nothing, just renamed and placed the scripts in its slots.

It'd hadn't to be related but seeing the video I see the same graphic glitch or very similar at the start (but no all the times). A "dancing" (as the character move) black screen covering almost all the scenario.

So let me check if is a problem with the video configuration but I have to recompile again all the thing with these files.

Glitch.JPG

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.