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...
[edit: happy 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!
[This message has been edited by CaveDemon (edited February 07, 2002).]
[This message has been edited by CaveDemon (edited February 07, 2002).]
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? )
------------------
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.