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 → cog help
cog help
2001-12-04, 1:56 PM #1
I'm trying to make a cog that gives the player infinite force mana. I made the cog but I havent figured out how to give the player infinite mana. please help!
I droped a trip mine around here, could you help me look for it?
2001-12-04, 6:26 PM #2
Run an array, inside a pulse, setting all the force power's bin values at max.

------------------
Success is the inverse relationship between effort, gain, and loss.
And when the moment is right, I'm gonna fly a kite.
2001-12-05, 3:41 AM #3
To give the player infinite mana, open up the items.dat and look at bin 14. Change the max from 400 to whatever is high enough for you. Then open up force_well.cog and take out this line:
Code:
if(GetInv(player, 14) > GetInv(player, 20) * 50)
	SetInv(player, 14, GetInv(player, 20) * 50);


That will stop the cog from limiting the player's max mana. That should be all you have to do to make the mana infinite. [http://forums.massassi.net/html/smile.gif]
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2001-12-05, 3:18 PM #4
thanks for the help.

this worked in my test but just to make sure is there any reason this cog might cause trouble?

symbols

message activated
message pulse
message shutdown

thing player local
surface switch
flex pulse01


end

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

code
activated:
player = GetSourceref();
if (GetWallCel(switch)==1) return;
SetWallCel(switch,1);
Setpulse(pulse01);
Sleep(.5);
SetWallCel(switch,0);
return;

pulse:
if (GetInv(player, 14) < GetInv(player, 20) * 50)
SetInv(player, 14, GetInv(player, 20) * 50);
return;

shutdown:
Setpulse(0);
return;

end
I droped a trip mine around here, could you help me look for it?
2001-12-05, 5:21 PM #5
By trouble do you mean "not work" or "not pass checksum"? Somehow, I have the feeling it's the latter..
2001-12-05, 6:13 PM #6
what is checksum?
I droped a trip mine around here, could you help me look for it?
2001-12-05, 7:55 PM #7
lmao !
2001-12-06, 5:01 AM #8
Somebody post that Checksum Tut please.... [http://forums.massassi.net/html/tongue.gif]

------------------
Success is the inverse relationship between effort, gain, and loss.
And when the moment is right, I'm gonna fly a kite.
2001-12-06, 5:13 AM #9
Jipe, I doubt he's trying to pass checksum because that cog is activated by a switch.

PCC: What are you trying to do with that cog? That pulse is going to continually set the player's mana to rank*50. It's not going to make the mana "infinite"; instead, it's going to make the mana undepletable. Or maybe that's what you want..

Sleep() is a bad verb to use there. Your cog may crash if you activate the switch before the sleep ends. I think it's better to use a timer instead.

Why are you ending the pulse when you complete the level? It's not like it's going to keep pulsing.

------------------
It's not for nothing Santa's red...
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2001-12-06, 5:28 AM #10
Lol. Attack of the ghost pulse...

------------------
Success is the inverse relationship between effort, gain, and loss.
And when the moment is right, I'm gonna fly a kite.
2001-12-06, 6:48 AM #11
that cog does what I wanted it to do. I have never had a problem with that switch setup I got it from a cog from the JK cd and the same for the end pulse thing!

# Jedi Knight Cog Script
#
# POW_LIGHTSIDE.COG
#
# POWERUP Script - Light Surge
#
# [YB & CYW]
#
# (C) 1997 LucasArts Entertainment Co. All Rights Reserved


symbols

thing powerup local
thing player local
int bin=14 local
sound pickupsnd=helthpu1.wav local
sound outsnd=SCAlarm.wav local
sound respawnsnd=Activate01.wav local

message startup
message shutdown
message touched
message taken
message timer
message newplayer
message respawn
message pulse

end

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

code

startup:
shutdown:

player = GetLocalPlayerThing();
SetPulse(0);
KillTimerEx(1);
SetInv(player, 65, 0);
SetInvActivated(player, 65, 0);
jkClearSuperFlags(4);

Return;
I droped a trip mine around here, could you help me look for it?
2001-12-06, 7:28 AM #12
Yeah, LEC did a whole lot of things that shouldnt be repeated. There is NO need, whatsoever, to kill a pulse before ending a level. The pulse is killed automatically at shutdown.

------------------
Success is the inverse relationship between effort, gain, and loss.
And when the moment is right, I'm gonna fly a kite.

↑ Up to the top!