I trust completely in you dear friend.Bloodbane said:Well my friend, actually works ok setting 80, but the knife never hit the enemy after reflex. I try setting hitnemy 1, but nothing.
Yeah, I just discovered that reflected knifes can't hurt the thrower
So since this is for enemy's projectiles, if you want them to hit thrower, the only solution is to use alternate method for shooting projectiles. Of course, the script for reflect will be different too
What do you say?
void shooter2(void vName, float fX, float fY, float fZ, float Vx, float Vy, float Vz)
{//Spawns projectile next to caller
//vName: Model name of entity to be spawned in
//fX: X location adjustment
//fZ: Y location adjustment
//fY: Z location adjustment
//Vx: X speed
//Vy: Y speed
//Vz: Z speed
void self = getlocalvar("self"); //Get calling entity
int Direction = getentityproperty(self, "direction");
void vSpawn; //Spawn object.
vSpawn = spawn01(vName, fX, fY, fZ); //Spawn in projectile
if (Direction == 0){ //Is entity facing left?
Vx = -Vx; //Reverse Vx direction to match facing
}
changeentityproperty(vSpawn, "velocity", Vx, Vz, Vy);
}
void spawn01(void vName, float fX, float fY, float fZ)
{
//spawn01 (Generic spawner)
//Damon Vaughn Caskey
//07/06/2007
//
//Spawns entity next to caller.
//
//vName: Model name of entity to be spawned in.
//fX: X location adjustment.
//fY: Y location adjustment.
//fZ: Z location adjustment.
void self = getlocalvar("self"); //Get calling entity.
void vSpawn; //Spawn object.
int iDirection = getentityproperty(self, "direction");
clearspawnentry(); //Clear current spawn entry.
setspawnentry("name", vName); //Acquire spawn entity by name.
if (iDirection == 0){ //Is entity facing left?
fX = -fX; //Reverse X direction to match facing.
}
fX = fX + getentityproperty(self, "x"); //Get X location and add adjustment.
fY = fY + getentityproperty(self, "a"); //Get Y location and add adjustment.
fZ = fZ + getentityproperty(self, "z"); //Get Z location and add adjustment.
vSpawn = spawn(); //Spawn in entity.
changeentityproperty(vSpawn, "position", fX, fZ, fY); //Set spawn location.
changeentityproperty(vSpawn, "direction", iDirection); //Set direction.
return vSpawn; //Return spawn.
}
name ShockBall2
lifespan 2
type none
offscreenkill 30
nolife 1
subject_to_gravity 0
candamage player npc
anim idle
loop 1
delay 5
followanim 1
followcond 1
offset 35 34
hitflash shock
hitfx data/sounds/jolted.wav
shock 17 19 37 31 10 1
frame data/chars/knbot/shball1.png
frame data/chars/knbot/shball2.png
frame data/chars/knbot/shball3.png
frame data/chars/knbot/shball1.png
frame data/chars/knbot/shball5.png
frame data/chars/knbot/shball4.png
frame data/chars/knbot/shball1.png
frame data/chars/knbot/shball2.png
frame data/chars/knbot/shball6.png
frame data/chars/knbot/shball1.png
frame data/chars/knbot/shball5.png
shock 0
frame data/chars/knbot/shball7.png
anim follow1
delay 5
offset 35 34
frame data/chars/misc/empty.gif
frame data/chars/misc/empty.gif
anim freespecial22
@script
void self = getlocalvar("self"); //Caller.
void vEntity; //Target entity placeholder.
int iEntity; //Entity enumeration holder.
int iName; //Entity name.
int iMax = openborvariant("ent_max"); //Entity count.
int x = getentityproperty(self,"x"); //Get character's x coordinate
int z = getentityproperty(self,"z"); //Get character's a coordinate
int Ex;
int Ez;
int EVx;
int EVz;
//Enumerate and loop through entity collection.
for(iEntity=0; iEntity<iMax; iEntity++){
vEntity = getentity(iEntity); //Get target entity from current loop.
iName = getentityproperty(vEntity, "defaultname"); //Get target name
//Projectile
if(iName == "ShockBall2"){
Ex = getentityproperty(vEntity, "x");
Ez = getentityproperty(vEntity, "z");
if(Ex <= x+40 && Ex >= x-40 && Ez <= z+10 && Ez >= z-10){
EVx = getentityproperty(vEntity, "xdir");
EVz = getentityproperty(vEntity, "zdir");
changeentityproperty(vEntity, "candamage", "TYPE_ENEMY", "TYPE_OBSTACLE");
if(Ex <= x && EVx >= 0){
EVx = -EVx;
} else if(Ex > x && EVx < 0){
EVx = -EVx;
} else {
EVx = EVx;
}
if(Ez <= z+10 && EVz <= 0){
EVz = -EVz;
} else if(Ez > z-10 && EVz > 0){
EVz = -EVz;
} else {
EVz = EVz;
}
changeentityproperty(vEntity, "velocity", EVx, EVz);
}
}
}
@end_script
...
@script
void self = getlocalvar("self"); //Caller.
void vEntity; //Target entity placeholder.
int iEntity; //Entity enumeration holder.
int iName; //Entity name.
int iMax = openborvariant("ent_max"); //Entity count.
int x = getentityproperty(self,"x"); //Get character's x coordinate
int z = getentityproperty(self,"z"); //Get character's a coordinate
int Ex;
int Ez;
int EDir;
int EVx;
int EVz;
//Enumerate and loop through entity collection.
for(iEntity=0; iEntity<iMax; iEntity++){
vEntity = getentity(iEntity); //Get target entity from current loop.
iName = getentityproperty(vEntity, "defaultname"); //Get target name
//Projectile
if(iName == "ShockBall2" || iName == "SArrow2"){
Ex = getentityproperty(vEntity, "x");
Ez = getentityproperty(vEntity, "z");
if(Ex <= x+40 && Ex >= x-40 && Ez <= z+10 && Ez >= z-10){
EVx = getentityproperty(vEntity, "xdir");
EVz = getentityproperty(vEntity, "zdir");
EDir = getentityproperty(vEntity, "direction");
changeentityproperty(vEntity, "candamage", "TYPE_ENEMY", "TYPE_OBSTACLE");
if(Ex <= x && EVx >= 0){
EVx = -EVx;
if(EDir==1){
changeentityproperty(vEntity, "direction", 0);
} else {
changeentityproperty(vEntity, "direction", 1);
}
} else if(Ex > x && EVx < 0){
EVx = -EVx;
if(EDir==1){
changeentityproperty(vEntity, "direction", 0);
} else {
changeentityproperty(vEntity, "direction", 1);
}
} else {
EVx = EVx;
}
if(Ez <= z+10 && EVz <= 0){
EVz = -EVz;
} else if(Ez > z-10 && EVz > 0){
EVz = -EVz;
} else {
EVz = EVz;
}
changeentityproperty(vEntity, "velocity", EVx, EVz);
}
}
}
@end_script
...
behnam said:here a study of Jugo...just do this to day...hope you like it
behnam said:here a study of Jugo...just do this to day...hope you like it
I always take forever making new brushes (doesn't help that I'm not practicing regularly... or at all).behnam said:i use some custom brushes on skin tone...some artistic brushes.
dantedevil said:Thanks my friend!
I send you a PM now.