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 → New Button Cog
New Button Cog
2002-10-28, 5:42 AM #1
Basically, I need a cog that when activated, will throw a grenade. This is so you can still have a gun up to throw it. I know how to set it up, but I don't know how to write the cog. Also it needs to be infinte, with a 10 second reload time. If someone could make it would be helpful, and I'd put your name in the thank yous.

[This message has been edited by Dethmasta (edited October 29, 2002).]
(Hostile Takeover)
http://www.massassi.net/levels/files/1708.shtml
(RWP)
http://www.massassi.net/levels/files/1780.shtml
Check Um Out...
2002-10-30, 2:11 AM #2
Anyone please?
(Hostile Takeover)
http://www.massassi.net/levels/files/1708.shtml
(RWP)
http://www.massassi.net/levels/files/1780.shtml
Check Um Out...
2002-11-02, 10:07 AM #3
GBK isn't the only one who can write cogs for people [http://forums.massassi.net/html/wink.gif]

Code:
# Throw a grenade
#
# Created by: Hell Raiser

symbols

thing		player			local
template	Gren=+grenade1	local

int			wait=0			local

message		startup
message		activated
message		timer

end

code

startup:

	player=GetLocalPlayerThing();
	wait=0;

return;

activated:

	if(Wait) return;

	wait=1;

	FireProjectile(player, Gren, -1, 15, '0.05 0 0', '0 0 0', 0, 0, 0, 0);

	SetTimer(10);

return;

timer:

	wait=0;

return;

end


To change the grenade from the one that explodes on contact to the bouncy one, change Gren=+grenade1 to Gren=+grenade2. [http://forums.massassi.net/html/smile.gif]

------------------
-Hell Raiser
Without struggles there is no progress
DBZ: The Destruction is Real

[This message has been edited by Hell Raiser (edited November 02, 2002).]
-Hell Raiser

↑ Up to the top!