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 → Fan hurts only host - Cog help needed
Fan hurts only host - Cog help needed
2002-03-21, 5:33 AM #1
Hi guys!

I've got three fans that are supposed to hit those you touch them:
Code:
symbols

thing		fan1	linkid=1
thing		fan2	linkid=2	
thing		fan3	linkid=3	
flex	damage_amount
int dummy	local
message     touched
end

code

touched:
   if ((GetSenderId()==1) || (GetSenderId()==2) || (GetSenderId()==3))
	{
	player = GetLocalPlayerThing();
	dummy = DamageThing(player, damage_amount, 0x01, player);
	}
Return;	
end


Problem: They only hurt the host, no matter who touches the fan. (i.e. if player 3 touches the fan, the host gets hurt)

Help?

Cheers,
Goofz
2002-03-21, 7:02 AM #2
Ok, I don't know a thing about mp cogs (and little about any other cogging [http://forums.massassi.net/html/smile.gif]) but I think it needs flags.

0x100 = Cog runs locally on all machines
that might do it.
So add flags=0x100 above the symbols section.
If that doesn't work, try 0x40

APT 1, 2, 3/4, 5/6
TDT
DMDMD

http://veddertheshredder.com
2002-03-21, 11:55 AM #3
Just flag the cog as local by adding 'flags=0x240'

Raynar
Pagewizard_YKS: "making your own lightsaber doesn't make you a nerd... "
Raynar - the man with a 10.75" ePenis
2002-03-22, 5:40 AM #4
Hi!

Thanks guys! I'll try that :-)

Cheers,
Goofz
2002-03-25, 2:01 PM #5
change:
player = GetLocalPlayerThing();
-to-
player = GetSenderRef();

that should fix it if those don't

↑ Up to the top!