Page 1 of 1
[REQUEST]Shoot n' create grenade
Posted: Fri Mar 14, 2014 1:05 pm
by Sajt
I'll look it on Supercool Curse of Hompy Kraken server(shotgun have grenade shoot)
-How me make it on python?
-i'll use it all weapon
starting,it possible?:
Code: Select alldef on_shoot_set(self, fire):
if (self.shootngrenades and fire and
grenade_packet.value = 0.0
grenade_packet.player_id = 32
grenade_packet.position = position.get()
grenade_packet.velocity = (0.0, 0.0, 0.0)
self.protocol.send_contained(grenade_packet)
Help me please.
Re: [REQUEST]Shoot n' create grenade
Posted: Sat Mar 15, 2014 12:29 am
by learn_more
try english
Re: [REQUEST]Shoot n' create grenade
Posted: Sun Mar 16, 2014 3:43 am
by danhezee
Not sure what you are asking but I think using the shotgun grenade launcher script with a modified babel script might be fun.
Re: [REQUEST]Shoot n' create grenade
Posted: Sun Mar 16, 2014 9:46 am
by Sajt
Yes,the shotgun grenade launcher thought just like the zombies game mode Humans can.
Only shotgun know.
And sorry my bad english,learn_more

Re: [REQUEST]Shoot n' create grenade
Posted: Mon Apr 14, 2014 3:53 pm
by danhezee
I think nrzrzr meant to post the following instead of reporting a post and having it as the message.
nrzrzr wrote:
Code: Select allfrom pyspades.server import orientation_data, grenade_packet
from pyspades.common import coordinates, Vertex3
from pyspades.constants import *
from pyspades.world import Grenade
def apply_script(protocol, connection, config):
class RocketlauncherConnection(connection):
def on_hit(self, hit_amount, hit_player, type):
if type != GRENADE_KILL and self.weapon == SHOTGUN_WEAPON:
return False
return connection.on_hit(self, hit_amount, hit_player, type)
def on_shoot_set(self, fire):
if self.weapon == SHOTGUN_WEAPON and self.tool == WEAPON_TOOL and fire == True:
else:
return connection.on_shoot_set(self, fire)
if fire == True:
value = 0.5
else:
return connection.on_shoot_set(self, fire)
x, y, z = self.world_object.orientation.x, self.world_object.orientation.y, self.world_object.orientation.z
mod = 8.0
grenade_packet.value = value
grenade_packet.player_id = self.player_id
grenade_packet.position = (self.world_object.position.x, self.world_object.position.y, self.world_object.position.z)
grenade_packet.velocity = (x * mod, y * mod, z * mod)
self.protocol.send_contained(grenade_packet)
position = Vertex3(self.world_object.position.x, self.world_object.position.y, self.world_object.position.z)
velocity = Vertex3(x * mod, y * mod, z * mod)
airstrike = self.protocol.world.create_object(Grenade, value,
position, None,
velocity, self.grenade_exploded)
connection.on_shoot_set(self, fire)
return protocol, RocketlauncherConnection
i Applies to roketlauncher but it didn't work it why didn't work? please fix it
Re: [REQUEST]Shoot n' create grenade
Posted: Mon Apr 14, 2014 4:00 pm
by Kuma
danhezee wrote:I think nrzrzr meant to post the following instead of reporting a post and having it as the message.
nrzrzr wrote:
Code: Select allfrom pyspades.server import orientation_data, grenade_packet
from pyspades.common import coordinates, Vertex3
from pyspades.constants import *
from pyspades.world import Grenade
def apply_script(protocol, connection, config):
class RocketlauncherConnection(connection):
def on_hit(self, hit_amount, hit_player, type):
if type != GRENADE_KILL and self.weapon == SHOTGUN_WEAPON:
return False
return connection.on_hit(self, hit_amount, hit_player, type)
def on_shoot_set(self, fire):
if self.weapon == SHOTGUN_WEAPON and self.tool == WEAPON_TOOL and fire == True:
else:
return connection.on_shoot_set(self, fire)
if fire == True:
value = 0.5
else:
return connection.on_shoot_set(self, fire)
x, y, z = self.world_object.orientation.x, self.world_object.orientation.y, self.world_object.orientation.z
mod = 8.0
grenade_packet.value = value
grenade_packet.player_id = self.player_id
grenade_packet.position = (self.world_object.position.x, self.world_object.position.y, self.world_object.position.z)
grenade_packet.velocity = (x * mod, y * mod, z * mod)
self.protocol.send_contained(grenade_packet)
position = Vertex3(self.world_object.position.x, self.world_object.position.y, self.world_object.position.z)
velocity = Vertex3(x * mod, y * mod, z * mod)
airstrike = self.protocol.world.create_object(Grenade, value,
position, None,
velocity, self.grenade_exploded)
connection.on_shoot_set(self, fire)
return protocol, RocketlauncherConnection
i Applies to roketlauncher but it didn't work it why didn't work? please fix it
oh god, dat indentation
Re: [REQUEST]Shoot n' create grenade
Posted: Mon Apr 14, 2014 5:23 pm
by learn_more
danhezee wrote:I think nrzrzr meant to post the following instead of reporting a post and having it as the message.
nrzrzr wrote:
Code: Select allfrom pyspades.server import orientation_data, grenade_packet
from pyspades.common import coordinates, Vertex3
from pyspades.constants import *
from pyspades.world import Grenade
def apply_script(protocol, connection, config):
class RocketlauncherConnection(connection):
def on_hit(self, hit_amount, hit_player, type):
if type != GRENADE_KILL and self.weapon == SHOTGUN_WEAPON:
return False
return connection.on_hit(self, hit_amount, hit_player, type)
def on_shoot_set(self, fire):
if self.weapon == SHOTGUN_WEAPON and self.tool == WEAPON_TOOL and fire == True:
else:
return connection.on_shoot_set(self, fire)
if fire == True:
value = 0.5
else:
return connection.on_shoot_set(self, fire)
x, y, z = self.world_object.orientation.x, self.world_object.orientation.y, self.world_object.orientation.z
mod = 8.0
grenade_packet.value = value
grenade_packet.player_id = self.player_id
grenade_packet.position = (self.world_object.position.x, self.world_object.position.y, self.world_object.position.z)
grenade_packet.velocity = (x * mod, y * mod, z * mod)
self.protocol.send_contained(grenade_packet)
position = Vertex3(self.world_object.position.x, self.world_object.position.y, self.world_object.position.z)
velocity = Vertex3(x * mod, y * mod, z * mod)
airstrike = self.protocol.world.create_object(Grenade, value,
position, None,
velocity, self.grenade_exploded)
connection.on_shoot_set(self, fire)
return protocol, RocketlauncherConnection
i Applies to roketlauncher but it didn't work it why didn't work? please fix it
i doubt it, i think he meant to spam in every possible way, since he's also sending pm's out to people replying here.
Re: [REQUEST]Shoot n' create grenade
Posted: Wed May 07, 2014 12:14 pm
by epicfacethe3rd
sorry if I sound like an idiot that can't code/read python (I can't.), but what if the grenades exploded upon hitting something?
Re: [REQUEST]Shoot n' create grenade
Posted: Wed May 07, 2014 1:02 pm
by 1Shot1Kill
epicfacethe3rd wrote:sorry if I sound like an idiot that can't code/read python (I can't.), but what if the grenades exploded upon hitting something?
Do you even know what necrposting means?