Author Topic: Createbullet help?  (Read 1308 times)

0 Members and 9 Guests are viewing this topic.

Offline kuposrock

  • Major(1)
  • Posts: 33
  • iz are the muffin man
Createbullet help?
« on: December 06, 2008, 02:29:52 pm »
ok im trying to make a bomb thing. where u type bomb wait 5 secs and u explode all over everyone. im still not that great yet but i have a question about create bullet. Why doesnt my m79 bullet explode on the ground. It just travels through it when i move out of the way.
[signature removed; please read forum rules]

Offline chutem

  • Veteran
  • *****
  • Posts: 1119
Re: Createbullet help?
« Reply #1 on: December 06, 2008, 04:59:47 pm »
The only way I can see this happening is if you were standing on only player collides polies (which would be  funny) Or is could be some kind of new bug.

Normally all bullet types collide like they would if fired from a gun.
1NK3FbdNtH6jNH4dc1fzuvd4ruVdMQABvs

Offline kuposrock

  • Major(1)
  • Posts: 33
  • iz are the muffin man
Re: Createbullet help?
« Reply #2 on: December 06, 2008, 05:42:11 pm »
The only way I can see this happening is if you were standing on only player collides polies (which would be  funny) Or is could be some kind of new bug.

Normally all bullet types collide like they would if fired from a gun.

no the ground is normal type. if u shoot it with a gun the bullet pushes up the dust but when u create it, it hits me but not the ground
« Last Edit: December 06, 2008, 06:31:15 pm by kuposrock »
[signature removed; please read forum rules]

Offline shantec

  • Soldier
  • **
  • Posts: 140
  • Get ANGREH!!
Re: Createbullet help?
« Reply #3 on: December 06, 2008, 06:05:14 pm »
Erm... it goes thru "it"? You mean the player?
Well, usually if you use createbullet, and the bullet belongs to the player you'r trying to kill (victim = bullet owner) , and also add some speed to it...
it will do the same like ingame.

When you shoot, the bullet is kinda ignorin' you at the shooting moment ( it stops ignorin you when it starts falling ) (afaik the bullets comes in the middle of you)

Hope you understand

Failboat ahead, didn't read the whole problem well enough!

I have no sollution to that, maybe too high speed?
« Last Edit: December 06, 2008, 06:07:54 pm by shantec »
Also Known As REIMA


Lol Happles (happy apples)

Offline danmer

  • Camper
  • ***
  • Posts: 466
  • crabhead
Re: Createbullet help?
« Reply #4 on: December 06, 2008, 06:15:43 pm »
make sure its not from player 0 and there is someone else on the server (try adding bots)

Offline iDante

  • Veteran
  • *****
  • Posts: 1967
Re: Createbullet help?
« Reply #5 on: December 06, 2008, 06:22:34 pm »
All I can think of would be that you set player ID of the bullet to 0.

Do other bullets created by CreateBullet with the same other parameters go through the ground?

Offline kuposrock

  • Major(1)
  • Posts: 33
  • iz are the muffin man
Re: Createbullet help?
« Reply #6 on: December 06, 2008, 06:29:31 pm »
Erm... it goes thru "it"? You mean the player?
Well, usually if you use createbullet, and the bullet belongs to the player you'r trying to kill (victim = bullet owner) , and also add some speed to it...
it will do the same like ingame.

When you shoot, the bullet is kinda ignorin' you at the shooting moment ( it stops ignorin you when it starts falling ) (afaik the bullets comes in the middle of you)

Hope you understand

Failboat ahead, didn't read the whole problem well enough!

I have no sollution to that, maybe too high speed?
make sure its not from player 0 and there is someone else on the server (try adding bots)

I dont think u guys get it. It hits me NOT the ground.

All I can think of would be that you set player ID of the bullet to 0.

Do other bullets created by CreateBullet with the same other parameters go through the ground?

I tried other bullets they dont collide with the ground
[signature removed; please read forum rules]

Offline shantec

  • Soldier
  • **
  • Posts: 140
  • Get ANGREH!!
Re: Createbullet help?
« Reply #7 on: December 06, 2008, 06:38:13 pm »
Do you actually have any other active scripts that might disturb your createbullet?
Do you maybe have killobject in that script (or in another active script) ?
« Last Edit: December 06, 2008, 06:40:18 pm by shantec »
Also Known As REIMA


Lol Happles (happy apples)

Offline danmer

  • Camper
  • ***
  • Posts: 466
  • crabhead
Re: Createbullet help?
« Reply #8 on: December 06, 2008, 06:49:18 pm »
just paste the script here =/

Offline kuposrock

  • Major(1)
  • Posts: 33
  • iz are the muffin man
Re: Createbullet help?
« Reply #9 on: December 06, 2008, 07:00:29 pm »
Code: [Select]
function OnPlayerCommand(ID: Byte; Text: string): boolean;
var x,y: single;
begin


if Text = '/turret' then begin
    SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),15);
end;


if Text = '/heal' then begin
    SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),16);
end;

if Text = '/invis' then begin
    SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),20);
end;

    if Text = '/vest' then begin
    SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),19);
end;

if Text = '/help' then begin
WriteConsole(ID,'/turret so spawn a turret.',$EE81FAA1);
WriteConsole(ID,'/invis for predator.',$EE81FAA1);
WriteConsole(ID,'/health to spawn a health box above you.',$EE81FAA1);
WriteConsole(ID,'/vest for a vest.',$EE81FAA1);
end;
   
    if Text = '/bomb' then begin
    CreateBullet(GetPlayerStat(ID,'x'), GetPlayerStat(ID,'y') - 100, -5, -5,100, 3, 0);
    CreateBullet(GetPlayerStat(ID,'x'), GetPlayerStat(ID,'y') - 100, 0, -5, 100, 3, 0);
    CreateBullet(GetPlayerStat(ID,'x'), GetPlayerStat(ID,'y') - 100, 5, -5, 100, 3, 0);
end;
end;


[signature removed; please read forum rules]

Offline iDante

  • Veteran
  • *****
  • Posts: 1967
Re: Createbullet help?
« Reply #10 on: December 06, 2008, 07:12:21 pm »
Code: [Select]
function OnPlayerCommand(ID: Byte; Text: string): boolean;
var x,y: single;
begin


   if Text = '/turret' then begin
    SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),15);
   end;
   
   
   if Text = '/heal' then begin
    SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),16);
   end;
   
   if Text = '/invis' then begin
    SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),20);
   end;
   
    if Text = '/vest' then begin
    SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),19);
   end;
   
    if Text = '/help' then begin
    WriteConsole(ID,'/turret so spawn a turret.',$EE81FAA1);
    WriteConsole(ID,'/invis for predator.',$EE81FAA1);
    WriteConsole(ID,'/health to spawn a health box above you.',$EE81FAA1);
    WriteConsole(ID,'/vest for a vest.',$EE81FAA1);
    end;
     
    if Text = '/bomb' then begin
    CreateBullet(GetPlayerStat(ID,'x'), GetPlayerStat(ID,'y') - 100, -5, -5,100, 3, ID);
    CreateBullet(GetPlayerStat(ID,'x'), GetPlayerStat(ID,'y') - 100, 0, -5, 100, 3, ID);
    CreateBullet(GetPlayerStat(ID,'x'), GetPlayerStat(ID,'y') - 100, 5, -5, 100, 3, ID);
   end;
end;
   
Try that.

Offline kuposrock

  • Major(1)
  • Posts: 33
  • iz are the muffin man
Re: Createbullet help?
« Reply #11 on: December 07, 2008, 12:51:22 pm »
Code: [Select]
function OnPlayerCommand(ID: Byte; Text: string): boolean;
var x,y: single;
begin


   if Text = '/turret' then begin
    SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),15);
   end;
  
  
   if Text = '/heal' then begin
    SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),16);
   end;
  
   if Text = '/invis' then begin
    SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),20);
   end;
  
    if Text = '/vest' then begin
    SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),19);
   end;
  
    if Text = '/help' then begin
    WriteConsole(ID,'/turret so spawn a turret.',$EE81FAA1);
    WriteConsole(ID,'/invis for predator.',$EE81FAA1);
    WriteConsole(ID,'/health to spawn a health box above you.',$EE81FAA1);
    WriteConsole(ID,'/vest for a vest.',$EE81FAA1);
    end;
     
    if Text = '/bomb' then begin
    CreateBullet(GetPlayerStat(ID,'x'), GetPlayerStat(ID,'y') - 100, -5, -5,100, 3, ID);
    CreateBullet(GetPlayerStat(ID,'x'), GetPlayerStat(ID,'y') - 100, 0, -5, 100, 3, ID);
    CreateBullet(GetPlayerStat(ID,'x'), GetPlayerStat(ID,'y') - 100, 5, -5, 100, 3, ID);
   end;
end;
   
Try that.


Thanks that works
[signature removed; please read forum rules]