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 → Personalities for JK... Cog hates me...
Personalities for JK... Cog hates me...
2002-02-07, 7:31 AM #1
Okay, so i've been working on the personalities thingy for the whole day... The problem is that the player starts without any weapons, and without the trigger sent... It seems like the whole init_multi_kyle was ignored...
Here's the code i added...
Code:
init_multi_kyle:
   // SendTrigger(-1, 121, player, 0, 0, 0);
   //ruumis = CreateThing(badi, player);
   //AttachThingToThingEx(ruumis, player, 0x8);
   //SetThingLook(ruumis, GetThingLVec(player));
   // Set Weapons
   //ParseArg(player, "jumpspeed=1");
   //ParseArg(player, "light=0");
   SendTrigger(-1, 92, player, 0, 0, 0);
   SetInv(player, 1, 0.0);
   SetInv(player, 2, 0.0);
   SetInv(player, 3, 0.0);
   SetInv(player, 4, 0.0);
   SetInv(player, 5, 0.0);
   SetInv(player, 6, 0.0);
   SetInv(player, 7, 0.0);
   SetInv(player, 8, 0.0);
   SetInv(player, 9, 0.0);
   SetInv(player, 10, 0.0);

   if(GetThingModel(player) == finmed) // Finnish medic.
   {
   SetPlayerTeam(player, 3);
   SetThingModel(player, finmed);
   SetInv(player, 1, 1.0);
   SetInv(player, 2, 1.0);
   // Set Ammo
   SetInv(player, 11, 72.0);
   SetInv(player, 12, 0.0);
   SetInv(player, 15, 0.0);
   }
   else
   if(GetThingModel(player) == finsmg) // Finnish SMG Infantry  
   {
   SetPlayerTeam(player, 3);
   SetThingModel(player, finsmg);
   SetInv(player, 1, 1.0);
   SetInv(player, 2, 1.0);
   SetInv(player, 3, 1.0);
   // Set Ammo
   SetInv(player, 11, 72.0);
   SetInv(player, 12, 0.0);
   SetInv(player, 15, 0.0);
   }
   else
   if(GetThingModel(player) == finrif) // Finnish rifle infantry
   {
   SetPlayerTeam(player, 3);
   SetThingModel(player, finrif);
   SetInv(player, 1, 1.0);
   SetInv(player, 2, 1.0);
   SetInv(player, 5, 1.0);
   // Set Ammo
   SetInv(player, 11, 50.0);
   SetInv(player, 12, 30.0);
   SetInv(player, 15, 0.0);
   }
   else
   if(GetThingModel(player) == finpio) // Finnish mine pioner.
   {
   SetPlayerTeam(player, 3);
   SetThingModel(player, finpio);
   SetInv(player, 1, 1.0);
   SetInv(player, 2, 1.0);
   SetInv(player, 8, 7.0);
   // Set Ammo
   SetInv(player, 11, 65.0);
   SetInv(player, 12, 0.0);
   SetInv(player, 15, 0.0);
   }
   else
   if(GetThingModel(player) == sovmed) // Soviet medic.
   {
   SetPlayerTeam(player, 1);
   SetThingModel(player, sovmed);
   SetInv(player, 1, 1.0);
   SetInv(player, 2, 1.0);
   // Set Ammo
   SetInv(player, 11, 72.0);
   SetInv(player, 12, 0.0);
   SetInv(player, 15, 0.0);
   }
   else
   if(GetThingModel(player) == sovsmg) // Soviet SMG infantry.
   {
   SetPlayerTeam(player, 1);
   SetThingModel(player, sovsmg);
   SetInv(player, 1, 1.0);
   SetInv(player, 2, 1.0);
   SetInv(player, 3, 1.0);
   // Set Ammo
   SetInv(player, 11, 72.0);
   SetInv(player, 12, 0.0);
   SetInv(player, 15, 0.0);
   }
   else
   if(GetThingModel(player) == sovrif) // Soviet Rifle infantry.
   {
   SetPlayerTeam(player, 1);
   SetThingModel(player, sovrif);
   SetInv(player, 1, 1.0);
   SetInv(player, 2, 1.0);
   SetInv(player, 5, 1.0);
   // Set Ammo
   SetInv(player, 11, 50.0);
   SetInv(player, 12, 30.0);
   SetInv(player, 15, 0.0);
   }
   else
   if(GetThingModel(player) == sovpio) // Soviet Mine pioner
   {
   SetPlayerTeam(player, 1);
   SetThingModel(player, sovpio);
   SetInv(player, 1, 1.0);
   SetInv(player, 2, 1.0);
   SetInv(player, 8, 7.0);
   // Set Ammo
   SetInv(player, 11, 65.0);
   SetInv(player, 12, 0.0);
   SetInv(player, 15, 0.0);
   }
   else
   {
   if(GetThingModel(player) != finmed && GetThingModel(player) != finsmg && GetThingModel(player) != finrif && GetThingModel(player) != finpio && GetThingModel(player) != sovmed && GetThingModel(player) != sovsmg && GetThingModel(player) != sovpio && GetThingModel(player) != sovrif ) // In case Player's model is none of above.
   {
   if( GetNumPlayersInTeam(1) < GetNumPlayersInTeam(3) ) // In case finns got more players.
   {
   SetPlayerTeam(player, 1);
   SetThingModel(player, sovrif);
   SetInv(player, 1, 1.0);
   SetInv(player, 2, 1.0);
   SetInv(player, 5, 1.0);
   // Set Ammo
   SetInv(player, 11, 50.0);
   SetInv(player, 12, 30.0);
   SetInv(player, 15, 0.0);
   }
   else
   if( GetNumPlayersInTeam(1) > GetNumPlayersInTeam(3) ) // In case russians have more players.
   {
   SetPlayerTeam(player, 3);
   SetThingModel(player, finrif);
   SetInv(player, 1, 1.0);
   SetInv(player, 2, 1.0);
   SetInv(player, 5, 1.0);
   // Set Ammo
   SetInv(player, 11, 50.0);
   SetInv(player, 12, 30.0);
   SetInv(player, 15, 0.0);
   }
   else
   if( GetNumPlayersInTeam(1) == GetNumPlayersInTeam(3) && Rand() <= 0.5) // In case both teams have the same amount of players
   {
   SetPlayerTeam(player, 3);
   SetThingModel(player, finrif);
   SetInv(player, 1, 1.0);
   SetInv(player, 2, 1.0);
   SetInv(player, 5, 1.0);
   // Set Ammo
   SetInv(player, 11, 50.0);
   SetInv(player, 12, 30.0);
   SetInv(player, 15, 0.0);
   }
   else
   if( GetNumPlayersInTeam(1) == GetNumPlayersInTeam(3) && Rand() >= 0.5) // In case both teams have the same amount of players.
   {
   SetPlayerTeam(player, 1);
   SetThingModel(player, sovrif);
   SetInv(player, 1, 1.0);
   SetInv(player, 2, 1.0);
   SetInv(player, 5, 1.0);

   // Set Ammo
   SetInv(player, 11, 50.0);
   SetInv(player, 12, 30.0);
   SetInv(player, 15, 0.0);
   }
   }
   // Remove bacta tank and IR goggles
   SetInv(player, 40, 0);
   SetInv(player, 41, 0);
   SetInv(player, 42, 0);
   SetInvAvailable(player, 40, 0);
   SetInvAvailable(player, 41, 0);
   SetInvAvailable(player, 42, 0);
   // Set shields to 100
   SetInv(player, 60, 0);
   // Do respawn effects
   dummy = CreateThingAtPos(teleport_particles, GetThingSector(player), GetThingPos(player), '0 0 0');
   dummy = PlaySoundThing(teleportsnd, player, 1.0, -1, -1, 0x180);
   SetFireWait(player, -1);
   SetMountWait(player, 0);
   SetCurInvWeapon(player, 0);
   SelectWeapon(player, AutoSelectWeapon(player, 1));

   Return;


[edit: happy now? [http://forums.massassi.net/html/tongue.gif])
------------------
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!

[This message has been edited by CaveDemon (edited February 07, 2002).]

[This message has been edited by CaveDemon (edited February 07, 2002).]
Last edited by mb; today at 10:55 AM.
2002-02-07, 8:02 AM #2
Personally, I'd initialize all weapons to 0, then add the weapons you want them to have in the model checks.

This will speed it up, and make it easier to read, which always helps in error detection.
2002-02-08, 10:08 AM #3
You're missing a closing bracket. [http://forums.massassi.net/html/tongue.gif] JK won't run code with bad syntax.

------------------
Each cog better than the next
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2002-02-08, 10:25 AM #4
Hey, you're right... i didn't notice [http://forums.massassi.net/html/smile.gif]

Thank you, it works now

------------------
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-02-08, 10:54 AM #5
Glad to help. [http://forums.massassi.net/html/wink.gif]

------------------
Each cog better than the next
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2002-02-10, 11:11 AM #6
Cavey! I'm on the Winter War mod team, right?

------------------
Cordially,
Lord Tiberius Grismath
Co-leader
Lord of the Rings TC
Cordially,
Lord Tiberius Grismath
1473 for '1337' posts.
2002-02-11, 9:21 AM #7
Yes, if you actually make something... email me cavedemon@gameaholics.net

------------------
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.

↑ Up to the top!