The Massassi Temple: Forums  

Go Back   The Massassi Temple: Forums > Editing Forums > Cog Forum

Reply
 
Thread Tools Rate Thread
Title: Double Whammy SetThingModel Problem
Lord_Grismath is offline Lord_Grismath
Dance Dance Resurrection
Double Whammy SetThingModel Problem | Old Posted: 06-08-2002, 05:01 AM #1
Reply With Quote

This spans 2 cogs, but ideally, I'd like to consolodate the SetThingModel command into marinerboam while still telling 01_mclothes the status of Tahben's attire.

[marinerboam]
Code:
# Jedi Knight Cog Script
#
# Cutscene: Kyle and Officer Mitchell
#
# By Anthony Piggott (akpiggott@jediknights.co.uk) for BoaM1
#
# Script not Supported by LucasArts Entertainment Co.
#
# USED BY ROX WITH ANTHONY'S PERMISSION: Slightly Modified
# 
# 4.26.02 - Now with a frame for the door, as well as an edited script.  :P
#
# ========================================================================================

symbols

message      startup                                                          
message      entered                                                          

thing        player                             local                         
sector       printsector                                                      
sound        beep                                                             
thing        iopos                                                            
thing        ioposwalk                                                        
thing        playpos                                                          
thing        ioactor                                                          
thing        iofficer                                                         
thing        cam                                                              
thing        marinercam                                                       
thing        tahbencam

thing	     marinerdoor                                                        

keyframe     talk1=kktlk1.key                                                 
keyframe     talk2=kktlk2.key                                                 
keyframe     talk3=kktlk3.key                                                 

int          kyletalks                          local                         
int          old_camera                         local                         
sound        soundGoal0=accomplish1.wav         local                         

material     ioface=kkfagoat.mat                local                         
material     kyface=kkfagoat.mat                local                         
int          AnimHandle                         local                         

sound        mitell=00gamorwakeup02.wav         local                         
sound        micarida=00gamorwakeup02.wav       local                         

thing        newcam1                                                          

sound        kymitchell=00gamorwakeup02.wav     local                         
sound        kydetain1=00gamorwakeup02.wav      local                         
sound        kydetain2=00gamorwakeup02.wav      local                         
sound        kyonemore=00gamorwakeup02.wav      local                         
sound        kybetter=00gamorwakeup02.wav       local               

cog	01_mclothes_cog          

int			status=0	local
int			fps

end                                                                           

# ========================================================================================

code

startup:

player = GetLocalPlayerThing();
	AiSetMode(ioactor, 0x2000);
	AiSetMode(iofficer, 0x2000);

	Return;

entered:
While(status==0)	
{

player = GetLocalPlayerThing();
   	if(GetInv(player, 11) < 50) SetInv(player, 11, 50.0);
   	SetFireWait(player, -1);
   	SetMountWait(player, 0);
   	TeleportThing(ioactor, iopos);
   	TeleportThing(player, playpos);
	SetActorFlags(player, 0x800000);
	SetActorFlags(player, 0xa00000);
  	StopThing(player);
	SetCameraFocus(0, cam);
        SetCurrentCamera(0);
        AISetLookPos(ioactor, GetThingPos(ioposwalk));
        AISetMovePos(ioactor, GetThingPos(ioposwalk));
	Sleep(2.0);
	SetCameraFocus(0, newcam1);
        SetCurrentCamera(0);
	kyletalks = playkey(ioactor, talk1, 1, 0x0);
	playsoundlocal(kymitchell, 1, 0, 0x0);
	AnimHandle=materialanim(kyface, fps, 1);
	Print("Tahben: Ho there, good sir! Could the rumours be true?");
	sleep(1);
	stopAnim(AnimHandle);
	SetMaterialCel(kyface,0);
	sleep(1);
	AnimHandle=materialanim(kyface, fps, 1);
	sleep(1);
	stopAnim(AnimHandle);
	SetMaterialCel(kyface,0);
	Stopkey(ioactor, kyletalks, 0);
	sleep(2);
	kyletalks = playkey(ioactor, talk2, 1, 0x0);
	playsoundlocal(kydetain1, 1, 0, 0x0);
	AnimHandle=materialanim(kyface, fps, 1);
	SetCameraFocus(0, tahbencam);
       SetCurrentCamera(0);
	Print("Tahben: Is it true that you alone survived the Sea Serpent?");
	sleep(1);
	Stopkey(ioactor, kyletalks, 0);
	stopAnim(AnimHandle);
	sleep(1);
	playsoundlocal(mitell, 1, 0, 0x0);
	AnimHandle=materialanim(ioface, fps, 1);
	SetCameraFocus(0, marinercam);
        SetCurrentCamera(0);
	Print("Mariner: Bah... leave an old man to himself...");
	sleep(1);
	stopAnim(AnimHandle);
	SetMaterialCel(ioface,0);
	sleep(2);
	kyletalks = playkey(ioactor, talk3, 1, 0x0);
	playsoundlocal(kyonemore, 1, 0, 0x0);
	AnimHandle=materialanim(kyface, fps, 1);
	SetCameraFocus(0, tahbencam);
        SetCurrentCamera(0);
	Print("Tahben: I must know how to slay such a beast.");
	sleep(3);
	stopAnim(AnimHandle);
	SetMaterialCel(kyface,0);
	Stopkey(ioactor, kyletalks, 0);
	sleep(1);
	SetCameraFocus(0, cam);
        SetCurrentCamera(0);
	sleep(1);
	playsoundlocal(kydetain2, 1, 0, 0x0);
	AnimHandle=materialanim(kyface, fps, 1);
	SetCameraFocus(0, cam);
        SetCurrentCamera(0);
	Print("You: For in doing so, I shall free these shores from its malice.");
	sleep(3);
	stopAnim(AnimHandle);
	SetMaterialCel(kyface,0);
	sleep(1);
	AnimHandle=materialanim(ioface, fps, 1);
	playsoundlocal(micarida, 1, 0, 0x0);
	SetCameraFocus(0, marinercam);
        SetCurrentCamera(0);
	Print("Mariner: Bah... good of Xanthus... hmph");
	sleep(3);
	Print("Mariner: ...I shall reveal my secret, but I request thy leaving mine abode.");
	sleep(6);
	SetCameraFocus(0, tahbencam);
        SetCurrentCamera(0);
	Print("Mariner: Seek to fire my spear 'pon her scaled brow or ribbed under, only there can she be slain.");
	sleep(3);
	stopAnim(AnimHandle);
	SetMaterialCel(ioface,0);
   	//jkPrintUNIString(player, 350);
	//playsoundlocal(soundGoal0, 1, 0, 0x0);
   	//SetGoalFlags(player, 0, 2);
	sleep(3);
	SetCameraFocus(0, newcam1);
        SetCurrentCamera(0);
	sleep(3);
	AnimHandle=materialanim(kyface, fps, 1);
	playsoundlocal(kybetter, 1, 0, 0x0);
	SetCameraFocus(0, cam);
        SetCurrentCamera(0);
	Print("You: Thank you, good sir, and I shall leave thee as promised.");
	sleep(1);
	stopAnim(AnimHandle);
	SetMaterialCel(kyface,0);
	sleep(1);
	AnimHandle=materialanim(kyface, fps, 1);
	sleep(1);
	stopAnim(AnimHandle);
	SetMaterialCel(kyface,0);
	SetCameraFocus(0, marinercam);
        SetCurrentCamera(0);
	Print("Mariner: That iron can thou walk'st in is no gear for the sea.");
	sleep(1);
	Print("Mariner: Take these lighter clothes.");
	sleep(3);
	
	SendMessage(01_mclothes_cog, user0);

	SetCameraFocus(0, tahbencam);
        SetCurrentCamera(0);
	Print("Mariner: Thank you, good sir.");
	sleep(1);

// start GrisAdd

	SetCameraFocus(0, newcam1);
        SetCurrentCamera(0);
	MoveToFrame(ioactor, 1, 1);
	WaitForStop(ioactor);
	MoveToFrame(marinerdoor, 1, 3);
	MoveToFrame(ioactor, 0, 1);
	WaitForStop(ioactor);

// end GrisAdd

   	TeleportThing(player, playpos);
	AIClearMode(iofficer, 0x2000);
	SetCameraFocus(0, player);
	SetCurrentCamera(old_camera);
	ClearActorFlags(jkGetLocalPlayer(), 0xa00000);
	status=1;
// Hmmm... let's add something... -Grismath

}
	Return;

# ........................................................................................

end
[01_mclothes]
Code:
# Jedi Knight Cog Script
#
# 01_MCLOTHES.COG
#
# THE RITES OF XANTHUS TOTAL CONVERSION
#
# Description
# 
#   I hope I did it right this time. :]
# 
# -by Lord_Grismath 
# 5.18.02
# This Cog is Not supported by LucasArts Entertainment Co

symbols

message	startup
message pulse
message	user0

int		plrflags	local

model		tclothes
model		tarmor=kk.3do	local
model		clothes
model		armor

thing		player		local

int		wear=1		local
int		slow=0		local

end

# ========================================================================================

code

startup:
player = GetLocalPlayerThing();
setpulse(1.0);
return;

user0:
if(wear == 1) {
	SetActorExtraSpeed(player, 1.2);
	SetThingModel(player, tclothes);
	wear=0;
} else {
	SetActorExtraSpeed(player, 1);
	SetThingModel(player, tarmor);
	wear=1;
}

return;

pulse:
plrflags = GetThingFlags(player);

if(plrflags & 0x2000000) {
	if(wear == 1) {
	if(slow == 0) {
		SetActorExtraSpeed(player, -1.5);
		SetGravity(6); 
		slow = 1;
	}
	}
	DamageThing(player, 3.0, 0x1, player);
} Else {
	if(slow == 1) {
		SetActorExtraSpeed(player, 0);
		SetGravity(4); 
		slow = 0;
	}
}
return;


# ........................................................................................

end
I believe that both check out with ParSec.

It's the SetThingModel commands that are boggling me, THE MODEL DOESN'T CHANGE!

Thy help is appreciated.
____________
:psyduck: PsyGris says, "Would you kindly play LoG?"
You cannot resist.
 
Descent_pilot is offline Descent_pilot
Merely "okay"
Old Posted: 06-08-2002, 07:55 AM #2
Reply With Quote

Did you add .3do file extention for the models in JED? Also, in JED, did you add both cogs and put the number of the cog in the value for 01_mclothes_cog.
These are the only things I can really think of that wouldn't make it work. Besides have the wrong name(s) (hey, we've all done it or going to do it sometime ).

------------------
The Sniper Missions. Current project, The Sniper Missions

[This message has been edited by Descent_pilot (edited June 08, 2002).]
____________
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack
 
Lord_Grismath is offline Lord_Grismath
Dance Dance Resurrection
Old Posted: 06-08-2002, 12:29 PM #3
Reply With Quote

But of course to all of the above. I'm thinking that I should perhaps consolidate 01_mclothes into marinerboam.
____________
:psyduck: PsyGris says, "Would you kindly play LoG?"
You cannot resist.
 
Lord_Grismath is offline Lord_Grismath
Dance Dance Resurrection
Old Posted: 06-09-2002, 03:49 AM #4
Reply With Quote

...and I yet again receive no further help..
____________
:psyduck: PsyGris says, "Would you kindly play LoG?"
You cannot resist.
 
SaberMaster is offline SaberMaster
Registered User
Old Posted: 06-09-2002, 06:11 AM #5
Reply With Quote

It appears that you're using SetThingModel() correctly. Try putting a print statement in user0: to make sure the message runs. Then try using LoadModel() to get a reference to a 3do instead of defining your model in the symbols section.

------------------
Author of the JK DataMaster, Parsec, and the EditPlus Cog Files.
Visit Saber's Domain.
____________
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:13 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.