Author Topic: How do I shoot gun bullets from a player  (Read 903 times)

I tried

Code: [Select]
findClientByName("Kinesivan").player.spawnProjectile(0,0,0,"Gun Bullet",0,0,0,1.000);
but it's not working. i want to make a function that makes a player spawn a projectile where he's looking at please help

Well if you want to have it a certain spot that you stand on and shoot than make the bricks events:

Onplayertouch --> Player --> Shoot Projectile(XYZ and stuff like that)

Well if you want to have it a certain spot that you stand on and shoot than make the bricks events:

Onplayertouch --> Player --> Shoot Projectile(XYZ and stuff like that)
No i'm making a ninja mod at my server and i need scripts asdf

Well if you want to have it a certain spot that you stand on and shoot than make the bricks events:

Onplayertouch --> Player --> Shoot Projectile(XYZ and stuff like that)

This is Coding Help

It seems, findclientbyname(honor).player.spawnProjectile(100, gunprojectile, "0 0 0", 1); works.

Also see : http://forum.blockland.us/index.php?topic=123085.msg2647404#msg2647404
« Last Edit: November 24, 2012, 05:34:25 PM by Honorabl3 »

look at the event: velocity, item, variance, scale(?)

think about each of these
velocity is an integer
item is the uiname/datablock name of a projectile
variance is a 3 integer combo, a vector
scale is an integer

so what do you do?
%obj.spawnProjectile(%velocity, %projectile, %variance, %scale);
go go go go go

look at the event: velocity, item, variance, scale(?)
forget, THATS what that was..

I've been in the dark for so long.

Code: [Select]
findClientByName("Kinesivan").player.spawnProjectile(0,0,0,"Gun Bullet",0,0,0,1.000);

findclientbyname("Kivensivan").player.spawnProjcetile(
is correct, but then 0,0,0 is incorrect, it is 1 argument so you do "0 0 0"
"Gun Bullet" is incorrect because it has to be a datablock name, the events gives the UIname because its for people who can't code. So gunprojectile works.
0,0,0 same thing as above, "0 0 0"
1.000 is correct though
so the final product is
findclientbyname(Kiven).player.spawnProjectile("0 0 0",gunProjectile,"0 0 0",1.000); should work.

localclientconnection? anyone?


look at the event: velocity, item, variance, scale(?)

think about each of these
velocity is an integer
item is the uiname/datablock name of a projectile
variance is a 3 integer combo, a vector
scale is an integer

what

vector3F velocity
projectileData projectile
vector3F variance
float scale