Artificial Intelligence

I got this from the Basic AI example and it mostly works. The problem is that Sam_G1 is only activated if I actually run into it with the player. This led me to believe that the link between Sam and view was faulty or that setting the collision of view and player while linked to Sam was the problem. I tried unlinking the objects but this did nothing. I have not tried going without the collision because I can see no other way to determine the fact of being spotted by Sam_G1.

There is nothing more in the example so thought I would ask here while I try ideas and search for more examples. Thanks in advance for any help.

What is strange is that the link you’re creating here is absolutely useless… You need to use the other conditions/actions related to links if you want to get the object associated with another.

I agree and I stated in my post that I figured there was an issue with the idea of linking the objects. As I have pretty nearly duplicated the example which serves a tutorial we are brought full circle to the main issue of GameDevelop, it’s documentation in terms of the Wiki, tutorials, examples, etc are slim in detail.

I have looked up countless items for further study and find not much more than a definition of its name and a listing of what it is supposed to do but not much in the way of instruction on how to actually use anything. It is very frustrating at times. One would assume that a game example would be written correctly so as to allow for proper study and expanding of ideas.

I don’t understand the use of the linked object in this example. As it looks one would assume that the link is being used as a line of sight object since there is no other obvious LOS available in the “logic based editor”. Everytime I try to set up something simple it seems that I am missing some crucial part of the equation and without good documentation of the relationships of the processes available in the editor it is like trying to find your way through a thick, dark forest with only a pen light to find your way.

I will figure something out with this eventually, I guess I just wanted to finally say that the simple logic supposedly built into this editor is actually not so simple unless you are intimate with the thought process of the designer.

Personnally, to understand how a feature works, I look both into its actions and its conditions.
Here, you will notice there’s conditions related to linked objects. It’s those you must use to tell GD you want to manipulate an object from its linked counterpart, and bnot all the objects in the scene with the same name.

And, to be in the same side, when I link an object, I prefer to do this :
Create myObject
Create myObject2
–If myObject.isItLinked = 0 //I specifically select the object just created
-----if myObject2.isItLinked = 0 // I specifically select the object2 just created
-------link myObject with myObject2 // I can link the two together
-------set myObject.isItLinked to 1 // I set them so I won’t select them later if I create another myObject and myObject2
-------set myObject2.isItLinked to 1

Right on mtarzain,

I guess it will take me some time to figure out how some of this fits together. Just looking at the options available in conditions/actions does not in and of itself make the logical order of their use apparent. For example you start by setting up two “IF” statements as a way of selecting the objects to be selected. This does not seem logical since by default you are naming the instance of the objects to be linked by linking them. I guess what I am trying to say is that it seems we must circle the block three times to get across the street and without any material to describe relevant relationships of the conditions/actions it is quite difficult to piece it all together.

Tis all good though. I will continue to learn as I go but I am going to use much simpler mechanics to accomplish my goals. All I wanted to do was a simple alert system to the enemy that set it to chase the player. I simply set up a dummy perimeter a certain distance from the enemy and set the enemy to attack if the there was any collision with the perimeter by the player. this was much simpler both in setting up the code and from the point of view of a logical sequence of steps.