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 → Help with..... cogs :)
Help with..... cogs :)
2001-03-02, 12:58 PM #1
Ok, I need to know 2 things plz.

One, how do I get the player to not be hurt when it is slamed into the wall?

Two, how do I get a cog to:
When the player inters a sector it dose something and when they leave it dosent do it anymore?

Thanks


[This message has been edited by DBSS_Iceman (edited March 02, 2001).]
2001-03-02, 8:36 PM #2
so exactly what do you want player to do when entered to sector?

------------------
The death is smiling to all of us,
All what we can do, is smile back.
WHAT?
2001-03-03, 5:23 AM #3
add a point to a players score every 30 seconds
2001-03-03, 8:33 AM #4
Anyone?
2001-03-04, 7:35 AM #5
Is this for single player or multi-player?
Sylvicolus JK homepage
If I have ever made any valuable discoveries, it has been owing more to
patient observation than to any other reason. -Isaac Newton
2001-03-04, 11:13 AM #6
1. Put this at the top of the damaged section of kyle.cog

if(GetParam(1) == 64) return;

2. You assign a cog like this on the sector that you want to do it.

Code:
symbols

sector pointingSec

message entered
message exited
message pulse

end

code

entered:

if(GetSenderType != 0x400) return;
SetThingPulse(GetSenderRef(), 30);

return;

pulse:

SetPlayerScore(GetSenderID(), GetPlayerScore(GetSenderID()) + 1);

return;

exited:

if(GetSenderType != 0x400) return;

SetThingPulse(GetSenderRef(), 0);

return;

end


------------------
http://millennium.massassi.net/ - Millennium

[This message has been edited by Hideki (edited March 04, 2001).]
2001-03-05, 9:54 AM #7
Thanks everyone, just one other thing [http://forums.massassi.net/html/smile.gif]

[edit] I just wanted to change up the wording [/edit]

What is wrong with this cog?

# Jedi Knight Cog Script
#
# ITEM_FIELDLIGHT.COG
#
# KaoKen
# Made by DBSS_Iceman
# Need cogs? Talk to me. My ICQ is 82388606


symbols

thing player

template projectile=+ssparks_blood
template projectile2=+ssparks_blood
template projectile3=+ssparks_blood

message activated
message deactivated
message pulse

int mode

end

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

code

activated:

SetPulse(.01);

Return;

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

pulse:
player = GetSourceRef();

FireProjectile(player, projectile);
FireProjectile(player, projectile2);
FireProjectile(player, projectile3);

ClearPhysicsFlags(player, 0x1);
SetPhysicsFlags(player, 0x2000);
SetInvActivated(player, 22, 1);
SetActorExtraSpeed(player, 99.9);
ChangeInv(player, 11, -0.0);
GetThingHealth(player);
SetThingHealth(player, 0);

If(BitTest(actorFlags, 4));
{
ClearPhysicsFlags(player, 0x2000);
SetPhysicsFlags(player, 0x1);
SetInvActivated(player, 22, 0);
SetActorExtraSpeed(player, 0.0);

player = GetSourceRef();
mode = GetSenderRef();

DeactivatedWeapon( player, mode );

Return;
}

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

end


[This message has been edited by DBSS_Iceman (edited March 05, 2001).]
2001-03-05, 10:50 AM #8
OH btw I want the cog to make those sparks fly from the player and then the extra speed to 99 and they have to hit the buttion to start and stop
2001-03-06, 10:54 AM #9
*keeping it up so people can help me [http://forums.massassi.net/html/smile.gif]*
2001-03-06, 12:28 PM #10
If(BitTest(actorFlags, 4));

to

if(GetActorFlags(player) & 4))

------------------
http://millennium.massassi.net/ - Millennium
2001-03-06, 1:36 PM #11
It still dont work st00pid cog
2001-03-06, 1:45 PM #12
Code:
symbols

thing       player
 
template    projectile=+ssparks_blood

message     activated
message     pulse

end

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

code

activated:

   player = GetSourceRef();

   SetThingHealth(player, 0);
   ClearPhysicsFlags(player, 0x1);
   SetPhysicsFlags(player, 0x2000);
   SetActorExtraSpeed(player, 99.9);

   SetPulse(0.01);

   Return;

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

pulse:

    for(i=0; i<=3; i=i+1) FireProjectile(player, projectile);

   return;

# ========================================================================================
  
end

The only thing is that I'm not sure what this cog is supposed to do exactly.

[edit] cog edited , change "3" in "for" loop for more sparks or less[/edit]
------------------
http://millennium.massassi.net/ - Millennium

[This message has been edited by Hideki (edited March 06, 2001).]
2001-03-06, 1:46 PM #13
I put a print function in front of all of the verbs and they work, but they dont do what they are supposed to!!
And I checked that the flags were right and everything. And I have another version of this cog it when I use this one im trying to fix that other one dosent work.

(The reason I made it the feild light was becuse i wanted it to work so I didnt have to hold the buttion in the entire time for it to work)
2001-03-06, 1:48 PM #14
We posted at the same time [http://forums.massassi.net/html/wink.gif]

↑ Up to the top!