Forcing Round_end correctly
Posted: Sun May 03, 2015 8:44 pm
Yo Guys,
I have a Problem with Forcing Round_End Event correctly.
I currently make a Zombiemod for Source Python.
The ground structure is already done :) . But i have now Problems with the Ending of the Rounds.
What is a Zombiemod:
1 Player gets selceted at round_start as Zombie. -> He gets forced to [color="#FF0000"]Terrorist Team[/color].
This Player have to kill all CT Players. ( All hidden CT players by knife gets automatically swichted to Terrorist Team)
Or the other way. All Zombies (T) get killed from the CT's so the Round ends normally.
At the End all CT's are in Terrorist Team. So there we go.
There is the Problem which i can't solve myself.
When all CT's in T Team the round does not end. So I have to force the round_end event by SP.
The Problem is now:
The Round ends and starts again but..
.. sometimes I don't get teleportet back to spawn. I just can walk around like the round never end.
Or sometimes death Players get not respawned anymore.
* I should say: Tested it with bots. But Gameplay also should work with bots. *
So I wanted to know if somebody has another solution for Forcing End_Round:
I thought about:
To Check if it's the last CT Player which get killed: If this is true. Don't switch him to T but his LIFESTATUS to DEATH without killing him :D Just a thought.
I have a Problem with Forcing Round_End Event correctly.
I currently make a Zombiemod for Source Python.
The ground structure is already done :) . But i have now Problems with the Ending of the Rounds.
What is a Zombiemod:
1 Player gets selceted at round_start as Zombie. -> He gets forced to [color="#FF0000"]Terrorist Team[/color].
This Player have to kill all CT Players. ( All hidden CT players by knife gets automatically swichted to Terrorist Team)
Or the other way. All Zombies (T) get killed from the CT's so the Round ends normally.
At the End all CT's are in Terrorist Team. So there we go.
There is the Problem which i can't solve myself.
When all CT's in T Team the round does not end. So I have to force the round_end event by SP.
Syntax: Select all
# I think the imports are clear :)
@Event
def player_death(game_event):
tick_delays.delay(0.1, zombie_round_end) # Check for Alive CT
def zombie_round_end():
if get_ALv_Player('ct') == 0: # Get alive CT Player | Function isn't included in Snipped Code
zombie_end_round_event(3) # Terrorist won
def zombie_end_round_event(condition):
for info_map_parameters in EntityIter('info_map_parameters', return_types='entity'):
break
else:
info_map_parameters = BaseEntity.create('info_map_parameters')
info_map_parameters.call_input('FireWinCondition', condition)
The Problem is now:
The Round ends and starts again but..
.. sometimes I don't get teleportet back to spawn. I just can walk around like the round never end.
Or sometimes death Players get not respawned anymore.
* I should say: Tested it with bots. But Gameplay also should work with bots. *
So I wanted to know if somebody has another solution for Forcing End_Round:
I thought about:
To Check if it's the last CT Player which get killed: If this is true. Don't switch him to T but his LIFESTATUS to DEATH without killing him :D Just a thought.