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 → Alternating Powerup
Alternating Powerup
2001-03-02, 1:26 PM #1
I read the other post on powerups and looked at the cogs, but I'm not sure how to use them.

I would like a cog that would alternate between two powerups. For example, in an MP game I would like the strifle powerup to change randomly to the bryar powerup at the same location. Since it is going to be for a Mod, it has to be done without changing the level.

Could someone help me write this cog?

------------------------
Enforce the warranty!
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2001-03-02, 8:31 PM #2
Umm... I posted that cog to other thread, but, oh well...
Quote:
<font face="Verdana, Arial" size="2">
# Jedi Knight Cog Script
#
# Randomrespawn.COG
#
# [Cave_Demon]
#
#
# This Cog is Not supported by LucasArts Entertainment Co

symbols

thing ghost
thing juttu local
template pup1
template pup2
int time=15 local
int time2 local

message startup
message entered
message touched
message timer

end

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

code
startup:
time2 = Rand();
if (time2 < 0.5)
{
juttu = CreateThing(pup1, ghost);
}
else if (time2 > 0.5)
{
juttu = CreateThing(pup2, ghost);
}
Return;

entered:
touched:
SetTimer(Time);
DestroyThing(juttu);


Return;

Timer:
time2 = Rand();
if (time2 < 0.5)
{
juttu = CreateThing(pup1, ghost);
}
else if (time2 > 0.5)
{
juttu = CreateThing(pup2, ghost);
}
Return;
end
</font>


credit me [http://forums.massassi.net/html/biggrin.gif]

------------------
The death is smiling to all of us,
All what we can do, is smile back.
WHAT?
2001-03-03, 6:29 AM #3
I saw that cog on the other post, but I don't understand how to use it. [http://forums.massassi.net/html/confused.gif] i.e., where do I put it and what vars do I need to change?

------------------
Yub-Yub, Commander.
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2001-03-03, 10:09 AM #4
It randomly generates template pup1 or template pup2 to ghost position

------------------
The death is smiling to all of us,
All what we can do, is smile back.
WHAT?
2001-03-04, 8:02 PM #5
Thanks, Demon. I'll work on it. [http://forums.massassi.net/html/wink.gif]

I'll put you in the credits whether I use the cog or not. [http://forums.massassi.net/html/smile.gif]

------------------
Yub-Yub, Commander.
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.

↑ Up to the top!