Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 14:22
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
3 registered members (fairtrader, AndrewAMD, 3run), 576 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Goto Problem #164633
10/31/07 13:36
10/31/07 13:36
Joined: Jul 2007
Posts: 288
Germany, NRW
Martek Offline OP
Member
Martek  Offline OP
Member

Joined: Jul 2007
Posts: 288
Germany, NRW
Hi, at the moment I programm a AI. This I follows a path an on each edge it wait.
If the AI see the player it attack. But in the time, while it is wait at the
edge, it doesn't shoot on the player. I try this, but it don't work.
Code:
 		if(c_trace(my.x, player.x, ignore_me + ignore_passable) > vec_dist(my.x, player.x) - 50)
{
see_player:
vec_set(temp, player.x);
vec_sub(temp, my.x);
vec_to_angle(my.pan, temp);
my.tilt = 0;
my.roll = 0;

my.skill53 = 0;
my.take_shoot = 0;
my.skill52 = 0;
while(my.skill52 < 100)
{
ent_animate(me, "attack", my.skill52 , null);
my.skill52 += 8 * time_step;
//enemy_shoot();
wait(1);
}
while(my.skill53 < 100)
{
if(c_trace(my.x, player.x, ignore_me + ignore_passable) > vec_dist(my.x, player.x) - 50)
{
goto(see_player);
}
ent_animate(me, "stand", my.skill53, anm_cycle);
my.skill53 += 8*time_step;
wait(1);
}
}



Mfg, Pingulord

Last edited by Pingulord; 10/31/07 23:19.

3D Gamestudio A7 Extra
Re: Goto Problem [Re: Martek] #164634
11/01/07 13:18
11/01/07 13:18
Joined: Jul 2007
Posts: 288
Germany, NRW
Martek Offline OP
Member
Martek  Offline OP
Member

Joined: Jul 2007
Posts: 288
Germany, NRW
Ich hab es gelöst. Hatte die IF abfrage in der falschen while drin.

Mfg, Pingulord


3D Gamestudio A7 Extra
Re: Goto Problem [Re: Martek] #164635
11/03/07 20:23
11/03/07 20:23
Joined: Jan 2003
Posts: 4,615
Cambridge
Joey Offline
Expert
Joey  Offline
Expert

Joined: Jan 2003
Posts: 4,615
Cambridge
wie wärs eigentlich mit nem einfachen break; ?

Re: Goto Problem [Re: Joey] #164636
11/03/07 21:21
11/03/07 21:21
Joined: Jul 2007
Posts: 288
Germany, NRW
Martek Offline OP
Member
Martek  Offline OP
Member

Joined: Jul 2007
Posts: 288
Germany, NRW
Ich habe es zwar schon gelöst, aber das wäre auch eine Idee.
Vielen Dank


3D Gamestudio A7 Extra

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