Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → cog crashes me
cog crashes me
2001-07-17, 3:16 PM #1
Code:
# Jedi Knight Cog Script
#
# BODY.COG
#
# Leave a gib-able body behind if player gets killed by other means
#
# [GB]
#
# no lucasfarts involved,
# Lucasarts either.

flags=0x240

symbols

keyframe	dieanim=kyftdeth.key	local

thing		player			local
thing		body			local
int		check=0			local
message     created
message     damaged
message     trigger
message     setmodel
end

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

code
created:
	check = 0;
	body = GetSenderRef();
	SetThingFlags(player, 0x10);
   	PlayKey(body, dieanim, 1, 0x14);
	
   Return;

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

damaged:
	if(GetParam(1)==10) {
	SetTimer(10);
	SetThingFlags(body, 0x10);
   	SendTrigger(-1, 1000, body, 0, 0, 0); }
   Return;

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

trigger:
if(GetSourceRef()==1002) {
if(check==0) {
	player=GetParam(0);
	call setmodel; } }
return;

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

setmodel:
	check=1;
	SetThingModel(body, GetThingModel(player));
return;

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

timer:
destroyThing(body);
return;
end


when i shoot the dead body(of me, i havnt tried shooting a different player's body) the game immediatly exits.
I'm just an old man with a skooma problem.
2001-07-17, 4:10 PM #2
Maybe its the blasphemous comments toward Lucarts that are causing it to crash.
2001-07-17, 4:11 PM #3
hah
I'm just an old man with a skooma problem.
2001-07-17, 4:29 PM #4
Does it crash immediately when you shoot or after your 10 second timer?

'SetThingFlags(player, 0x10);' - are you trying to set the body invisible? Or are you trying to make it part of world geometry (0x8) as well as dead (0x2). Otherwise you would need 'SetThingFlags(player, 0xA);'

The only thing that could make it crash, though, is if the 'body' variable was not set for some reason. Try to print() some debug text to see if this is the problem.

Raynar

------------------
... the Jedi I admire the most, met up with Darth Maul, now he's toast ...
Rbots - a project to develop a working Bot for Jedi Knight... download the latest development version here


[This message has been edited by Raynar (edited July 17, 2001).]
Pagewizard_YKS: "making your own lightsaber doesn't make you a nerd... "
Raynar - the man with a 10.75" ePenis
2001-07-17, 4:31 PM #5
I'm not sure how the cog is suppose to work,...but maybe the SetThingsFlag Should be a SetActorFlag...Actor flag for invisibility is 0x80. Or maybe the palyer thing needs to be flagged specifically to be a "player" or "actor" thing.
Really I dont have a clue but i wanted to try atleast to give you some positive feedback. Good luck.
2001-07-17, 4:57 PM #6
I got it to work, thanks anyway.

the template was of "player" type, thats why it crashed when i destroyed it. i made it an actor and it worked.

ironicly, making it a "corpse" type didnt work
I'm just an old man with a skooma problem.
2001-07-17, 7:26 PM #7
Aye, a player template w/o having a player behind it is rather bad.. I discovered this way back when when I "hacked" on the Zone.. made a gun that dropped a walkplayer, by mistake. So there were like dozens of them standing there like statues.. one single bullet hits one and *boom* there goes the level [http://forums.massassi.net/html/frown.gif]

↑ Up to the top!