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 → This damned cog ain't working!
This damned cog ain't working!
2002-05-05, 11:25 AM #1
# Jedi Knight Cog Script
#
# FORCE_WELL.COG
#
# JEDI RANK Script
# Bin 20
#
# The rank of a Jedi determines his mana regeneration rate.
#
# [YB]
#
# (C) 1997 LucasArts Entertainment Co. All Rights Reserved


symbols

thing player local

int limit

message startup
message pulse

end

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

code

startup:
player = GetLocalPlayerThing();
Sleep(1.0);
SetPulse(0.001);
Limit = 0.5;
pthrust = getthingthrust(player);

Return;

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

pulse:
// don't do anything if the player is currently dead
if(GetThingHealth(player) < 1) Return;

if(vectorX(pthrust) > limit || vectorY(pthrust) > limit || vectorZ(pthrust) > limit)
{
setphysicsflags(player, 0xD0);
}
else
if(vectorX(pthrust) < limit || vectory(pthrust) < limit || vectorz(pthrust) < limit)
{
Clearphysicsflags(player, 0x90);
}

Return;

end

-------------------

That's my wallrun cog for the mod I'm making. SetPhysicsFlags(player, 0xd0) turns on WoW, clearphysicsflags(player, 0x90) turns it off. I know the thingthrust int is kinda low, but that's just for testing purposes.

I talked with Hell Raiser of TDiR, he has yet to find anything wrong with it, yet I can't get it to work for the life of me. Can somebody please offer some advice? Point out a flaw? Something they think is keeping the cog from working?
"I hate ravers. Raving Fruit Boy wears stupidass jewelry so he'll be the coolest kid at the Nitrous Oxide tent." --Cliff Yablonski
2002-05-05, 1:56 PM #2
I don't see any errors, but I'd set the Pulse at the end of the startup message. Check the pthrust values, too. To do so, change the cog like this:
Code:
# Jedi Knight Cog Script
#
# FORCE_WELL.COG
#
# JEDI RANK Script
# Bin 20
#
# The rank of a Jedi determines his mana regeneration rate.
#
# [YB]
#
# (C) 1997 LucasArts Entertainment Co. All Rights Reserved

symbols

thing player local

int limit
int counter local

message startup
message pulse

end

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

code

startup:
player = GetLocalPlayerThing();
Sleep(1.0);
counter = 0;
Limit = 0.5;
pthrust = getthingthrust(player);
SetPulse(0.001);

Return;

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

pulse:
// don't do anything if the player is currently dead
if(GetThingHealth(player) < 1) Return;

counter = counter + 1;

if(vectorX(pthrust) > limit || vectorY(pthrust) > limit || vectorZ(pthrust) > limit)
{
 SetPhysicsFlags(player, 0xD0);
}
else
if(vectorX(pthrust) < limit || vectory(pthrust) < limit || vectorz(pthrust) < limit)
{
 Clearphysicsflags(player, 0x90);
}

if(counter > 500) // or whatever interval you want
{
 jkStringClear();
 jkStringConcatVector(pthrust);
 jkStringOutput(-3, -1);
 counter = 0;
}

Return;

end


------------------
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
2002-05-06, 7:48 AM #3
Well, I eventually got that system working, but now, per to request, they want it to only work every time you jump. -_-

-=============-
# Jedi Knight Cog Script
#
# FORCE_WELL.COG
#
# JEDI RANK Script
# Bin 20
#
# The rank of a Jedi determines his mana regeneration rate.
#
# [YB]
#
# (C) 1997 LucasArts Entertainment Co. All Rights Reserved


symbols

thing player local

int limit
int attached=0 local
vector pthrust

message startup
message pulse

end

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

code

startup:
player = GetLocalPlayerThing();
Sleep(1.0);
SetPulse(0.001);
limit = 0.5;
pthrust = getthingthrust(player);
attached = 0;
Return;

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

pulse:
setactorextraspeed(player, 2);
setphysicsflags(player, 0x40000);
attachFlags = GetAttachFlags(player);
if((attachFlags & 1) || (attachFlags & 2) || (GetPhysicsFlags(player) & 0x100000))
{
print("jump confirmed");
}
else
{
call walkonwalls;
}

Return;

walkonwalls:
print("walkonwalls called");
setphysicsflags(player, 0xd0);
sleep(2);
clearphysicsflags(player, 0x90);
setpulse(0);
sleep(2);
setpulse(0.001);


Return;

end
-===========-

That's all I have so far.
I'm working with Hell Raiser on it, but he constantly has to go somewhere.

This cog works perfectly, but it doesn't quite accomplish what I want to be done.

In this cog, it basically sets the WoW flag throughout your entire jump, lets it linger for 2 seconds after you land/attach, and then leaves a 2 second pause after clearing the flag, to try and prevent them from sticking to the wall again on the way down, because of the pulse.

What I need to know, is how I could conceivably stop the pulse untill the player lands again. The pulse sets the WoW flag just because a player is not attached to a surface.
So far, I have a 2 second pause after clearing 0x90, thereby removing the WoW flag. The pulse is also disabled, because after you clear 0x90 while they're on a wall, they fall, and because they're in the air, the pulse sets the WoW flag again, and they just stick back to the wall.

What I need is a method to disable the pulse untill the player lands again, then start it up again.

How could I conceivably do this?
"I hate ravers. Raving Fruit Boy wears stupidass jewelry so he'll be the coolest kid at the Nitrous Oxide tent." --Cliff Yablonski
2002-05-06, 11:56 AM #4
Could you fire a projectile that when it hits the ground it gets the vector distance between it and the player and if its less than dada then it means the player is on the ground?
Team Battle.
2002-05-06, 11:59 AM #5
Is there a way to find out when the play touches a surface flagged with the floor flag? That would seem easier.
2002-05-06, 12:19 PM #6
If you could find a surface touching the player, MANY things would be easier... [Inappropriate phrase removed]. . . .but it simply isnt possible....

------------------
I used to believe that we only want what we can't have. I was wrong. The truth is, the wonderful truth is, we only want what we think we can't have.

JK editing resources.

[This message has been edited by GBK (edited May 06, 2002).]
And when the moment is right, I'm gonna fly a kite.
2002-05-06, 4:54 PM #7
geomods? how that?

------------------
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
2002-05-06, 5:38 PM #8
No, no, forget there was any mention of that. Forget what I said. FORGET DAMNIT!

------------------
I used to believe that we only want what we can't have. I was wrong. The truth is, the wonderful truth is, we only want what we think we can't have.

JK editing resources.
And when the moment is right, I'm gonna fly a kite.
2002-05-07, 2:09 AM #9
what did you mean at all? Geomods like in Red Faction? How would getting the surface touching the player help with that?

------------------
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
2002-05-07, 5:19 AM #10
Nope, no geomods. There are no geomods. Imposible with Sith it is. No goemods for us. Forget any metion of it.

------------------
I used to believe that we only want what we can't have. I was wrong. The truth is, the wonderful truth is, we only want what we think we can't have.

JK editing resources.
And when the moment is right, I'm gonna fly a kite.
2002-05-08, 12:20 PM #11
Well, you did mention it. Now explain...

------------------
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
2002-05-08, 1:45 PM #12
No. If I did try to explain, all the Red Faction freaks would start pouring out of the walls, asking for geomod cogs...

------------------
I used to believe that we only want what we can't have. I was wrong. The truth is, the wonderful truth is, we only want what we think we can't have.

JK editing resources.
And when the moment is right, I'm gonna fly a kite.
2002-05-09, 1:32 AM #13
Hey, don't forget about the editor's codex. What did you mean, man? Explain it, or I'll send some inquisitors after you. Noone breaks the editor's codex.

------------------
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
2002-05-09, 5:27 AM #14
GAH! Not a surface touching the player, neccessarily, but any surface thouching ANY object. If it were possible, you could detect weapon impacts on world surfaces, and reset adjoins...the biggest possibility for geomods in Sith.

 

BUT IS ISNT POSSILE. AT ALL.

------------------
I used to believe that we only want what we can't have. I was wrong. The truth is, the wonderful truth is, we only want what we think we can't have.

JK editing resources.
And when the moment is right, I'm gonna fly a kite.
2002-05-09, 6:06 AM #15
Very good idea, indeed. Mission aborted.

------------------
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
2002-05-09, 6:17 AM #16
I SAID MISSION ABORTED. WHO IS THE COMMANDER HERE? Damn Inquisitors.

------------------
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
2002-05-09, 7:20 AM #17
*Ducks repeated requests for geomods*

------------------
I used to believe that we only want what we can't have. I was wrong. The truth is, the wonderful truth is, we only want what we think we can't have.

JK editing resources.

[This message has been edited by GBK (edited May 09, 2002).]
And when the moment is right, I'm gonna fly a kite.
2002-05-09, 12:18 PM #18
Geomods would have to use adjoins or 3dos. If you use 3dos you'll hit the thing limit rather quickly. If you use adjoins, you'll rapidly hit the adjoin limit (~125). It simply isn't feasible (or good-looking).
2002-05-10, 12:56 AM #19
There is a general adjoin limit? I always thought there was only a limit for adjoins in view...

------------------
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
2002-05-10, 3:45 AM #20
He means inview. Even with the TVTCS, using 3d0s would get very complicated, very fast . . . and cleaving the hell out of a corridor just isnt going to work. After you reset all of the adjoins, it would HOM...


Now, can we PLEASE STOP talking about this before someone catches wind?

------------------
I used to believe that we only want what we can't have. I was wrong. The truth is, the wonderful truth is, we only want what we think we can't have.

JK editing resources.
And when the moment is right, I'm gonna fly a kite.
2002-05-10, 4:43 AM #21
I have done the geomod-cog! I'm gonna include it somewhere!
"Tickets, please."
"You don't have to see our tickets."
"What?"
"These are not the tickets you're loking for."

↑ Up to the top!