Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (7th_zorro, degenerate_762, AndrewAMD, ozgur), 774 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rating: 3
Page 5 of 5 1 2 3 4 5
Re: OKAY OKAY FINE!!! FREE AI!! [Re: ] #60053
05/30/07 15:09
05/30/07 15:09
Joined: Aug 2004
Posts: 1,305
New York
PrenceOfDarkness Offline OP
Serious User
PrenceOfDarkness  Offline OP
Serious User

Joined: Aug 2004
Posts: 1,305
New York
Wow I didn't even know I made it that complex... lots of credit to larry as well


"There is no problem that can't be solved with time and determination." -me
prenceofdarkness for instant messages on AIM.

Looking for a model designer
PLEASE, SEND ME A PRIVATE MESSAGE OR EMAIL IF YOU'RE INTERESTED.
Re: OKAY OKAY FINE!!! FREE AI!! [Re: PrenceOfDarkness] #60054
05/30/07 15:52
05/30/07 15:52
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
Blink Offline

Expert
Blink  Offline

Expert

Joined: Jan 2006
Posts: 2,157
Connecticut, USA
I got downloaded the code, I will test it when I get home, thanks PrenceofDarkness and Larry.

Re: OKAY OKAY FINE!!! FREE AI!! [Re: Blink] #60055
05/30/07 21:20
05/30/07 21:20
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
Blink Offline

Expert
Blink  Offline

Expert

Joined: Jan 2006
Posts: 2,157
Connecticut, USA
i get an error. how do i fix? non-existent function, wait. i added the remove suggested.

Re: OKAY OKAY FINE!!! FREE AI!! [Re: Blink] #60056
05/30/07 21:25
05/30/07 21:25

A
Anonymous
Unregistered
Anonymous
Unregistered
A



@Blink I have posted it before how you fix it.

Re: OKAY OKAY FINE!!! FREE AI!! [Re: ] #60057
05/31/07 02:59
05/31/07 02:59
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
Blink Offline

Expert
Blink  Offline

Expert

Joined: Jan 2006
Posts: 2,157
Connecticut, USA
i know, i came up with an error. i guess i put it in the wrong place.

Re: OKAY OKAY FINE!!! FREE AI!! [Re: Blink] #60058
06/01/07 14:07
06/01/07 14:07
Joined: Feb 2006
Posts: 2,185
mpdeveloper_B Offline
Expert
mpdeveloper_B  Offline
Expert

Joined: Feb 2006
Posts: 2,185
i want this as well, i'm sending you my email in pm


- aka Manslayer101
Re: OKAY OKAY FINE!!! FREE AI!! [Re: mpdeveloper_B] #60059
06/01/07 14:09
06/01/07 14:09

A
Anonymous
Unregistered
Anonymous
Unregistered
A



@Manslayer101: you can download the Ai on the 4th page.

Re: OKAY OKAY FINE!!! FREE AI!! [Re: ] #60060
07/02/07 21:49
07/02/07 21:49
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
Blink Offline

Expert
Blink  Offline

Expert

Joined: Jan 2006
Posts: 2,157
Connecticut, USA
did anyone get it to work without the errors? can someone post a fixed code, please?

Re: OKAY OKAY FINE!!! FREE AI!! [Re: Blink] #60061
07/03/07 17:03
07/03/07 17:03
Joined: Jun 2005
Posts: 656
G
Grafton Offline
User
Grafton  Offline
User
G

Joined: Jun 2005
Posts: 656
The "remove()" function is obsolete, you need to change it to "ent_remove()".

Open sed, do a "find text in files", select the folder you have the files in
and search for "remove", it should find several occurences. click on the first
one and sed will open the file with the occurance at the top, change it
to "ent_remove" by adding "ent_",. do this with all occurances, then save all
the files you modified before closing them. Should run fine then.


Not two, not one.
Re: OKAY OKAY FINE!!! FREE AI!! [Re: ] #60062
07/03/07 20:29
07/03/07 20:29
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
Blink Offline

Expert
Blink  Offline

Expert

Joined: Jan 2006
Posts: 2,157
Connecticut, USA
Code:
//********start of gravity******\\
function gravity
{
var tempgravar; //used instead of the temp var
vec_set(tempgravar,my.x);
tempgravar.z -= 10000; // calculate a position 4000 quants below the player
// set a trace mode for using the player's hull, and detecting map entities and level surfaces only
trace_mode = ignore_me+ignore_sprites+IGNORE_MODELS+USE_BOX;
result = trace(my.x,tempgravar); // subtract vertical distance to ground

if (result > 5) // in the air?
{
force.x = 0; // no pushing force
force.y = 0;
force.z = -10; // gravity force
move_friction = 0.1; // air friction
}
else // on or near ground
{
force.x = my.speed; // translation force
force.y = 0;
force.z = -1 * result; // ground elasticity
move_friction = 0.7; // ground friction
}
my.ahead_speed = time_step*force.x + max(1-time_step*friction,0)*my.ahead_speed; // calculate ahead speed
my.vertical_speed = time_step*force.z + max(1-time_step*friction,0)*my.vertical_speed; // calculate vertical speed
dist.x = 0; //time_step * my.ahead_speed; // distance ahead
dist.y = 0;
dist.z = time_step * my.vertical_speed; // distance down
move_mode = ignore_passable + glide;
ent_move(dist,nullvector); // move the player
}
//**********end of gravity******\\

function special_damage //used to handle magic attacks and other detected entities
{
if(event_type == event_scan && my.health >0)
{
if(you.id == 10)
{
my.health -= 2.5;
}
}
}

function check_event
{
if(event_type == event_scan && my.health > 0)
{
gravity();
special_damage();

if(you.id < 4 && you.id >0) //detection of anything that is a guardian, sprite or user
{
wait(1);
entity_scanning_me = you; //detects who ever scans the skell

if(closest_scanning_entity == 0) // when there is no closest entity then whoever scans me is closest
{
closest_scanning_entity = entity_scanning_me;
}
you = closest_scanning_entity;

if(vec_dist (my.x, you.x) <= my.detection_range && vec_dist (my.x, you.x) > my.attack_range && you.id < 4 && my.state == waiting_state)
{//when something is detected and all the above conditions are true walk up to the closest entity
my.state = walking_state;

while(my.state == walking_state)
{
var varyoux[3]; // At the end of this the you.x will change. This keeps the current you.x
if(you != 0)
{
varyoux.x = you.x;
varyoux.y = you.y;
varyoux.z = you.z;
}
wait(1);
vec_set(temp, varyoux);
vec_sub(temp, my.x);
vec_to_angle(my.pan, temp); //face the enamy
my.tilt = 0;
ent_move(my.speed, nullvector);
ent_animate("walk", my.animation); // play walk frames animation
my.animation += my.speed; // animation forwrd / backward
my.animation %= 100;
if (my.animation > 100)
{
my.animation = 0; // loop animation
}
trace_mode = ignore_me+ignore_sprites+USE_BOX;
result = trace(my.x,you.x); //this trace is used so the skell can't see through walls

if(vec_dist (my.x, varyoux) > my.attack_range)
{
my.state = waiting_state; //my state is no longer walking_state
}
}
}

if(vec_dist (my.x, you.x) < my.detection_range && vec_dist (my.x, you.x) <= my.attack_range && you.id < 4 && my.state != attacking_state)
{//if all the above conditions are true attack the closest entity

my.state = attacking_state;
my.animation = 0;
while (my.state == attacking_state)
{
wait(1);
//attack start-----------------------------------------------------------------
if(you != 0)
{
varyoux.x = you.x;
varyoux.y = you.y;
varyoux.z = you.z;
}
vec_set(temp, you.x);
vec_sub(temp, my.x);
vec_to_angle(my.pan, temp);
my.tilt = 0;

while (my.animation < 100)
{
wait (1);
ent_vertex(my.weapon_tip, 291); // sword tip vertex coords - get the value in Med
ent_vertex(my.weapon_base, 306); // sword base vertex coords - get the value in Med
trace_mode = ignore_me + ignore_passable;
trace (my.weapon_base, my.weapon_tip); // trace between these sword positions
if (result != 0) // hit something
{
if (you != null)
{
you.health -= 1 * time_step;
}
}
ent_animate("attack", my.animation); // play attack frames animation
my.animation += my.speed; // "attack" animation speed
}

if(my.animation >= 100)
{
// wait (1);
my.animation = 0; // reset "attack" frames
}

wait (6); // slows down the skell and reduces the number of traces per second
//attack end-------------------------------------------------------------------
if(vec_dist (my.x, you.x) > my.attack_range)
{
my.state = waiting_state; //my state is no longer attacking_state
}
}
}
return;
}
}
else
{
my.state == waiting_state;
return;
}
}

action skell
{
my.id = 7;
my.health = 100;
my.speed = 4;
my.transparent = on;
my.alpha = 100;

my.detection_range = 500;
my.attack_range = 55;

my.enable_scan = on;
my.enable_detect = on;

my.enable_impact = on;
my.enable_entity = on;
my.event = check_event;
my.state = waiting_state;

while(my.health > 0)
{
wait (1);
temp.x = 360;
temp.y = 0;
temp.z = my.detection_range;
scan_entity(my.x,temp);

while(my.alpha > 10)
{
wait(1);
my.alpha = my.health;
}

if (my.health <= 0) // the skell is dead
{
my.passable = on; // the corpse can't be hit by the sword from now on
my.enable_scan = on;
my.enable_detect = on;
my.enable_impact = on;
my.enable_entity = on;
my.id = 0;
if(vec_dist (my.x, player.x) < 1000)
{
player.experience += 50;
}

my.animation = 0;
while(my.animation < 90)
{
wait (1);
ent_animate("death", my.animation); // play death frames animation
my.animation += 1; // "death" animation speed
my.alpha -= 2;
}
ent_remove(me);
return;
}
}
}

action corps
{
my.passable = off;
my.frame = 34;
}

action virull
{
my.id = 3;
my.health = 50;
my.detection_range = 750;
my.attack_range = 100;
my.speed = 5;
my.transparent = on;
my.alpha = 100;
my.enable_scan = on; // the skell is sensitive to scanning
my.enable_detect = on;
my.enable_impact = on;
my.enable_entity = on;
my.event = check_event;
my.state = waiting_state;

while(my.health > 0)
{
wait(1);
randomize();
my.alpha = random(100);

var float;
randomize();
float = random(2)+15;

if(my.state == waiting_state)
{
//
wait(1);
my.z += my.speed;

if(my.z < 100)
{
while(float > 0)
{
wait(1);
my.z += my.speed;
float -= 1;
randomize();
my.alpha = random(100);
}
}

if(my.z > 150)
{
while(float > 0)
{
wait(1);
my.z -= my.speed;
float -= 1;
randomize();
my.alpha = random(100);
}
}
}

temp.x = 360;
temp.y = 0;
temp.z = my.attack_range;
scan_entity(my.x,temp);

my.tilt -= you.tilt;
my.pan -= you.pan;

if(you.id == 2)
{
ent_create(virull_mdl,you.x,virull);
you.health = 0;
}

}
while(my.health <= 0)
{
my.passable = on;
my.id = 0;
my.enable_scan = off; // the skell is sensitive to scanning
my.enable_detect = off;
my.enable_impact = off;
my.enable_entity = off;

my.alpha = 50 + random(50);

var tilt_or_pan_death;
tilt_or_pan_death = random(2);

if(tilt_or_pan_death > 1)
{
my.tilt = random(100);
}
else
{
my.pan = random(100);
}

while(my.alpha > 1)
{
my.z -= 2;
wait(1);
my.alpha -= 1;
if(tilt_or_pan_death>1)
{
my.tilt += 20+random(5);
}
else
{
my.pan += 20+random(5);
}
}
my.alpha = 0;
ent_remove(me);
return;
}

}

function create_virull
{
ent_create(virull_mdl,player.x,virull);
}

// on_t = create_virull;



Page 5 of 5 1 2 3 4 5

Moderated by  adoado, checkbutton, mk_1, Perro 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1