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 → It dinnah work!
It dinnah work!
2004-11-12, 4:30 PM #1
I'm trying to make a COG so that, after activating an item, it allows the player to rotate through a series of cels on a material (returning to cel #1 after it hits the last cel) when they press primary fire, and then reset the material to cel 0 when they press secondary fire.

Code:
# Jedi Knight Cog Script
#
# transit_system.cog
#
# This handles the inter-island transportation/ferry system
# 
#
# This Cog is Not supported by LucasArts Entertainment Co

symbols

message	activated
message	startup
message	fire

thing		console0		linkid=20
thing		console1		linkid=20

material	ticket_con

int		CurrentCel=0		local
int		Mode=0			local
int		player			local

end

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

code

startup:
	player = GetLocalPlayerThing();

activated:

	if(GetSenderID()==20) {
		SetActorFlags(player, 0x40000);
		call fire;
		}

	return;

fire:
	Mode = GetSenderRef();
	if (Mode==0) {
		CurrentCel=GetMaterialCel(ticket_con);
		if(CurrentCel!=4) {
		SetMaterialCel(ticket_con,(CurrentCel+1));
		}
		else {
		SetMaterialCel(ticket_con, 1);
		}
	}
	else if (Mode==1) {
		ClearActorFlags(player, 0x40000);
		SetMaterialCel(ticket_con, 0);
		}
	return;



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

end


But it won't work. I've tried removing the partial immobilization of the player, thinking it might freeze the controls, but it makes no difference.
the idiot is the person who follows the idiot and your not following me your insulting me your following the path of a idiot so that makes you the idiot - LC Tusken
2004-11-12, 4:32 PM #2
Sorry to say this, but you can't call fire from the message activated to get the fire mode. Unless this is mots, I don't know of a way to do it.
Sam: "Sir we can't call it 'The Enterprise'"
Jack: "Why not!"
2004-11-12, 5:21 PM #3
You're going to have to make a seperate weapon that functions like an item. When you pull it out, and press fire, you can then get the mode and either send a message to another cog or handle it all in the item cog.
</sarcasm>
<Anovis> mmmm I wanna lick your wet, Mentis.
__________
2004-11-12, 6:48 PM #4
Quote:
Originally posted by SG-fan
Sorry to say this, but you can't call fire from the message activated to get the fire mode. Unless this is mots, I don't know of a way to do it.


Ugh geeze. :p

Under activated: instead of call Fire; just put ActivateWeapon(player, firewait, mode);
-Hell Raiser
2004-11-12, 8:40 PM #5
Quote:
Originally posted by SG-fan
Sorry to say this, but you can't call fire from the message activated to get the fire mode. Unless this is mots, I don't know of a way to do it.[/i]


I said you can't use the call command to activate the fire message, or rather I intended it to mean that. I can see how you misunderstood it, I left it too open when I said call. I meant the call verb itself.

I also stated that I didn't know everything about this, and that there might be a way to do it. [whiny voice]So there :p [/whiny voice]

I admit I don't know everything.
Sam: "Sir we can't call it 'The Enterprise'"
Jack: "Why not!"
2004-11-12, 10:35 PM #6
S'aight. :D Gotta watch out for them homonyms. ;)
-Hell Raiser

↑ Up to the top!