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 → Lots of help needed
Lots of help needed
2001-08-27, 7:15 AM #1
I want to make it so a gun takes away force stuff insteads of ammo and I also need a cog so when you picks up a pickup it makes you trnsparent.
2001-08-27, 12:13 PM #2
as for the first one, in the weapon cog, search for something like:
ChangeInv(player, 11, -1.0);

and change it to
ChangeInv(player, 14, -cost);
cost being the amount of mana you want the weapon to draw per shot

for the second,


# Jedi Knight Cog Script
#
# POW_SUPERSHIELD.COG
#
# POWERUP Script - SuperShield
#
# [YB]
#
# (C) 1997 LucasArts Entertainment Co. All Rights Reserved
#
# Edited to invisibility from incinvibility.

symbols

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

message touched
message taken
message timer
message respawn
message newplayer


end

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

code

touched:
player = GetSourceRef();

powerup = GetSenderRef();
TakeItem(powerup, player);

Return;

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

taken:
player = GetSourceRef();
powerup = GetSenderRef();

// Print("SuperShield");
Print("Supadupa invis item");

// Do effects.
PlaySoundThing(pickupsnd, powerup, 1.0, -1, -1, 0);
AddDynamicTint(player, 0.0, 0.0, 0.2);


SetThingCurGeoMode(player, 0);

// Effect lasts 30 seconds, expand if already on.
KillTimerEx(1);
SetTimerEx(30, 1, player, 1);
SetTimerEx(30 - 3 * GetSoundLen(outsnd) - 0.5, 1, player, 0);

Return;

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

timer:
if(GetParam(1) == 0)
{
// Power will end soon...

PlaySoundLocal(outsnd, 1.0, 0.0, 0);
Sleep(GetSoundLen(outsnd) + 0.25);
PlaySoundLocal(outsnd, 1.0, 0.0, 0);
Sleep(GetSoundLen(outsnd) + 0.25);
PlaySoundLocal(outsnd, 1.0, 0.0, 0);
}
else
{

SetThingCurGeoMode(GetParam(0), 1);

}

Return;

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


respawn:
powerup = GetSenderRef();
PlaySoundThing(respawnsnd, powerup, 0.6, 5.0, 10.0, 0);

Return;

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

newplayer:
player = GetSenderRef();

if(GetLocalplayerthing() == player)
{
KillTimerEx(1);
SetThingCurGeoMode(GetParam(0), 1);
}




Return;

end


this should work.. if I haven't erased something important...

-Raze

[This message has been edited by Raze (edited August 27, 2001).]
--
You are all just jealous because you can't hear the small voices!!
2001-08-27, 12:32 PM #3
A nother question.
Can you make me a heal sector cog that would give you force power(mana)???
2001-08-27, 3:38 PM #4
You might want to familarize yourself just a bit with cog, read some tutorials at massassi and the jk specs of codealliance.. I am not sure what you mean by heal sector but if you just want a sector to give you force when you're in it, this would be really easy to do, especially if you already have a heal sector cog...

-Raze
--
You are all just jealous because you can't hear the small voices!!

↑ Up to the top!