Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
3 registered members (AndrewAMD, Ayumi, NewbieZorro), 14,141 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 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 | 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