GoldenEye: Source Forums

  • November 25, 2024, 04:11:22 am
  • Welcome, Guest
Advanced search  

News:

Pages: 1 [2]   Go Down

Author Topic: Disable body armor?  (Read 18567 times)

0 Members and 2 Guests are viewing this topic.

major

  • On Vacation
  • Retired Developer
  • 007
  • ****
  • Posts: 1,837
  • Reputation Power: 109
  • major is awe-inspiring!major is awe-inspiring!major is awe-inspiring!major is awe-inspiring!major is awe-inspiring!major is awe-inspiring!major is awe-inspiring!major is awe-inspiring!major is awe-inspiring!major is awe-inspiring!major is awe-inspiring!major is awe-inspiring!
  • Offline Offline
Re: Disable body armor?
« Reply #15 on: December 08, 2009, 09:45:00 pm »

Logged
All view points are of my own and not associated with the team.

drukqaddik

  • 00 Agent
  • ***
  • Posts: 256
  • Reputation Power: 6
  • drukqaddik has no influence.
  • Offline Offline
Re: Disable body armor?
« Reply #16 on: December 08, 2009, 11:12:10 pm »

cool. ill see what i can come up with. seems way more clear than lua, but well see how that goes lol.
Logged

Mark [lodle]

  • Retired Lead Developer
  • 007
  • *
  • Posts: 1,411
  • Reputation Power: 1
  • Mark [lodle] has no influence.
  • Offline Offline
Re: Disable body armor?
« Reply #17 on: December 09, 2009, 02:01:35 am »

Yeah thats the whole reason for the switch. Makes coding the gamemodes easier and easier for us to bind c++ stuff to python meaning more stuff can be done.
Logged

drukqaddik

  • 00 Agent
  • ***
  • Posts: 256
  • Reputation Power: 6
  • drukqaddik has no influence.
  • Offline Offline
Re: Disable body armor?
« Reply #18 on: December 09, 2009, 02:17:56 am »

ya. i see more variables available already
Logged

killermonkey

  • GES Programmer
  • Retired Lead Developer
  • GE:S Fanatic
  • *
  • Posts: 5,473
  • Reputation Power: 346
  • killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!
  • Offline Offline
    • DroidMonkey Apps
Re: Disable body armor?
« Reply #19 on: December 09, 2009, 03:50:12 am »

NOTE THIS IS NOT FINAL

Code: [Select]
from GamePlay import PYBaseGamePlay

import GEEntity, GEPlayer, GEUtil, GEWeapon, GEMPGameRules, GEGlobal

class DeathMatch(PYBaseGamePlay):
def __init__(self):
super(DeathMatch, self).__init__()

def GetIdent(self):
return "DeathMatch"

def GetPrintName(self):
return "#GES_GP_DEATHMATCH_NAME"

def GetHelpString(self):
return "#GES_GP_DEATHMATCH_HELP"

def GetGameDescription(self):
if GEMPGameRules.IsTeamplay():
return "Team Deathmatch"
else:
return "Deathmatch"

def GetTeamPlay(self):
return GEGlobal.TEAMPLAY_TOGGLE

def OnLoadGamePlay(self):
self.CreateCVar("dm_fraglimit", "0", "Enable frag limit for DeathMatch.")
self.LoadConfig()

def PreRoundBegin(self):
GEMPGameRules.SetAllowTeamSpawns( False )
GEMPGameRules.ResetAllPlayersScores()

def OnPlayerKilled(self, victim, killer, weapon):

#what exactly got killed?
if not victim:
return

#death by world
if not killer:
victim.IncrementScore( -1 )
return

if victim.GetId() == killer.GetId():
killer.IncrementScore( -1 )
elif GEMPGameRules.IsTeamplay() and killer.GetTeamNumber() == victim.GetTeamNumber():
killer.IncrementScore( -1 )
else:
# In DM we add TEAM and PLAYER scores on a kill
# We don't care if teamplay is enabled, if its not this will be ignored
team = GEMPGameRules.GetTeam(killer.GetTeamNumber())
team.IncrementScore( 1 )
killer.IncrementScore( 1 )

def OnThink(self):
fragLimit = int(GEUtil.GetCVarValue("dm_fraglimit"))
if fragLimit != 0:
if GEMPGameRules.IsTeamplay():

teamJ = GEMPGameRules.GetTeam(GEGlobal.TEAM_JANUS);
teamM = GEMPGameRules.GetTeam(GEGlobal.TEAM_MI6);

jScore = teamJ.GetRoundsWon() + teamJ.GetScore()
mScore = teamM.GetRoundsWon() + teamM.GetScore()

if jScore >= fragLimit or mScore >= fragLimit:
GEMPGameRules.EndMatch()
else:
for i in range(32):

if not GEUtil.IsValidPlayerIndex(i):
continue

player = GEUtil.GetMPPlayer(i)

if  (player.GetMatchScore() + player.GetScore()) >=  fragLimit:
GEMPGameRules.EndMatch()

And some shitty first-cut wiki documentation:
http://wiki.goldeneyesource.net/index.php/Category:Python
Logged

Mark [lodle]

  • Retired Lead Developer
  • 007
  • *
  • Posts: 1,411
  • Reputation Power: 1
  • Mark [lodle] has no influence.
  • Offline Offline
Re: Disable body armor?
« Reply #20 on: December 09, 2009, 04:11:10 am »

And some shitty first-cut wiki documentation:

:'(
Logged

drukqaddik

  • 00 Agent
  • ***
  • Posts: 256
  • Reputation Power: 6
  • drukqaddik has no influence.
  • Offline Offline
Re: Disable body armor?
« Reply #21 on: December 12, 2009, 04:20:25 am »

cool. so when can i test it out? ;)
Logged

Mark [lodle]

  • Retired Lead Developer
  • 007
  • *
  • Posts: 1,411
  • Reputation Power: 1
  • Mark [lodle] has no influence.
  • Offline Offline
Re: Disable body armor?
« Reply #22 on: December 12, 2009, 11:18:37 am »

Send me a version of your gameplay (check profile for email) and i might see if we can grant you early access to beta 4 to see if it works. :P
Logged

drukqaddik

  • 00 Agent
  • ***
  • Posts: 256
  • Reputation Power: 6
  • drukqaddik has no influence.
  • Offline Offline
Re: Disable body armor?
« Reply #23 on: December 14, 2009, 04:43:11 am »

guess i know what im doin tonight
Logged

drukqaddik

  • 00 Agent
  • ***
  • Posts: 256
  • Reputation Power: 6
  • drukqaddik has no influence.
  • Offline Offline
Re: Disable body armor?
« Reply #24 on: December 15, 2009, 12:38:34 am »

is there any way i could get a copy of l&ld if it has been done yet? i need to see how a few things are used as far as defining one player vs all the others. i have the base set up i just need to define a few more things. once i get it set up i will submit it.

Spectre is what its called.
Logged

drukqaddik

  • 00 Agent
  • ***
  • Posts: 256
  • Reputation Power: 6
  • drukqaddik has no influence.
  • Offline Offline
Re: Disable body armor?
« Reply #25 on: December 15, 2009, 01:28:54 am »

also how do i define a sound?
Logged

Mark [lodle]

  • Retired Lead Developer
  • 007
  • *
  • Posts: 1,411
  • Reputation Power: 1
  • Mark [lodle] has no influence.
  • Offline Offline
Re: Disable body armor?
« Reply #26 on: December 15, 2009, 01:32:49 am »

You cant define your own sound but you can play sounds all ready in the game. Have a look at the sound files in the script folder
Logged

drukqaddik

  • 00 Agent
  • ***
  • Posts: 256
  • Reputation Power: 6
  • drukqaddik has no influence.
  • Offline Offline
Re: Disable body armor?
« Reply #27 on: December 15, 2009, 01:35:54 am »

so can i add a sound? im tryin to get something like !voodoo. but instead of controlling the player using i want it to make a sound come from all of the other players defined
« Last Edit: December 15, 2009, 01:38:43 am by drukqaddik »
Logged

Mark [lodle]

  • Retired Lead Developer
  • 007
  • *
  • Posts: 1,411
  • Reputation Power: 1
  • Mark [lodle] has no influence.
  • Offline Offline
Re: Disable body armor?
« Reply #28 on: December 15, 2009, 02:15:30 pm »

Use !voodoo as its bound to a key
Logged

drukqaddik

  • 00 Agent
  • ***
  • Posts: 256
  • Reputation Power: 6
  • drukqaddik has no influence.
  • Offline Offline
Re: Disable body armor?
« Reply #29 on: December 15, 2009, 11:18:57 pm »

K
Logged
Pages: 1 [2]   Go Up