View Single Post
Old 05-10-2013, 05:49 AM   #298
Hassat Hunter
Forumite
 
Join Date: Jan 2010
Posts: 557
Need some help. Here's a script to make Atton and the PC get Pazaak cards in their hand. All good, and it works... but the PC's cards are invisible. Atton works fine, just not the PC.
If the convo ends I find the cards in my hand, still invisible. Swapping with other weapon and back makes visible, so tried unequipping and re-equipping... didn't work. Tried adding a specific "render" to the pazaak cards, didn't work. Not quite sure what more to try.
I'd rather use the real player than a fake dummy, as that complicates things down the road for what I want... so, anyone got a clue what to do?
Code:
void main () {
	object oPC = GetFirstPC();
	object oAtton = GetObjectByTag("Atton");
	int nParam1 = GetScriptParameter(1);
	if ((nParam1 == 0)) {
		SetGlobalFadeOut(0.0, 0.0, 0.0, 0.0, 0.0);
		SetGlobalFadeIn(1.0, 1.0, 0.0, 0.0, 0.0);
		GiveItem(GetItemInSlot(4, oPC), oPC);
		GiveItem(GetItemInSlot(5, oPC), oPC);
		GiveItem(GetItemInSlot(4, oAtton), oPC);
		GiveItem(GetItemInSlot(5, oAtton), oPC);
		CreateItemOnObject("w_pazaak_01", oPC, 1, 1);
		CreateItemOnObject("w_pazaak_01", oAtton, 1, 1);
		DelayCommand(0.5, AssignCommand(oPC, ActionEquipItem(GetObjectByTag("w_pazaak_01"), 4, TRUE)));
		DelayCommand(0.5, AssignCommand(oAtton, ActionEquipItem(GetObjectByTag("w_pazaak_01"), 4, TRUE)));
		AssignCommand(oPC, ActionJumpToLocation(Location(Vector(54.15430,45.80115,1.80000),260.0f)));
		AssignCommand(oAtton, ActionJumpToLocation(Location(Vector(54.26917,43.75487,1.80000),60.0f)));
		DelayCommand(0.8, AssignCommand(oPC, ActionPlayAnimation(38, 1.0, (-1.0))));
		DelayCommand(0.8, AssignCommand(oAtton, ActionPlayAnimation(38, 1.0, (-1.0))));
	}
}
Hassat Hunter is offline   you may: quote & reply,