Gamestudio Links
Zorro Links
Newest Posts
New FXCM FIX Plugin
by flink. 06/04/24 07:30
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
1 registered members (AndrewAMD), 1,225 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19056 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
AI follow #215504
07/11/08 17:08
07/11/08 17:08
Joined: May 2008
Posts: 55
K
KB_Alpha Offline OP
Junior Member
KB_Alpha  Offline OP
Junior Member
K

Joined: May 2008
Posts: 55
Are there any codes for AIs that follow you and shot enemys?If so i would like one for A7.

Re: AI follow [Re: KB_Alpha] #215521
07/11/08 19:46
07/11/08 19:46
Joined: Jan 2008
Posts: 1,580
Blade280891 Offline
Serious User
Blade280891  Offline
Serious User

Joined: Jan 2008
Posts: 1,580
look at the intense x thread


My Avatar Randomness V2

"Someone get me to the doctor, and someone call the nurse
And someone buy me roses, and someone burned the church"
Re: AI follow [Re: Blade280891] #215543
07/11/08 22:59
07/11/08 22:59
Joined: Apr 2005
Posts: 1,988
Canadian, Eh
DLively Offline
Serious User
DLively  Offline
Serious User

Joined: Apr 2005
Posts: 1,988
Canadian, Eh
here is a start...


Code:
action follow_player{
	
	my.shadow = on;
	while(1){wait(1);
		if(vec_dist(my.x, player.x) < 375){//if(player is 375 quants close to me...
			
			my.skill1 = 5 * time;// set to 0 to stop movement
			
			//watching the player
			vec_set(temp, player.x);
			vec_sub(temp, my.x);
			vec_to_angle(my.pan, temp);
			my.tilt = 0;//dont tilt me in the players direction...
			
		}
		c_move(me, my.skill1, nullvector, glide);
	}
}



have fun.


A8 Pro 8.45.4
YouTube: Create Games For Free
Free Resources: www.CGForFree.com
Re: AI follow [Re: Blade280891] #215551
07/12/08 00:24
07/12/08 00:24
Joined: Apr 2005
Posts: 1,988
Canadian, Eh
DLively Offline
Serious User
DLively  Offline
Serious User

Joined: Apr 2005
Posts: 1,988
Canadian, Eh
Here,


I tried to post this earlier, but it didnt seem to stay...

Code:

action follow_player{
	
	my.shadow = on;
	while(1){wait(1);
		if(vec_dist(my.x, player.x) < 375){//if(player is 375 quants close to me...
			
			my.skill1 = 5 * time;// set to 0 to stop movement
			
			//watching the player
			vec_set(temp, player.x);
			vec_sub(temp, my.x);
			vec_to_angle(my.pan, temp);
			my.tilt = 0;//dont tilt me in the players direction...
			
		}
		c_move(me, my.skill1, nullvector, glide);
	}
}




Its a start...
just add it to your script, attach it to an entity.


Hope it helps.



Devon.


A8 Pro 8.45.4
YouTube: Create Games For Free
Free Resources: www.CGForFree.com
Re: AI follow [Re: DLively] #215793
07/13/08 13:10
07/13/08 13:10
Joined: May 2008
Posts: 55
K
KB_Alpha Offline OP
Junior Member
KB_Alpha  Offline OP
Junior Member
K

Joined: May 2008
Posts: 55
thanks laugh


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