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 → touched: damage? What's wrong?
touched: damage? What's wrong?
2000-10-19, 8:37 AM #1
Hi.

This cog works only once (i.e. it damages the player when he touches one of the 3 fans) but after he's been killed once, it doesn't do anything any longer. What's more. JK starts to behave rather strange (e.g. ForceJump-dots appearing around the player all the time, player not taking damage from explosions)
It's MP, btw.:
Code:
symbols

thing		fan1	
thing		fan2	
thing		fan3	
flex	damage_amount
	
int dummy	local

message     touched


end

code

touched:
   if ((GetSenderId=fan1) | | (GetSenderId=fan2) | | (GetSenderId=fan3))
	{
	player = GetLocalPlayerThing();
	dummy = DamageThing(player, damage_amount, 0x01, player);
	}
Return;	

end


Any idea? Sorry, I know nearly nothing about cogging.

Cheers,
Goofz
2000-10-19, 10:12 AM #2
Code:
# Jedi Knight COG
# 
# Made by Zecks
#
# Not made by LucasArts.

symbols
thing		fan1	linkid=1
thing		fan2	linkid=1
thing		fan3	linkid=1
flex	damage_amount	
int dummy	
local
message     touched

end

# ---------

code

touched:   

player = GetLocalPlayerThing();	 

DamageThing(player, damage_amount, 0x01, 1);
Return;	

# -------

end


I believe that is the right DamageThing(); that you used. Let me know if that doesn't work.


------------------
Mmm.... have a donut.
2000-10-20, 10:04 AM #3
To see if equalized in "if" statement, use 2 "=" signs.

if(this == that) doThis;

And you don't do GetSenderID() by name like that, rather use "GetSenderID()" (with brackets) and put

thing this linkid=0
thing that linkid=1

And check if the sender ID is equal to 0 or 1 etc.

------------------
http://millennium.massassi.net/ - Millennium

[This message has been edited by Hideki (edited October 20, 2000).]
2000-10-20, 11:56 AM #4
Hi.

Great! Thanks you two! That worked. Stupid me with the =='s (I really shoud have known... [http://forums.massassi.net/html/smile.gif] )

thanks again!

Cheers,
Goofz

↑ Up to the top!