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
4 registered members (AndrewAMD, TipmyPip, NewbieZorro, Grant), 14,196 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
pls pls pls!!! AI FOR PLAYER'S RIVAL!! #353535
01/11/11 02:46
01/11/11 02:46
Joined: Sep 2010
Posts: 97
C
carla_mariz Offline OP
Junior Member
carla_mariz  Offline OP
Junior Member
C

Joined: Sep 2010
Posts: 97
how can i make a code for the players rival?
the opponent should be able to detect and take an entity that is already placed in wed.

help pls...........

Re: pls pls pls!!! AI FOR PLAYER'S RIVAL!! [Re: carla_mariz] #353626
01/11/11 21:20
01/11/11 21:20
Joined: Apr 2008
Posts: 650
Sajeth Offline
User
Sajeth  Offline
User

Joined: Apr 2008
Posts: 650
you code it in lite-c (or wdl if you use that)


Teleschrott-Fan.
Re: pls pls pls!!! AI FOR PLAYER'S RIVAL!! [Re: Sajeth] #353635
01/11/11 22:20
01/11/11 22:20
Joined: Sep 2010
Posts: 97
C
carla_mariz Offline OP
Junior Member
carla_mariz  Offline OP
Junior Member
C

Joined: Sep 2010
Posts: 97
i have a modified code here, taken from the aum76 the npc code.
i tried to put it to my character, did a little modification (but not sure).
i want the rival to detect an entities. but the code seems not to work. frown

Code:
action pacman2()
{
	VECTOR temp [3];
	set(my, PASSABLE);
	while(!player) { wait(1); }
	pac2_ready = 1;
	while (1)
	{
		c_scan(my.x, my.pan, vector(360, 30, 1000), SCAN_ENTS | SCAN_LIMIT);
		if(you)
		{
			target_coin = you;
			vec_set(temp, you.x);
			vec_sub(temp, my.x);
			vec_to_angle(my.pan, temp);
			while(vec_dist (my.x, you.x) > 30)
			{
				my.skill22 += 5* time_step;
				c_move(my, vector(5*time_step, 0, 0), nullvector, IGNORE_PASSABLE | GLIDE);
				ent_animate(my, "frame", my.skill22, ANM_CYCLE);
				wait(1);
		        }
	        }
	   wait(1);
       }
}



what could be the problem with this?
thanks. ^_____^


Moderated by  HeelX, Spirit 

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