Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, Akow), 1,371 guests, and 10 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19055 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
how can know my enemy where is my player for attack ? #217730
07/24/08 15:44
07/24/08 15:44
Joined: Jul 2007
Posts: 69
fat32 Offline OP
Junior Member
fat32  Offline OP
Junior Member

Joined: Jul 2007
Posts: 69
how can know my enemy where is my player for attack ?
i use c_move for player and don't use template code

tnx


dobidob hosein_dig and max_man7000 game

HAPPY NEW YEAR !!
Re: how can know my enemy where is my player for attack ? [Re: fat32] #217733
07/24/08 15:59
07/24/08 15:59
Joined: Jul 2008
Posts: 56
I
iam_ufo973 Offline
Junior Member
iam_ufo973  Offline
Junior Member
I

Joined: Jul 2008
Posts: 56
// this will turn to player and move to him
vec_set(temp, player.x);
vec_sub(temp, my.x);
vec_to_angle(my.pan, temp);
move.x=2*time;
ent_move(move,nullvector);

//this will attack him if distance between them is less then 50
if (vec_dist(my.x,player.x)<50)
{
//attack script here
}

I suggest you read AUM megazines.

Re: how can know my enemy where is my player for attack ? [Re: iam_ufo973] #217756
07/24/08 18:11
07/24/08 18:11
Joined: Jul 2007
Posts: 69
fat32 Offline OP
Junior Member
fat32  Offline OP
Junior Member

Joined: Jul 2007
Posts: 69
thanks i test that


dobidob hosein_dig and max_man7000 game

HAPPY NEW YEAR !!
Re: how can know my enemy where is my player for attack ? [Re: fat32] #217841
07/25/08 05:40
07/25/08 05:40
Joined: Jul 2007
Posts: 69
fat32 Offline OP
Junior Member
fat32  Offline OP
Junior Member

Joined: Jul 2007
Posts: 69
ok
i want jump enemy to player how can this ?


dobidob hosein_dig and max_man7000 game

HAPPY NEW YEAR !!
Re: how can know my enemy where is my player for attack ? [Re: fat32] #217946
07/25/08 17:41
07/25/08 17:41
Joined: Oct 2003
Posts: 1,550
United Kingdom
indiGLOW Offline
Serious User
indiGLOW  Offline
Serious User

Joined: Oct 2003
Posts: 1,550
United Kingdom
Jump, as in 'Teleport' could simply be handled with a ...

Code:
vec_set(you.x, my.x)


for more complex Ai type behaviours....erm do some more reading smile

There are a good chunk of threads on these forums that have pretty much copy and paste functionality to get up and running. Maybe widen your search?

Hope that was some help


The Art of Conversation is dead : Discuss

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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