Author Topic: How to kill with CreateBullet without using explosive rounds?  (Read 4285 times)

0 Members and 1 Guest are viewing this topic.

Offline frosty

  • Flagrunner
  • ****
  • Posts: 601
  • Uber Desert Eagle ^^
title says it all, if i spawnBullet (or whatever it is) on someone it doesnt do any damage, i could do 100 bullets and it still hasnt done any damage,

although my wep mod is set to 999999 damage, which works fine when actually using the weapons,

i want to move away from using explosive rounds as its causing MASSIVE lag issues on my server so, how do i do it?

i know that Dodamage results in a selfkill which isnt what i want

i also want to set up like a turret that auto fires, but how do i get the angle of direction from turret to target and Createbullet with that angle info?
« Last Edit: June 28, 2010, 07:23:53 pm by frosty »
check out my server! click here

If at first you don't succeed, Improvise! :D

Offline Gizd

  • Flagrunner
  • ****
  • Posts: 586
  • (Re)tired
    • Eat-this! community site
Re: How to kill with CreateBullet without using explosive rounds?
« Reply #1 on: June 29, 2010, 12:22:54 am »
You need to get angle between turret and player:
Code: [Select]
function arctan2(X, Y: single): single;
begin
  if X < 0 then Result := arctan(Y/X) + Pi else
  if X > 0 then Result := arctan(Y/X) else
  if Y > 0 then Result := 1.5707 else
   Result := -1.5707;
end;

a:= arctan(X2-X1,Y2-Y1);
*arctan2() made by tk.

Code: [Select]
vX:= cos(a)*velocity;
vY:= sin(a)*velocity;
CreateBullet(TurretX,TurretY,vX,vY,Power,Style,ID);
This will create a bullet going from turret to player, you need to find some angle adjustments though if you want low velocity bullets to hit.

Offline VirtualTT

  • Veteran
  • *****
  • Posts: 1026
Re: How to kill with CreateBullet without using explosive rounds?
« Reply #2 on: June 29, 2010, 03:12:12 am »
CreateBullet function doesn't use any values from weapon mod, you need to manually specify bullet power (~10000 for sure kill). Also resulting damage will be effected by the speed of the bullet. So don't set speed to 0 if bullet is spawned just inside the player.
« Last Edit: June 29, 2010, 03:16:39 am by VirtualTT »

Offline Swompie

  • Camper
  • ***
  • Posts: 390
Re: How to kill with CreateBullet without using explosive rounds?
« Reply #3 on: June 29, 2010, 08:51:33 am »
CreateBullet function doesn't use any values from weapon mod, you need to manually specify bullet power (~10000 for sure kill). Also resulting damage will be effected by the speed of the bullet. So don't set speed to 0 if bullet is spawned just inside the player.
Aswell don't place bullets with rapid speed near players because they will just fly through them.

Code: [Select]
function arctan2(X, Y: single): single;
begin
  if X < 0 then Result := arctan(Y/X) + Pi else
  if X > 0 then Result := arctan(Y/X) else
  if Y > 0 then Result := 1.5707 else
   Result := -1.5707;
end;
<3  :P

Offline frosty

  • Flagrunner
  • ****
  • Posts: 601
  • Uber Desert Eagle ^^
Re: How to kill with CreateBullet without using explosive rounds?
« Reply #4 on: June 29, 2010, 10:29:33 pm »
uhh how exactly do i set bullet "speed" in CreateBullet? someone give me an example plz

theres no "speed" var in the syntax, only VelX and VelY, tried 1000 VelY with HitMultiplier as 10000 and it doesnt kill, so how exactly do i set the speed?
check out my server! click here

If at first you don't succeed, Improvise! :D

Offline Hacktank

  • Camper
  • ***
  • Posts: 462
  • Soldat Scripter
    • HTZRPG
Re: How to kill with CreateBullet without using explosive rounds?
« Reply #5 on: June 30, 2010, 12:34:34 am »
1000 for a sold at velocity is ungodly. The bullet would span the entire map in a second.... Try 1.


Offline Swompie

  • Camper
  • ***
  • Posts: 390
Re: How to kill with CreateBullet without using explosive rounds?
« Reply #6 on: June 30, 2010, 06:59:42 am »
Well.. speed would be sqrt(VelX * VelX + VelY * VelY)
And if you don't understand what VelX and VelY means you kinda did miss something..

CreateBullet(x, y, -10, 0, 100, 14, owner); Bullet flys straight up.
CreateBullet(x, y, -10, 10, 100, 14, owner); Would create a bullet which starting angle is 45° (flys ^>)
CreateBullet(x, y, 0, 10, 100, 14, owner); Flys to the right of it's spawning position.

I think this should be enough so you get the idea.

Offline frosty

  • Flagrunner
  • ****
  • Posts: 601
  • Uber Desert Eagle ^^
Re: How to kill with CreateBullet without using explosive rounds?
« Reply #7 on: June 30, 2010, 01:31:56 pm »
1 VelY doest kill, even with a hit multiplier of 100000, for a kill i need a minimum of 1000 VelY coupled with hitM of 100000

idk wtfh is going on here, but it is irritating

also, VelX and VelY isnt explained in the doc at all if anything so its a bit confusing

and also i need to use GetPlayerStat in VelX and VelY for it to even work

makes more sense now tho but my problem with Vely is an issue :S
check out my server! click here

If at first you don't succeed, Improvise! :D

Offline Swompie

  • Camper
  • ***
  • Posts: 390
Re: How to kill with CreateBullet without using explosive rounds?
« Reply #8 on: July 01, 2010, 06:47:29 am »
You don't need GetPlayerStat..
Negative VelY: Bullets move up.
Positive VelY: Bullets move down.
The point (0|-5) would be over the point (0|5), it's just how MM coded it.
Hope that's what you wanted to know.
Also why don't you just use DoDamage() >_>'

Offline frosty

  • Flagrunner
  • ****
  • Posts: 601
  • Uber Desert Eagle ^^
Re: How to kill with CreateBullet without using explosive rounds?
« Reply #9 on: July 01, 2010, 01:24:53 pm »
Because Dodamage results in selfkill of target, like i said earlier, that is not what i wanted

thanks swompie for the explanation, explains a few things that have happened (somewhat randomly(ugh! silly me)) :D
check out my server! click here

If at first you don't succeed, Improvise! :D

Offline Gizd

  • Flagrunner
  • ****
  • Posts: 586
  • (Re)tired
    • Eat-this! community site
Re: How to kill with CreateBullet without using explosive rounds?
« Reply #10 on: July 01, 2010, 01:48:29 pm »
Because Dodamage results in selfkill of target, like i said earlier, that is not what i wanted
DoDamageBy()

Offline frosty

  • Flagrunner
  • ****
  • Posts: 601
  • Uber Desert Eagle ^^
Re: How to kill with CreateBullet without using explosive rounds?
« Reply #11 on: July 01, 2010, 07:12:12 pm »
thanks Gizd :), im guessing the syntax is DoDamageBy(Target,Owner) ?

also where did you get that function? it isnt on:
http://enesce.com/help/ or http://devs.soldat.pl/wiki/index.php?title=Server_Scripting
« Last Edit: July 01, 2010, 07:19:42 pm by frosty »
check out my server! click here

If at first you don't succeed, Improvise! :D

Offline squiddy

  • Soldat Beta Team
  • Camper
  • ******
  • Posts: 333
  • Flagger assassin
    • SoldatX
Re: How to kill with CreateBullet without using explosive rounds?
« Reply #12 on: July 01, 2010, 11:04:32 pm »
thanks Gizd :), im guessing the syntax is DoDamageBy(Target,Owner) ?

also where did you get that function? it isnt on:
http://enesce.com/help/ or http://devs.soldat.pl/wiki/index.php?title=Server_Scripting

I believe it's DoDamageBy(Victim, Shooter, Damage);
« Last Edit: July 01, 2010, 11:07:49 pm by squiddy »
www.soldatx.com.br - The brazilian Soldat community.

Offline frosty

  • Flagrunner
  • ****
  • Posts: 601
  • Uber Desert Eagle ^^
Re: How to kill with CreateBullet without using explosive rounds?
« Reply #13 on: July 02, 2010, 01:29:32 am »
thanks squiddy :D

hmm ill have to stick with CreateBullet, DoDamageBy with 99 set as damage causes way worse lag than createbullet and actually continuosly causes the script to crash and the server to completely hang, hmm

From: July 02, 2010, 01:43:54 am
edit: wtf is going on? if i remove the GetplayerStat from VelY in CreateBullet it doesnt kill!! wtf!!!!!!!!
« Last Edit: July 02, 2010, 01:43:54 am by frosty »
check out my server! click here

If at first you don't succeed, Improvise! :D

Offline Gizd

  • Flagrunner
  • ****
  • Posts: 586
  • (Re)tired
    • Eat-this! community site
Re: How to kill with CreateBullet without using explosive rounds?
« Reply #14 on: July 02, 2010, 02:01:35 am »
also where did you get that function? it isnt on:
http://enesce.com/help/ or http://devs.soldat.pl/wiki/index.php?title=Server_Scripting
Quote from: devs.soldat.pl
NOTE: If you wish to be able to specify a player ID doing damage, use DoDamageBy:
 procedure DoDamageBy(ID,Shooter: Byte; Damage: Integer);

hmm ill have to stick with CreateBullet, DoDamageBy with 99 set as damage causes way worse lag than createbullet and actually continuosly causes the script to crash and the server to completely hang, hmm
Lies! Code please.
« Last Edit: July 02, 2010, 02:03:37 am by Gizd »

Offline frosty

  • Flagrunner
  • ****
  • Posts: 601
  • Uber Desert Eagle ^^
Re: How to kill with CreateBullet without using explosive rounds?
« Reply #15 on: July 02, 2010, 03:34:55 am »
nevermind, got CreateBullet to work fine, dont need DoDamageBy
check out my server! click here

If at first you don't succeed, Improvise! :D

Offline Gizd

  • Flagrunner
  • ****
  • Posts: 586
  • (Re)tired
    • Eat-this! community site
Re: How to kill with CreateBullet without using explosive rounds?
« Reply #16 on: July 02, 2010, 04:41:09 am »
nevermind, got CreateBullet to work fine, dont need DoDamageBy
If player is close to wall it might change.

Offline frosty

  • Flagrunner
  • ****
  • Posts: 601
  • Uber Desert Eagle ^^
Re: How to kill with CreateBullet without using explosive rounds?
« Reply #17 on: July 02, 2010, 05:58:24 am »
ok if thats the case

this is in OnPlayerKill, all Vars have been declared, dont understand why this causes the server to hang when this weapon is used, this ONLY started hanging after i put in DoDamageBy (was using the commented out CreateBullet)

Code: (pascal) [Select]
if Weapon = 'Barrett M82A1' then begin
for i := 1 to 32 do
begin
x := GetPlayerStat(Victim,'x');
y := GetPlayerStat(Victim,'y');
x2 := GetPlayerStat(i,'x');
y2 := GetPlayerStat(i,'y');
if RayCast(x,y,x2,y2,Dist,400) then begin
if i <> Killer then begin   
if GetPlayerStat(i,'Alive') = true then begin
//WriteLn(IDtoName(i)+' is in range of Raycast');
//CreateBullet(GetPlayerStat(i,'x'), GetPlayerStat(i,'y') - 0, 0,-1000,100, 3, Killer);
                                                                     DoDamageBy(i, Killer, 99);
BioKills[Killer]:=BioKills[Killer]+1;
end;
end;
end;
end;
WriteConsole(Killer,'Bio-Kills: '+Inttostr(BioKills[Killer]),$EE81FAA1);
BioKills[Killer]:=BioKills[Killer]*0;
end;

this is the only part of the script that has the DoDamageBy

i dont get it, why the hell is it hanging the server? why is it the CreateBullet works fine with barely any lag yet DoDamageBy hangs the server? i dont get it :S also the script crashes 20 times in a row, then i get a crapload of access violations in Panel Log resulting in me needing to reset the server
Quote
If player is close to wall it might change.

has now, now that you mention it, i just found that out while in my server

edit: i dont get why the forum has indented DoDamageBy so far to the right....
« Last Edit: July 02, 2010, 06:03:39 am by frosty »
check out my server! click here

If at first you don't succeed, Improvise! :D

Offline Swompie

  • Camper
  • ***
  • Posts: 390
Re: How to kill with CreateBullet without using explosive rounds?
« Reply #18 on: July 02, 2010, 06:46:33 am »
Can you show OnPlayerDamage? Before doing so check if it's making an Infinite damage loop.

Offline croat1gamer

  • Veteran
  • *****
  • Posts: 1327
  • OMG CHANGING AVATAR!!! ^ω^
Re: How to kill with CreateBullet without using explosive rounds?
« Reply #19 on: July 02, 2010, 07:15:22 am »
I would need the whole script to find the problem, because of Weapon and similar stuff.

Also, i cant remember that DoDamageBy exists, it isnt even in the scripting manual. :\
Did you try  DoDamage(i, Killer, 4000)

Also, what is the script supposed to do, or at least this fragment?
Kill the enemy if he is inside a 400 radius while the victim has barrett?
I think you would need to assign with AppOnIdle the weapon check to each player, something like this (youll need to adopt it to the overall script:
Code: (pascal) [Select]
procedure AppOnIdle(Ticks: integer);
var
i: integer;
Weapon: array[1..255] of array[1..32];
begin
for i:= 1 to 32 do Weapon[GetPlayerStat(i, 'Primary')][i];
end;
end;

//and then instead of
if Weapon = 'Barrett M82A1' then begin 
        for i := 1 to 32 do 
//place
for i: 1 to 32 do if Weapon[8][i] then begin 

// or something like that. again, i would need to see the whole script
Also, im not sure if i can assign the double array like that, but i always failed with x[y][z] := x[1][2] and similar, can someone recheck that part?
Last year, I dreamt I was pissing at a restroom, but I missed the urinal and my penis exploded.

Offline Gizd

  • Flagrunner
  • ****
  • Posts: 586
  • (Re)tired
    • Eat-this! community site
Re: How to kill with CreateBullet without using explosive rounds?
« Reply #20 on: July 02, 2010, 10:24:08 am »
Also, i cant remember that DoDamageBy exists, it isnt even in the scripting manual. :\
Did you try  DoDamage(i, Killer, 4000)
In 2.7.0 DoDamage replaces DoDamageBy.

And the problem is that you don't check for activeness of player(player can be alive and active). If that won't help try replacing GetPlayerStat(alive) with GetPlayerStat(health) > 0.
« Last Edit: July 02, 2010, 10:25:39 am by Gizd »

Offline croat1gamer

  • Veteran
  • *****
  • Posts: 1327
  • OMG CHANGING AVATAR!!! ^ω^
Re: How to kill with CreateBullet without using explosive rounds?
« Reply #21 on: July 02, 2010, 10:45:22 am »
Oh.
Is he using 2.7.0 or 2.6.5?
Last year, I dreamt I was pissing at a restroom, but I missed the urinal and my penis exploded.

Offline Gizd

  • Flagrunner
  • ****
  • Posts: 586
  • (Re)tired
    • Eat-this! community site
Re: How to kill with CreateBullet without using explosive rounds?
« Reply #22 on: July 02, 2010, 10:48:10 am »
2.6.5, in 2.7.0 all weapon parameters are byte not string.

Offline croat1gamer

  • Veteran
  • *****
  • Posts: 1327
  • OMG CHANGING AVATAR!!! ^ω^
Re: How to kill with CreateBullet without using explosive rounds?
« Reply #23 on: July 02, 2010, 10:54:47 am »
Yeh, i was thinking he was writing the script for 2.6.5, not 2.7.0. :\
Last year, I dreamt I was pissing at a restroom, but I missed the urinal and my penis exploded.

Offline frosty

  • Flagrunner
  • ****
  • Posts: 601
  • Uber Desert Eagle ^^
Re: How to kill with CreateBullet without using explosive rounds?
« Reply #24 on: July 02, 2010, 09:19:44 pm »
actually what this segment does is kill all zombies in 400 metre radius of Victim if Killer has Barret and is in "sight"

heres the full script :(attached)

@croatgamer: correct, my host is using 1.6.5

SN: DoDamageBy is commented out in the script as its causing instability (amazing how commenting out ONE line fixes all issues :S)

edit: actually i removed the DoDamageBy line

From: July 02, 2010, 11:40:32 pm
i just found out my host is using server version 2.6.6 for his customers
« Last Edit: July 02, 2010, 11:40:32 pm by frosty »
check out my server! click here

If at first you don't succeed, Improvise! :D

Offline frosty

  • Flagrunner
  • ****
  • Posts: 601
  • Uber Desert Eagle ^^
Re: How to kill with CreateBullet without using explosive rounds?
« Reply #25 on: July 07, 2010, 08:38:27 pm »
btw, if i use DoDamage with the syntax as DoDamageBy i get an "incorrect number of parameters" error so i have to use CreateBullet
« Last Edit: July 07, 2010, 08:49:00 pm by frosty »
check out my server! click here

If at first you don't succeed, Improvise! :D

Offline Swompie

  • Camper
  • ***
  • Posts: 390
Re: How to kill with CreateBullet without using explosive rounds?
« Reply #26 on: July 08, 2010, 06:59:41 am »
Because DoDamage has the additional parameter Shooter in the beta server and DoDamageBy was removed due to that.
Hint: eC's manual is already up-to-date with the beta server, so don't use it if your not knowing much about all the functions in soldat scripting ;f If you would you would've known this :/

Offline frosty

  • Flagrunner
  • ****
  • Posts: 601
  • Uber Desert Eagle ^^
Re: How to kill with CreateBullet without using explosive rounds?
« Reply #27 on: July 08, 2010, 01:27:38 pm »
well im not using 2.7.0, and DoDamage(Shooter,Victim,Damage) doesnt work so what else can i use? CreateBullet doesnt work too well because zombies are always near walls so the created bullets somehow miss their targets even tho the bullet is spawned on each zombie and goes straight up

and, i know about the functions i the ec help center, but thats for 2.7.0, NOT 2.6.6 which is more like 2.6.5, which is why i dont use the ec help center, it would be different if my host was actually using 2.7.0 then i WOULD use it, but since he isnt, i cant use it because the code there is incorrect for 2.6.6, how is it incorrect? well i copy and paste...lets say a function with a begin and end, sometimes only that is enough to cause errors, especially when its an updated function name

so, i ask again, what else can i use to kill zombies that are in range of a raycast effectively, without using explosive rounds? explosive rounds are the only things that do work 100%, but BULLETS MISS, and bullets have a hit rate of about 30% compared to explosive rounds and DoDamageBy(which i cant use apparently) hangs the server. how do i get around that, explosions are causing too much CPU usage on host

there MUST be something i can use, all help appreciated :)
« Last Edit: July 08, 2010, 01:30:38 pm by frosty »
check out my server! click here

If at first you don't succeed, Improvise! :D

Offline dnmr

  • Camper
  • ***
  • Posts: 315
  • emotionally handicapped
Re: How to kill with CreateBullet without using explosive rounds?
« Reply #28 on: July 09, 2010, 06:37:02 am »
this sounds quite mysterious. Try it again with DoDamageBy, but add "if getplayerstat(i,'Active') = true then" after your "for i := 1 to  32 do"

Offline frosty

  • Flagrunner
  • ****
  • Posts: 601
  • Uber Desert Eagle ^^
Re: How to kill with CreateBullet without using explosive rounds?
« Reply #29 on: July 14, 2010, 01:22:35 am »
Hung the server again

Code: (pascal) [Select]
if Weapon = 'Barrett M82A1' then begin
for i := 1 to 32 do
begin
x := GetPlayerStat(Victim,'x');
y := GetPlayerStat(Victim,'y');
x2 := GetPlayerStat(i,'x');
y2 := GetPlayerStat(i,'y');
if RayCast(x,y,x2,y2,Dist,400) then begin
if i <> Killer then begin   
if GetPlayerStat(i,'Alive') = true then begin
//WriteLn(IDtoName(i)+' is in range of Raycast');
CreateBullet(GetPlayerStat(i,'x'), GetPlayerStat(i,'y') - 0, 0,-1000,100, 3, Killer);
              if getplayerstat(i,'Active') then DoDamageBy(i, Killer, 99);
BioKills[Killer]:=BioKills[Killer]+1;
end;
end;
end;
end;
WriteConsole(Killer,'Bio-Kills: '+Inttostr(BioKills[Killer]),$EE81FAA1);
BioKills[Killer]:=BioKills[Killer]*0;
end;

full code in attachment
check out my server! click here

If at first you don't succeed, Improvise! :D

DarkCrusade

  • Guest
Re: How to kill with CreateBullet without using explosive rounds?
« Reply #30 on: July 14, 2010, 10:08:33 am »
The way your script works is very inefficient. You access the position of Killer 32 times, in my version I only access it once. Also you must check whether the ID you are trying to access is active before trying to get values from it. Also this could be interesting for you:

Ineffective:
Code: (pascal) [Select]
if (...) then begin
  if (...) then begin
 
  end;
end;

Effective:
Code: (pascal) [Select]
if ((...) AND (...)) OR (...) then begin

end;

Also: Instead of "BioKills[Killer]:=BioKills[Killer]*0;" you can just set its value like "BioKills[Killer] := 0;".

Code: (pascal) [Select]
Procedure OnPlayerKill(Killer,Victim:Byte; Weapon:String);
var
  X1,X2,Y1,Y2:Single
  i:Byte;
begin
  if Weapon = 'Barrett M82A1' then begin
GetPlayerXY(Victim,X,Y)
  for i := 1 to 32 do if (GetPlayerStat(i,'Active') = true) then begin
GetPlayerXY(i,X2,Y2);
if RayCast(X1,Y1,X2,Y2,Dist,400) AND (i <> Killer) AND (GetPlayerStat(i,'Alive') = true) then begin
//WriteLn(IDtoName(i)+' is in range of Raycast');
CreateBullet(GetPlayerStat(i,'x'), GetPlayerStat(i,'y') - 0, 0,-1000,100, 3, Killer);
                                DoDamageBy(i, Killer, 99);
BioKills[Killer]:=BioKills[Killer]+1;
end;
end;
WriteConsole(Killer,'Bio-Kills: '+Inttostr(BioKills[Killer]),$EE81FAA1);
BioKills[Killer] := 0;
end;

Offline frosty

  • Flagrunner
  • ****
  • Posts: 601
  • Uber Desert Eagle ^^
Re: How to kill with CreateBullet without using explosive rounds?
« Reply #31 on: July 14, 2010, 01:21:09 pm »
ooh i see, many thanks Dark

this might help me with other scripts also :)
check out my server! click here

If at first you don't succeed, Improvise! :D

Offline zyxstand

  • Veteran
  • *****
  • Posts: 1106
  • Mother of all Bombs
Re: How to kill with CreateBullet without using explosive rounds?
« Reply #32 on: July 14, 2010, 02:00:45 pm »
wow, just had to comment on the line
BioKills[Killer] = BioKills[Killer] * 0

.........seriously?!

Without trying to sound condescending, I think you should go learn assembly and then C++ to have a better understanding of how the computer works.  You'll learn how to be much more efficient with programming concepts.  In my opinion, people should learn in this order:
1- physics
2- chemistry
3- electronic theory
4- analog design
5- logic design
6- digital design
7- microprocessors and assembly
8- C++
9- youdotherest
Can't think of anything original to put here...

Offline dnmr

  • Camper
  • ***
  • Posts: 315
  • emotionally handicapped
Re: How to kill with CreateBullet without using explosive rounds?
« Reply #33 on: July 14, 2010, 02:02:53 pm »
Without trying to sound condescending, I think you should go learn assembly and then C++ to have a better understanding of how the computer works.  You'll learn how to be much more efficient with programming concepts.  In my opinion, people should learn in this order:
1- physics
2- chemistry
3- electronic theory
4- analog design
5- logic design
6- digital design
7- microprocessors and assembly
8- C++
9- youdotherest
you forgot
0- common sense

Offline zyxstand

  • Veteran
  • *****
  • Posts: 1106
  • Mother of all Bombs
Re: How to kill with CreateBullet without using explosive rounds?
« Reply #34 on: July 14, 2010, 02:05:11 pm »
Without trying to sound condescending, I think you should go learn assembly and then C++ to have a better understanding of how the computer works.  You'll learn how to be much more efficient with programming concepts.  In my opinion, people should learn in this order:
1- physics
2- chemistry
3- electronic theory
4- analog design
5- logic design
6- digital design
7- microprocessors and assembly
8- C++
9- youdotherest
you forgot
0- common sense

haha, i ddin't put it because i thought it was common sense to have common sense :P (but you're right)
Can't think of anything original to put here...

Offline frosty

  • Flagrunner
  • ****
  • Posts: 601
  • Uber Desert Eagle ^^
Re: How to kill with CreateBullet without using explosive rounds?
« Reply #35 on: July 14, 2010, 07:13:51 pm »
OMFG my server is such a f**king douche, it hung again, with that code

From: July 14, 2010, 07:19:18 pm
i think DodamageBy is for 2.7.0 not 2.6.6 since my server doesnt like it, so ill just have to put up with BioKills not working right, unless i put a bullet to the left and right going into the player at high velocity, like my sig says, if at first you dont succeed, improvise :D

unless there is something OTHER THAN DoDamageBy AND CreateBullet, if there isnt, just say so, im getting sick of going round in circles here

if zombies all happen to be in the air, then the createbullet works fine 100%, but if they near wall, most of the bullets miss, and hit at 0-30%, i need something thats EFFICIENT (works 100%) and is NOT CreateBullet OR DoDamageBy
« Last Edit: July 14, 2010, 07:40:04 pm by frosty »
check out my server! click here

If at first you don't succeed, Improvise! :D

DarkCrusade

  • Guest
Re: How to kill with CreateBullet without using explosive rounds?
« Reply #36 on: July 15, 2010, 01:16:24 am »
The server can crash when you choose a too high velocity.

Change...
CreateBullet(GetPlayerStat(i,'x'),GetPlayerStat(i,'y') - 0, 0,-1000,100, 3, Killer);
To...
CreateBullet(GetPlayerStat(i,'X'),GetPlayerStat(i,'Y'),0,0,350,5,Killer);

DoDamageBy() works just fine. It's all about CreateBullet(). I changed the bulletstyle to 5 (flames) and the hit multiplier to 350%. This should totally work now.

Offline Swompie

  • Camper
  • ***
  • Posts: 390
Re: How to kill with CreateBullet without using explosive rounds?
« Reply #37 on: July 15, 2010, 06:41:16 am »
Quote
The server can crash when you choose a too high velocity.
Not really.

Just freakin' ask eC if he knows why DoDamageBy doesn't work correctly, either way your a fucking stupid cunt or, well there's no real or.
It works, prolly it's because of some other script you use, learn2debug.

DarkCrusade

  • Guest
Re: How to kill with CreateBullet without using explosive rounds?
« Reply #38 on: July 15, 2010, 07:03:40 am »
I already crashed my server with 8 CreateBullets with high velocity..

Offline frosty

  • Flagrunner
  • ****
  • Posts: 601
  • Uber Desert Eagle ^^
Re: How to kill with CreateBullet without using explosive rounds?
« Reply #39 on: July 15, 2010, 12:58:13 pm »
well why is it that the server works perfect as soon as i REMOVE DoDamageBy?

i dont get it, and how the hell would i debug whats causing DoDamageBy to not work? and whats your server version Dark? if its 2.7.0 then thats the problem because mine IS NOT 2.7.0.....

also, if i use flames in CreateBullet, with No bullet Velocity, just 1 CreateBullet with flames lags the server to shit
« Last Edit: July 15, 2010, 01:04:16 pm by frosty »
check out my server! click here

If at first you don't succeed, Improvise! :D

Offline Swompie

  • Camper
  • ***
  • Posts: 390
Re: How to kill with CreateBullet without using explosive rounds?
« Reply #40 on: July 15, 2010, 01:38:04 pm »
Quote
It works, prolly it's because of some other script you use
That's also debugging if you disable of scripts.
Maybe you just fucked up some setting tho.

Offline Mighty

  • Camper
  • ***
  • Posts: 276
Re: How to kill with CreateBullet without using explosive rounds?
« Reply #41 on: July 15, 2010, 02:08:41 pm »
also, if i use flames in CreateBullet, with No bullet Velocity, just 1 CreateBullet with flames lags the server to s**t

Hmm i had the same problem with flames, but since i changed last variable ("Owner") to an existing one (player must be on the server) everything works fine, no server crushes
xFire: macmil        e-mail: macekmil@gmail.com
My scripts: Accuracy Script       Flashbang       Punishments GUID
            CatchMe Gamemod       AntiFake
            CW System             AntiFakeGUID

DarkCrusade

  • Guest
Re: How to kill with CreateBullet without using explosive rounds?
« Reply #42 on: July 15, 2010, 02:10:23 pm »
Are you running the server on your own computer? If that's so you must keep your scripts very light since you already have all those zombies and stuff.

Server version: 2.6.5

---------------------------

Lesson in debugging your script. Lets say we got this script:

Code: (pascal) [Select]
Procedure AppOnIdle(Ticks:Integer);
var
  i,ii:Byte;
begin
  if (Mine_Enabled = true) then CheckMines();
  for i := 1 to HighestID() do if (GetPlayerStat(i,'Active') = true) then begin
  if (Player[i].Vanish) then
  if (Player[i].VanishTimer = 0) then
    RefreshVanish(i)
  else
        TimedVanish(i);
  if (Player[i].Rage) then
  if (Player[i].RageTimer = 0) then
RefreshRage(i)
else
TimedRage(i);
if (Player[i].Knife) AND (GetPlayerStat(i,'Primary') <> 14) then ForceWeapon(i,14,255,0);
for ii := 1 to HighestID() do if (GetPlayerStat(ii,'Active') = true) AND (Player[i].Spy[ii]) then            DrawSpyInterface(i,ii);
end;
end;

The error lies in one of the procedures being called by AppOnIdle, but the soldatserver won't tell us. Now we put in WriteLn('n') (first WriteLn n = 1, second = 2 ...) after each line to see where the error lies. Now that we know where the error lies we go on with the same tactic and look where the error lies this time. Do this until your script is debugged, it's that simple ;)
« Last Edit: July 15, 2010, 02:15:13 pm by DarkCrusade »

Offline frosty

  • Flagrunner
  • ****
  • Posts: 601
  • Uber Desert Eagle ^^
Re: How to kill with CreateBullet without using explosive rounds?
« Reply #43 on: July 15, 2010, 07:41:34 pm »
nope the server is external on a host, its not on my comp

thanks for the lesson Dark :D ill give it a go, but later, got RL things that need my immediate attention, ill post back later on
check out my server! click here

If at first you don't succeed, Improvise! :D