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 → Question about activation
Question about activation
2003-08-25, 1:00 PM #1
For JK or MotS:

I'm wondering... Is it possible to hold down the activate button on items placed in levels?
I'm trying to make it work like the Health/Armor dispensers in Half-Life.
I haven't started writing the cog yet.
Do I have to make a counter set in a pulse? Can the dispenser check if a player is touching it without making a mod on kyle.cog

------------------
There is no emotion; there is peace. There is no ignorance; there is knowledge. There is no passion; there is serenity. There is no death; there is the Force

-The Jedi Code
There is no emotion; there is peace. There is no ignorance; there is knowledge. There is no passion; there is serenity. There is no death; there is the Force

-The Jedi Code
2003-08-25, 1:40 PM #2
Weapon cogs work like that with the activated and deactivated messages but I dont know if it would work for an item. Maybe you could try and put the deactivated message in a test cog and find out.

For the counter I think it would have to be in a pulse or a timer that just starts over, you could maybe try a while() loop with the Sleep() command.

------------------
GetThingSignature(Ace1);

[This message has been edited by Ace1 (edited August 25, 2003).]
I am _ Ace_1 _ , and I approve this message.
2003-08-25, 1:51 PM #3
Hmmm... I'll try that

------------------
There is no emotion; there is peace. There is no ignorance; there is knowledge. There is no passion; there is serenity. There is no death; there is the Force

-The Jedi Code
There is no emotion; there is peace. There is no ignorance; there is knowledge. There is no passion; there is serenity. There is no death; there is the Force

-The Jedi Code
2003-08-26, 2:49 AM #4
Deactivated won't work there, you'll need to use activated and a pulse. You could check to make sure the player keeps touching the dispenser, but checking the distance would be better.

------------------
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2003-08-26, 5:14 AM #5
I made it so when activated it sets a given pulse.
In the pulse it checks if the player isThingMoving... That's a simple way to do it, and I don't really like it, but hey, it's better than nothing [http://forums.massassi.net/html/smile.gif]
SaberMaster, thanks for the help! [http://forums.massassi.net/html/smile.gif] Going to try that about measuring the distance between the player and the dispenser.

The dispenser is using GetLocalPlayerThing(); as I can't get GetSourceRef(); to work.

------------------
There is no emotion; there is peace. There is no ignorance; there is knowledge. There is no passion; there is serenity. There is no death; there is the Force

-The Jedi Code
There is no emotion; there is peace. There is no ignorance; there is knowledge. There is no passion; there is serenity. There is no death; there is the Force

-The Jedi Code

↑ Up to the top!