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 → Give/Take items cog
Give/Take items cog
2001-06-07, 3:59 PM #1
ok. here's what i need to know,
1: if its possible to Give/Take force powers ingame
2: if so then how?
3: how to make MOTS new 3dos for players STICK once a certain cog has been activated (changes players 3do when a thing has been activated, just won't stick to the same new skin for more than 3 seconds)
Join JK2k on the zone! go to http://www.jk2k.8k.com
2001-06-07, 5:30 PM #2
1) Yes just use first thing in view .... then what sort of force powers , mana or the force ability ?

2) Just keep setting a timer so it keeps changing the model every 2.5 seconds.
2001-06-07, 11:59 PM #3
1) Yes you can do that.

2) Just do this in a cog:
To give someone a force power:
SetInv(player, forcepowerbin, staramount);
SetInvAvailable(player, forcepowerbin, 1);

To remove a force power:
SetInv(player, forcepowerbin, 0);
SetInvAvailable(player, forcepowerbin, 0);

See the Item.dat file to see which bin numbers are used for which force power. Remember that all force powers can have up to 4 stars. Also remember to use the cog verb that updates the force powers (I forgot what the cogverb is named. Try making a startup cog with JED and look at it's timer message.)

3) Not sure what you mean by STICK but if you're refering to making a thing stick to another thing, just use the "AttachThingTothing(thing1, thing2);" cog verb to do that (thing1 is the thing you want to attach. Thing2 is the thing you want thing1 to be attached to). If you talking about setting thing's model to something else, just use the SetThingModel(thing, model); instead.

-- SavageX

------------------
"Everyone dies." - Boba Fett
"Be kind to nerds because one day... one will be your boss."
SavageX's Editing Corner
2001-06-08, 12:47 PM #4
^^ SavageX he means that in MOTS if you change someones skin, it will automaticly flick back 3 seconds later to what it was before.
2001-06-11, 2:07 PM #5
Well unfortunately the cog that I made to Give/Take force powers failed, either not correctly coded or just doesn't work in MOTS (much like the skin problem)anyways if its a problem with the coding then here it is
# Jedi Knight Cog Script
# change2darkjedi.cog
#
# When a sector is entered then the player will receive weapons and force powers
#
# By: JK2k_Avenger
# This cog is not supported by LEC

symbols

Sector Teleporter linkid=1

thing destination nolink

int Lightsaber=131 local
int FJump=21 local
int FSpeed=22 local
int FSeeing=23 local
int FPush=38 local
int FProject=36 local
int FPull=24 local
int FGrip=31 local
int FSabthrow=37 local
int FFarsight=35 local
int FHealing=25 local
int FPersuasion=26 local
int FBlinding=27 local
int FChainlight=39 local
int FAbsorb=28 local
int FProtect=29 local
int FDestruction=33 local
int FDeadlysight=34 local
int FDefense=19 local

message entered

end

# ..........

code

entered:

# give stuff
SetInv(player, Lightsaber, 1.0);
SetInvAvalable(player, Lightsaber, 1.0);
SetInv(player, FJump, 4.0);
SetInvAvalable(player, FJump, 1.0);
SetInv(player, FSpeed, 4.0);
SetInvAvalable(player, FSpeed, 1.0);
SetInv(player, FSeeing, 4.0);
SetInvAvalable(player, FSeeing, 1.0);
SetInv(player, FGrip, 4.0);
SetInvAvalable(player, FGrip, 1.0);
SetInv(player, FSabthrow, 4.0);
SetInvAvalable(player, FSabthrow, 1.0);
SetInv(player, FChainlight, 4.0);
SetInvAvalable(player, FChainlight, 1.0);
SetInv(player, FDestruction, 4.0);
SetInvAvalable(player, FDestruction, 1.0);
SetInv(player, FDeadlysight, 4.0);
SetInvAvalable(player, FDeadlysight, 1.0);

# teleport player
TeleportThing(GetSourceRef(), destination);

return;

end
Join JK2k on the zone! go to http://www.jk2k.8k.com

↑ Up to the top!