<?xml version="1.0" encoding="ISO-8859-1" ?>
<Game>
    <GDVersion Major="1" Minor="2" Build="7618" Revision="38274" />
    <Info>
        <Nom value="Intelligence artificielle basique" />
        <Auteur value="" />
        <WindowW value="800" />
        <WindowH value="600" />
        <Portable value="true" />
        <Extensions />
        <FPSmax value="60" />
        <FPSmin value="10" />
        <verticalSync value="false" />
        <Chargement>
            <Afficher value="true" />
            <Border value="true" />
            <Smooth value="true" />
            <Width value="170.000000" />
            <Height value="50.000000" />
            <TexteAfficher value="true" />
            <TexteXPos value="0.000000" />
            <TexteYPos value="5.000000" />
            <Texte value="Chargement" />
            <PourcentAfficher value="false" />
            <PourcentXPos value="0.000000" />
            <PourcentYPos value="0.000000" />
            <ImageAfficher value="false" />
            <Image value="" />
        </Chargement>
    </Info>
    <Images>
        <Image nom="bordure2.png" fichier="bordure2.png" lissage="true" />
        <Image nom="tank1" fichier="tankV1.png" lissage="true" />
        <Image nom="tank2" fichier="tankV2.png" lissage="true" />
        <Image nom="tank3" fichier="tankV3.png" lissage="true" />
        <Image nom="tank4" fichier="tankV4.png" lissage="true" />
        <Image nom="tank5" fichier="tankV5.png" lissage="true" />
        <Image nom="tank6" fichier="tankV6.png" lissage="true" />
        <Image nom="tank7" fichier="tankV7.png" lissage="true" />
        <Image nom="bordure.png" fichier="bordure.png" lissage="true" />
        <Image nom="Vue.png" fichier="Vue.png" lissage="true" />
        <Image nom="TankB1.png" fichier="TankB1.png" lissage="true" />
    </Images>
    <DossierImages />
    <Objects />
    <Scenes>
        <Scene nom="Nouvelle scène 1" r="0.000000" v="64.000000" b="0.000000" titre="">
            <Objets>
                <Objet nom="Perso">
                    <Animations>
                        <Animation typeNormal="false">
                            <Direction boucle="false" tempsEntre="1.000000">
                                <Sprites>
                                    <Sprite image="TankB1.png">
                                        <Points />
                                        <PointOrigine nom="origine" X="0.000000" Y="0.000000" />
                                        <PointCentre nom="centre" X="14.000000" Y="12.000000" automatic="true" />
                                    </Sprite>
                                </Sprites>
                            </Direction>
                        </Animation>
                    </Animations>
                </Objet>
                <Objet nom="Mur">
                    <Animations>
                        <Animation typeNormal="true">
                            <Direction boucle="false" tempsEntre="1.000000">
                                <Sprites>
                                    <Sprite image="bordure.png">
                                        <Points />
                                        <PointOrigine nom="origine" X="0.000000" Y="0.000000" />
                                        <PointCentre nom="centre" X="48.000000" Y="16.000000" automatic="true" />
                                    </Sprite>
                                </Sprites>
                            </Direction>
                            <Direction boucle="false" tempsEntre="1.000000">
                                <Sprites>
                                    <Sprite image="">
                                        <Points />
                                        <PointOrigine nom="origine" X="0.000000" Y="0.000000" />
                                        <PointCentre nom="centre" X="50.000000" Y="50.000000" automatic="true" />
                                    </Sprite>
                                </Sprites>
                            </Direction>
                            <Direction boucle="false" tempsEntre="1.000000">
                                <Sprites>
                                    <Sprite image="bordure2.png">
                                        <Points />
                                        <PointOrigine nom="origine" X="0.000000" Y="0.000000" />
                                        <PointCentre nom="centre" X="16.000000" Y="48.000000" automatic="true" />
                                    </Sprite>
                                </Sprites>
                            </Direction>
                        </Animation>
                    </Animations>
                </Objet>
                <Objet nom="IA">
                    <Animations>
                        <Animation typeNormal="false">
                            <Direction boucle="true" tempsEntre="0.150000">
                                <Sprites>
                                    <Sprite image="tank1">
                                        <Points />
                                        <PointOrigine nom="origine" X="0.000000" Y="0.000000" />
                                        <PointCentre nom="centre" X="14.000000" Y="12.000000" automatic="true" />
                                    </Sprite>
                                    <Sprite image="tank2">
                                        <Points />
                                        <PointOrigine nom="origine" X="0.000000" Y="0.000000" />
                                        <PointCentre nom="centre" X="14.000000" Y="12.000000" automatic="true" />
                                    </Sprite>
                                    <Sprite image="tank3">
                                        <Points />
                                        <PointOrigine nom="origine" X="0.000000" Y="0.000000" />
                                        <PointCentre nom="centre" X="14.000000" Y="12.000000" automatic="true" />
                                    </Sprite>
                                    <Sprite image="tank4">
                                        <Points />
                                        <PointOrigine nom="origine" X="0.000000" Y="0.000000" />
                                        <PointCentre nom="centre" X="14.000000" Y="12.000000" automatic="true" />
                                    </Sprite>
                                    <Sprite image="tank5">
                                        <Points />
                                        <PointOrigine nom="origine" X="0.000000" Y="0.000000" />
                                        <PointCentre nom="centre" X="14.000000" Y="12.000000" automatic="true" />
                                    </Sprite>
                                    <Sprite image="tank6">
                                        <Points />
                                        <PointOrigine nom="origine" X="0.000000" Y="0.000000" />
                                        <PointCentre nom="centre" X="14.000000" Y="12.000000" automatic="true" />
                                    </Sprite>
                                    <Sprite image="tank7">
                                        <Points />
                                        <PointOrigine nom="origine" X="0.000000" Y="0.000000" />
                                        <PointCentre nom="centre" X="14.000000" Y="12.000000" automatic="true" />
                                    </Sprite>
                                </Sprites>
                            </Direction>
                        </Animation>
                        <Animation typeNormal="false">
                            <Direction boucle="false" tempsEntre="1.000000">
                                <Sprites>
                                    <Sprite image="tank3">
                                        <Points />
                                        <PointOrigine nom="origine" X="0.000000" Y="0.000000" />
                                        <PointCentre nom="centre" X="14.000000" Y="12.000000" automatic="true" />
                                    </Sprite>
                                </Sprites>
                            </Direction>
                        </Animation>
                    </Animations>
                </Objet>
                <Objet nom="IAVue">
                    <Animations>
                        <Animation typeNormal="true">
                            <Direction boucle="false" tempsEntre="1.000000">
                                <Sprites>
                                    <Sprite image="Vue.png">
                                        <Points />
                                        <PointOrigine nom="origine" X="0.000000" Y="0.000000" />
                                        <PointCentre nom="centre" X="2.000000" Y="2.000000" automatic="true" />
                                    </Sprite>
                                </Sprites>
                            </Direction>
                        </Animation>
                    </Animations>
                </Objet>
                <Objet nom="Souris">
                    <Animations>
                        <Animation typeNormal="true">
                            <Direction boucle="false" tempsEntre="1.000000">
                                <Sprites>
                                    <Sprite image="Vue.png">
                                        <Points />
                                        <PointOrigine nom="origine" X="0.000000" Y="0.000000" />
                                        <PointCentre nom="centre" X="2.000000" Y="2.000000" automatic="true" />
                                    </Sprite>
                                </Sprites>
                            </Direction>
                        </Animation>
                    </Animations>
                </Objet>
            </Objets>
            <Layers>
                <Layer Name="" Visibility="true" />
            </Layers>
            <Positions>
                <Objet nom="Perso" x="272" y="83" direction="0" animation="0" plan="0" layer="" />
                <Objet nom="Mur" x="409" y="93" direction="2" animation="0" plan="0" layer="" />
                <Objet nom="Mur" x="409" y="255" direction="0" animation="0" plan="0" layer="" />
                <Objet nom="IA" x="548" y="57" direction="0" animation="0" plan="0" layer="" />
                <Objet nom="IA" x="545" y="220" direction="0" animation="0" plan="0" layer="" />
                <Objet nom="Mur" x="636" y="1" direction="2" animation="0" plan="0" layer="" />
                <Objet nom="Mur" x="409" y="1" direction="2" animation="0" plan="0" layer="" />
                <Objet nom="IA" x="107" y="44" direction="0" animation="0" plan="0" layer="" />
                <Objet nom="IA" x="111" y="101" direction="0" animation="0" plan="0" layer="" />
                <Objet nom="IA" x="109" y="188" direction="0" animation="0" plan="0" layer="" />
                <Objet nom="Mur" x="186" y="4" direction="2" animation="0" plan="0" layer="" />
                <Objet nom="Mur" x="186" y="98" direction="2" animation="0" plan="0" layer="" />
                <Objet nom="Mur" x="186" y="192" direction="2" animation="0" plan="0" layer="" />
                <Objet nom="Mur" x="636" y="95" direction="2" animation="0" plan="0" layer="" />
                <Objet nom="Mur" x="636" y="191" direction="2" animation="0" plan="0" layer="" />
                <Objet nom="Mur" x="501" y="255" direction="0" animation="0" plan="0" layer="" />
                <Objet nom="Mur" x="570" y="255" direction="0" animation="0" plan="0" layer="" />
                <Objet nom="Souris" x="312" y="81" direction="0" animation="0" plan="0" layer="" />
            </Positions>
            <Events>
                <Event>
                    <Type value="Commentaire" />
                    <Couleur r="0.000000" v="128.000000" b="255.000000" />
                    <Com1 value="Exemple pour Game Develop&#x0A;Intelligence Artificielle" />
                    <Com2 value="Déplacez vous avec les touches Q,S,D et Z.&#x0A;&#x0A;Si les ennemis vous voient, ils vous suivent." />
                </Event>
                <Event>
                    <Type value="AND" />
                    <Conditions>
                        <Condition>
                            <Type value="KeyPressed" loc="true" Contraire="false" />
                            <Parametre value="q" />
                        </Condition>
                    </Conditions>
                    <Actions>
                        <Action>
                            <Type value="AddForceXY" loc="true" />
                            <Parametre value="Perso" />
                            <Parametre value="-75" />
                            <Parametre value="0" />
                            <Parametre value="0" />
                        </Action>
                    </Actions>
                </Event>
                <Event>
                    <Type value="AND" />
                    <Conditions>
                        <Condition>
                            <Type value="KeyPressed" loc="true" Contraire="false" />
                            <Parametre value="d" />
                        </Condition>
                    </Conditions>
                    <Actions>
                        <Action>
                            <Type value="AddForceXY" loc="true" />
                            <Parametre value="Perso" />
                            <Parametre value="75" />
                            <Parametre value="0" />
                            <Parametre value="0" />
                        </Action>
                    </Actions>
                </Event>
                <Event>
                    <Type value="AND" />
                    <Conditions>
                        <Condition>
                            <Type value="KeyPressed" loc="true" Contraire="false" />
                            <Parametre value="z" />
                        </Condition>
                    </Conditions>
                    <Actions>
                        <Action>
                            <Type value="AddForceXY" loc="true" />
                            <Parametre value="Perso" />
                            <Parametre value="0" />
                            <Parametre value="-75" />
                            <Parametre value="0" />
                        </Action>
                    </Actions>
                </Event>
                <Event>
                    <Type value="AND" />
                    <Conditions>
                        <Condition>
                            <Type value="KeyPressed" loc="true" Contraire="false" />
                            <Parametre value="s" />
                        </Condition>
                    </Conditions>
                    <Actions>
                        <Action>
                            <Type value="AddForceXY" loc="true" />
                            <Parametre value="Perso" />
                            <Parametre value="0" />
                            <Parametre value="75" />
                            <Parametre value="0" />
                        </Action>
                    </Actions>
                </Event>
                <Event>
                    <Type value="Commentaire" />
                    <Couleur r="255.000000" v="128.000000" b="64.000000" />
                    <Com1 value="Initialisation de l&apos;identifiant" />
                    <Com2 value="Chaque ennemi a un identifiant pris au hasard" />
                </Event>
                <Event>
                    <Type value="AND" />
                    <Conditions>
                        <Condition>
                            <Type value="DepartScene" loc="true" Contraire="false" />
                        </Condition>
                    </Conditions>
                    <Actions>
                        <Action>
                            <Type value="ModVarObjet" loc="true" />
                            <Parametre value="IA" />
                            <Parametre value="Id" />
                            <Parametre value="VAL(random[10000])" />
                            <Parametre value="=" />
                        </Action>
                    </Actions>
                </Event>
                <Event>
                    <Type value="Commentaire" />
                    <Couleur r="255.000000" v="128.000000" b="64.000000" />
                    <Com1 value="Lancement de la vue" />
                    <Com2 value='Un objet IAVue est crée sur chaque objet IA, puis dirigé vers le joueur.&#x0A;L&apos;objet IAVue a l&apos;identifiant de son &quot;propriétaire&quot;.' />
                </Event>
                <Event>
                    <Type value="AND" />
                    <Conditions>
                        <Condition>
                            <Type value="SeDirige" loc="true" Contraire="true" />
                            <Parametre value="Perso" />
                            <Parametre value="IA" />
                            <Parametre value="45" />
                        </Condition>
                    </Conditions>
                    <Actions>
                        <Action>
                            <Type value="ModVarObjet" loc="true" />
                            <Parametre value="IA" />
                            <Parametre value="LanceVue" />
                            <Parametre value="VAL(random[5])" />
                            <Parametre value="+" />
                        </Action>
                    </Actions>
                </Event>
                <Event>
                    <Type value="AND" />
                    <Conditions>
                        <Condition>
                            <Type value="VarObjet" loc="true" Contraire="false" />
                            <Parametre value="IA" />
                            <Parametre value="LanceVue" />
                            <Parametre value="10" />
                            <Parametre value="&gt;=" />
                        </Condition>
                    </Conditions>
                    <Actions>
                        <Action>
                            <Type value="Create" loc="true" />
                            <Parametre value="IAVue" />
                            <Parametre value="OBJ(IA[x])" />
                            <Parametre value="OBJ(IA[y])" />
                        </Action>
                        <Action>
                            <Type value="AddForceVers" loc="true" />
                            <Parametre value="IAVue" />
                            <Parametre value="Perso" />
                            <Parametre value="400" />
                            <Parametre value="1" />
                        </Action>
                        <Action>
                            <Type value="ModVarObjet" loc="true" />
                            <Parametre value="IA" />
                            <Parametre value="LanceVue" />
                            <Parametre value="0" />
                            <Parametre value="=" />
                        </Action>
                        <Action>
                            <Type value="ModVarObjet" loc="true" />
                            <Parametre value="IAVue" />
                            <Parametre value="Id" />
                            <Parametre value="OBJ(IA[Id])" />
                            <Parametre value="=" />
                        </Action>
                    </Actions>
                </Event>
                <Event>
                    <Type value="Commentaire" />
                    <Couleur r="255.000000" v="128.000000" b="64.000000" />
                    <Com1 value="Joueur reperé par une vue" />
                    <Com2 value="Si un objet IAVue est en collision avec le joueur, on met le propriétaire de la vue en alerte" />
                </Event>
                <Event>
                    <Type value="AND" />
                    <Conditions>
                        <Condition>
                            <Type value="Collision" loc="true" Contraire="false" />
                            <Parametre value="Perso" />
                            <Parametre value="IAVue" />
                        </Condition>
                        <Condition>
                            <Type value="Sprite" loc="true" Contraire="false" />
                            <Parametre value="IA" />
                            <Parametre value="0" />
                            <Parametre value="&gt;=" />
                        </Condition>
                        <Condition>
                            <Type value="VarObjet" loc="true" Contraire="false" />
                            <Parametre value="IA" />
                            <Parametre value="Id" />
                            <Parametre value="OBJ(IAVue[Id])" />
                            <Parametre value="=" />
                        </Condition>
                    </Conditions>
                    <Actions>
                        <Action>
                            <Type value="ModVarObjet" loc="true" />
                            <Parametre value="IA" />
                            <Parametre value="Alerte" />
                            <Parametre value="1" />
                            <Parametre value="=" />
                        </Action>
                        <Action>
                            <Type value="Delete" loc="true" />
                            <Parametre value="IAVue" />
                        </Action>
                    </Actions>
                </Event>
                <Event>
                    <Type value="AND" />
                    <Conditions>
                        <Condition>
                            <Type value="VarObjet" loc="true" Contraire="false" />
                            <Parametre value="IA" />
                            <Parametre value="Alerte" />
                            <Parametre value="1" />
                            <Parametre value="=" />
                        </Condition>
                        <Condition>
                            <Type value="Sprite" loc="true" Contraire="false" />
                            <Parametre value="Perso" />
                            <Parametre value="0" />
                            <Parametre value="&gt;=" />
                        </Condition>
                    </Conditions>
                    <Actions>
                        <Action>
                            <Type value="AddForceVers" loc="true" />
                            <Parametre value="IA" />
                            <Parametre value="Perso" />
                            <Parametre value="50" />
                            <Parametre value="0" />
                        </Action>
                        <Action>
                            <Type value="TourneVers" loc="true" />
                            <Parametre value="IA" />
                            <Parametre value="Perso" />
                        </Action>
                    </Actions>
                </Event>
                <Event>
                    <Type value="Commentaire" />
                    <Couleur r="255.000000" v="128.000000" b="64.000000" />
                    <Com1 value="Arrêter une alerte" />
                    <Com2 value="Tous les 5 secondes, on arrête les ennemis." />
                </Event>
                <Event>
                    <Type value="AND" />
                    <Conditions>
                        <Condition>
                            <Type value="Timer" loc="true" Contraire="false" />
                            <Parametre value="5" />
                            <Parametre value="FinAlerte" />
                        </Condition>
                    </Conditions>
                    <Actions>
                        <Action>
                            <Type value="ModVarObjet" loc="true" />
                            <Parametre value="IA" />
                            <Parametre value="Alerte" />
                            <Parametre value="0" />
                            <Parametre value="=" />
                        </Action>
                        <Action>
                            <Type value="ResetTimer" loc="true" />
                            <Parametre value="FinAlerte" />
                        </Action>
                    </Actions>
                </Event>
                <Event>
                    <Type value="Commentaire" />
                    <Couleur r="255.000000" v="128.000000" b="64.000000" />
                    <Com1 value="Autre" />
                    <Com2 value='Cacher les &quot;vues&quot;, et les détruires' />
                </Event>
                <Event>
                    <Type value="AND" />
                    <Conditions>
                        <Condition>
                            <Type value="Collision" loc="true" Contraire="false" />
                            <Parametre value="Mur" />
                            <Parametre value="IAVue" />
                        </Condition>
                    </Conditions>
                    <Actions>
                        <Action>
                            <Type value="Delete" loc="true" />
                            <Parametre value="IAVue" />
                        </Action>
                    </Actions>
                </Event>
                <Event>
                    <Type value="OR" />
                    <Conditions>
                        <Condition>
                            <Type value="PosX" loc="true" Contraire="false" />
                            <Parametre value="IAVue" />
                            <Parametre value="-100" />
                            <Parametre value="&lt;" />
                        </Condition>
                        <Condition>
                            <Type value="PosX" loc="true" Contraire="false" />
                            <Parametre value="IAVue" />
                            <Parametre value="900" />
                            <Parametre value="&gt;" />
                        </Condition>
                        <Condition>
                            <Type value="PosY" loc="true" Contraire="false" />
                            <Parametre value="IAVue" />
                            <Parametre value="700" />
                            <Parametre value="&gt;" />
                        </Condition>
                        <Condition>
                            <Type value="PosY" loc="true" Contraire="false" />
                            <Parametre value="IAVue" />
                            <Parametre value="-100" />
                            <Parametre value="&lt;" />
                        </Condition>
                    </Conditions>
                    <Actions>
                        <Action>
                            <Type value="Delete" loc="true" />
                            <Parametre value="IAVue" />
                        </Action>
                    </Actions>
                </Event>
                <Event>
                    <Type value="AND" />
                    <Conditions>
                        <Condition>
                            <Type value="Collision" loc="true" Contraire="false" />
                            <Parametre value="IA" />
                            <Parametre value="Mur" />
                        </Condition>
                    </Conditions>
                    <Actions>
                        <Action>
                            <Type value="Rebondir" loc="true" />
                            <Parametre value="IA" />
                            <Parametre value="Mur" />
                        </Action>
                    </Actions>
                </Event>
                <Event>
                    <Type value="AND" />
                    <Conditions>
                        <Condition>
                            <Type value="Collision" loc="true" Contraire="false" />
                            <Parametre value="Perso" />
                            <Parametre value="Mur" />
                        </Condition>
                    </Conditions>
                    <Actions>
                        <Action>
                            <Type value="Rebondir" loc="true" />
                            <Parametre value="Perso" />
                            <Parametre value="Mur" />
                        </Action>
                    </Actions>
                </Event>
                <Event>
                    <Type value="Commentaire" />
                    <Couleur r="255.000000" v="128.000000" b="64.000000" />
                    <Com1 value="Animation" />
                    <Com2 value="Animation des ennemis" />
                </Event>
                <Event>
                    <Type value="AND" />
                    <Conditions>
                        <Condition>
                            <Type value="Arret" loc="true" Contraire="false" />
                            <Parametre value="IA" />
                        </Condition>
                    </Conditions>
                    <Actions>
                        <Action>
                            <Type value="ChangeAnimation" loc="true" />
                            <Parametre value="IA" />
                            <Parametre value="1" />
                            <Parametre value="=" />
                        </Action>
                    </Actions>
                </Event>
                <Event>
                    <Type value="AND" />
                    <Conditions>
                        <Condition>
                            <Type value="Arret" loc="true" Contraire="true" />
                            <Parametre value="IA" />
                        </Condition>
                    </Conditions>
                    <Actions>
                        <Action>
                            <Type value="ChangeAnimation" loc="true" />
                            <Parametre value="IA" />
                            <Parametre value="0" />
                            <Parametre value="=" />
                        </Action>
                    </Actions>
                </Event>
                <Event>
                    <Type value="AND" />
                    <Conditions>
                        <Condition>
                            <Type value="Toujours" loc="true" Contraire="false" />
                        </Condition>
                    </Conditions>
                    <Actions>
                        <Action>
                            <Type value="MettreX" loc="true" />
                            <Parametre value="Souris" />
                            <Parametre value="VAL(SourisX[])" />
                            <Parametre value="=" />
                        </Action>
                        <Action>
                            <Type value="MettreY" loc="true" />
                            <Parametre value="Souris" />
                            <Parametre value="VAL(SourisY[])" />
                            <Parametre value="=" />
                        </Action>
                        <Action>
                            <Type value="TourneVers" loc="true" />
                            <Parametre value="Perso" />
                            <Parametre value="Souris" />
                        </Action>
                        <Action>
                            <Type value="AddForceVers" loc="true" />
                            <Parametre value="IAVue" />
                            <Parametre value="Perso" />
                            <Parametre value="200" />
                            <Parametre value="0" />
                        </Action>
                    </Actions>
                </Event>
            </Events>
        </Scene>
    </Scenes>
</Game>
