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 → how to differ walkplayers and players
how to differ walkplayers and players
2002-03-08, 2:31 PM #1
how to? GetThingType doesn't work.
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
2002-03-08, 4:39 PM #2
Players are walkplayers.

The easiest way I can think of to seperate them is:

A walkplayer (non-player) usually has thing flags 0x80000 set and players normally do not.
- Wisdom is 99% experience, 1% knowledge. -
2002-03-08, 11:44 PM #3
this is strange... I tested the following in a level with 1 Walkplayer:
at startup, start a timer(10)
in timer go through all things and if the thing's template is a walkplayer, get it's flags and print them on the screen and create a crossbow at the thing's position...
i ran around after spawning...
the crossbow was created at my position and the flag value was 538969089 which is 20200401 in hex format...
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
2002-03-09, 2:35 AM #4
Why is that strange..?

The PLAYER is a walkplayer.

Think of it as being similar to the items. You really don't pickup items, when you touch one the 0x80000 flag is set for a designated period so others can't take it.
It doesnt get destroyed and new ones arent created. Its that same 1 items you touch all game long.

Walkplayers are similar. When you enter the game, jk.exe clears the 0x80000 flag from your player ID (one of the walkplayers) and does the other customizations like Sets Model / Saber.

Try something like this:


symbols

message startup
message pulse
end

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

code

startup:
MAX = GetThingCount();
SetPulse(0.1);
Return;

pulse:
if(GetThingType(MAX) == 10)
{
if(GetThingFlags(MAX) & 0x80000)
{
jkStringClear();
jkStringConcatInt(MAX);
jkStringConcatAsciiString(" is a WALKPLAYER");
jkStringOutput(-3, -3);
}
else
{
jkStringClear();
jkStringConcatInt(MAX);
jkStringConcatAsciiString(" is a PLAYER");
jkStringOutput(-3, -3);
}
}
if(MAX <= -1)
{
MAX = GetThingCount();
}
MAX = MAX - 1;
Return;
end



[This message has been edited by The_New_Guy (edited March 09, 2002).]
- Wisdom is 99% experience, 1% knowledge. -
2002-03-09, 3:22 AM #5
hmmm...ok. I'll try that. Thank you.
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
2002-03-09, 6:56 AM #6
Quote:
<font face="Verdana, Arial" size="2">Originally posted by The_New_Guy:
Think of it as being similar to the items. You really don't pickup items, when you touch one the 0x80000 flag is set for a designated period so others can't take it.</font>


I think that's wrong. This is from the CTF cogs...
Code:
killed:
   if(verbose > 2) Print("CTF Killed Evt");

   senderRef = GetSenderRef();
   sourceRef = GetSourceRef();

   // Exit if killed: was sent by anything else than a thing
   if(GetSenderType() != 3) Return;

   // Exit if killed: was sent by one of the flags
   // (powerups send killed: event when taken too...)


You can't bring killed things back alive in JK can you?

------------------
Life is like... skating... yeah, skating is a good example. You see someone skating and think "Hey, that looks like fun and easy!". You go and buy a skateboard and try, you get a few broken bones, asphalt-face and stuff... But hey, i'm not the one who gets hurt!
Last edited by mb; today at 10:55 AM.
2002-03-09, 8:58 AM #7
Sorry I was being generic.

I think certain items might be actaully be removed like backpacks, and possible CTF flags..

But normal items are not removed and do not send killed messages. They are mere 'hidden' for a designated time period and then 'unhidden'.

- Wisdom is 99% experience, 1% knowledge. -
2002-03-09, 6:38 PM #8
How to differentiate? easy. Chefk if the template is a walkplayer themplate and that thing != GetLocalPlayerThing().
Dreams of a dreamer from afar to a fardreamer.
2002-03-10, 12:36 PM #9
So you're trying to find the players in a level, Zagibu?

You might try using GetNumPlayers() and GetPlayerThing() to find the thing numbers of the players in a game. That is much easier than going through all of the things in the level.

------------------
Author of the Jedi Knight DataMaster.
Visit Saber's Domain.
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.

↑ Up to the top!