Jump to content


Fair Strides

Member Since 21 Dec 2011
Offline Last Active Yesterday, 06:27 AM
*****

Posts I've Made

In Topic: Fair Strides' Script Shack

Yesterday, 06:28 AM

I would need to know the context of this "certain area" to be able to help more. Primarily, you'd set up a Trigger in the area's .git file or hijack one that already exists if it's in the right spot.

 

A Trigger is a .utt file that has several events that fire scripts, one of which is an On-enter event that activates whenever something enters the area. In this case, you'd do something like this (all < > marks are ignored; you want to pay attention to what's between them):

void main()
{
    // Get the object that triggered the event
    object oTarget = GetEnteringObject();
    object oTalker = GetObjectByTag("<tag of the object/person initiating the conversation>");

    if(oTarget == GetFirstPC()) // If the triggering object is the current player-controlled character
    {
        // Have oTalker start a conversation with the PC. The code looks long because we need the last three pieces to make the
        // game ignore the distance between oTalker and oTarget. Otherwise, the player would move to oTalker first...
        AssignCommand(oTalker, ActionStartConversation(oTarget, "<name of .dlg file, minus the extension>", FALSE, CONVERSATION_TYPE_CINEMATIC, FALSE));
    }
}

In Topic: Star Forge Robes/Darth Revan's Robes Alteration

20 May 2017 - 04:48 PM

Okay, where it gets the appearance type, try changing OBJECT_SELF to GetFirstPC(). I'm assuming that OBJECT_SELF refers to the computer instead of the PC like I thought it did.


In Topic: Star Forge Robes/Darth Revan's Robes Alteration

20 May 2017 - 04:43 PM

...In that case, can you please post the current version of the script so I'm not taking potshots at an old version? :)


In Topic: Star Forge Robes/Darth Revan's Robes Alteration

20 May 2017 - 04:35 PM

Okay, looking at my redo of the script, I made a rather severe typo that got carried over through all the iterations. I'll show it on the first example:

 

This:

	if (int1 == 91 && int1 <= 93) {
		// If P_FEM_A_01, SML, MED, or LRG
		string1 = "DP_LS_SF_Robe_F01";
	}

Is read by the game as "If they have appearance.2da row 91 AND their appearance.2da row is less than or equal to 93, proceed."

 

What it should be:

	if (int1 >= 91 && int1 <= 93) {
		// If P_FEM_A_01, SML, MED, or LRG
		string1 = "DP_LS_SF_Robe_F01";
	}

This now translates to "if they have an appearance.2da row that is equal to or between 91 and 93, proceed."


In Topic: Star Forge Robes/Darth Revan's Robes Alteration

20 May 2017 - 04:20 PM

Yeah, that should be enough, but I realized I overlooked something when you had your script up here for examination. All of your UTI resrefs are 17 characters long, when the game only accepts 16.