Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/06/23 11:29
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
7 registered members (fairtrader, Quad, miwok, Martin_HH, AndrewAMD, alibaba, dpn), 581 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
Page 2 of 4 1 2 3 4
Re: Monster Intelligence [Re: alibaba] #365501
03/27/11 11:02
03/27/11 11:02
Joined: Mar 2011
Posts: 28
Deutschland
Nog Offline OP
Newbie
Nog  Offline OP
Newbie

Joined: Mar 2011
Posts: 28
Deutschland
Thanks man great grin!



YIPIIE YAY YEY, SCHWEINEBACKR!!!
_________________________

Nog grin!
Re: Monster Intelligence [Re: Nog] #365503
03/27/11 11:08
03/27/11 11:08
Joined: Mar 2011
Posts: 28
Deutschland
Nog Offline OP
Newbie
Nog  Offline OP
Newbie

Joined: Mar 2011
Posts: 28
Deutschland
Ok i made that:

action enemy()
{
while (1)
{
c_trace(my, player, GLIDE | IGNORE_PASSABLE);
handle_gravity();
wait(1);
}
}

but then the error message: Empty pointer in enemy! appears, can you explain me why?



YIPIIE YAY YEY, SCHWEINEBACKR!!!
_________________________

Nog grin!
Re: Monster Intelligence [Re: Nog] #365504
03/27/11 11:16
03/27/11 11:16
Joined: May 2008
Posts: 2,113
NRW/Germany
alibaba Online
Expert
alibaba  Online
Expert

Joined: May 2008
Posts: 2,113
NRW/Germany
This is a matter of timing. Your enemy has to wait, until the player gets created.
while(!player)wait(1);
should do it.
Place it on the top of your code laugh

Last edited by alibaba; 03/27/11 11:18.

Professional Edition
A8.47.1
--------------------
http://www.yueklet.de
Re: Monster Intelligence [Re: Nog] #365505
03/27/11 11:18
03/27/11 11:18
Joined: May 2009
Posts: 5,367
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,367
Caucasus
Dude, if you can't make simple AI yourself, that just means that you aren't ready for it yet.
Learn more, workshops and manual, learn some basics first, then you'll be able to make something!
I did all I could, I pointed to very simple and easy to read (understand) script.
You don't need animations? Just rip them out! You don't need gravity? Don't using then! wink


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Monster Intelligence [Re: 3run] #365506
03/27/11 11:25
03/27/11 11:25
Joined: Mar 2011
Posts: 28
Deutschland
Nog Offline OP
Newbie
Nog  Offline OP
Newbie

Joined: Mar 2011
Posts: 28
Deutschland
I know that i need learn much more, but i just tried ^^



YIPIIE YAY YEY, SCHWEINEBACKR!!!
_________________________

Nog grin!
Re: Monster Intelligence [Re: Nog] #365507
03/27/11 11:25
03/27/11 11:25
Joined: Mar 2011
Posts: 28
Deutschland
Nog Offline OP
Newbie
Nog  Offline OP
Newbie

Joined: Mar 2011
Posts: 28
Deutschland
@alibaba, thanks i try it now.



YIPIIE YAY YEY, SCHWEINEBACKR!!!
_________________________

Nog grin!
Re: Monster Intelligence [Re: Nog] #365508
03/27/11 11:27
03/27/11 11:27
Joined: Mar 2011
Posts: 28
Deutschland
Nog Offline OP
Newbie
Nog  Offline OP
Newbie

Joined: Mar 2011
Posts: 28
Deutschland
So you mean that:

action enemy()
{
while(!player)wait(1);
{
c_trace(my, player, GLIDE | IGNORE_PASSABLE);
handle_gravity();
wait(1);
}
}

alibaba?



YIPIIE YAY YEY, SCHWEINEBACKR!!!
_________________________

Nog grin!
Re: Monster Intelligence [Re: Nog] #365509
03/27/11 11:34
03/27/11 11:34
Joined: Mar 2011
Posts: 28
Deutschland
Nog Offline OP
Newbie
Nog  Offline OP
Newbie

Joined: Mar 2011
Posts: 28
Deutschland
I know iam not good.



YIPIIE YAY YEY, SCHWEINEBACKR!!!
_________________________

Nog grin!
Re: Monster Intelligence [Re: Nog] #365511
03/27/11 11:37
03/27/11 11:37
Joined: Nov 2008
Posts: 946
T
the_clown Offline
User
the_clown  Offline
User
T

Joined: Nov 2008
Posts: 946
It should rather be:

Code:
action enemy()
{
  while(!player)
  wait(1);
 
  while(1)
  { 
    c_trace(my, player, GLIDE | IGNORE_PASSABLE); 
    handle_gravity();
    wait(1);
  }
}




So you have two loops: The first while loop waits until a player exist, then the second starts.

Re: Monster Intelligence [Re: the_clown] #365513
03/27/11 11:39
03/27/11 11:39
Joined: Mar 2011
Posts: 28
Deutschland
Nog Offline OP
Newbie
Nog  Offline OP
Newbie

Joined: Mar 2011
Posts: 28
Deutschland
Ah, i understand it now, the while(!player) wait(1); is for creating player right?



YIPIIE YAY YEY, SCHWEINEBACKR!!!
_________________________

Nog grin!
Page 2 of 4 1 2 3 4

Moderated by  HeelX, Spirit 

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