PARTAGER SUR FACEBOOK    Commentaires des visiteurs
RETOUR INDEX     






Voici un petit tutoriel rapide qui vous explique les bases pour créer un script fpi. C'est un premier jet et il devrait évoluer par la suite. Pour vous aider vous pouvez recouper ces informations avec cet autre tutoriel en anglais ICI et le manuel FPS Creator en français ICI.

Comment lier un script fpi à une entité ?

- Faites un clic droit avec la souris sur l'entité. Apparaît alors la fiche de l'entité.

- Dans la section "Script IA" vous avez trois ligne qui se suivent : Commencer, Principal, Destruction et quelques lignes plus loin toujours dans la même section la ligne Tir.

- Sur la ligne "commencer" vous indiquez le chemin du script fpi qui sera exécuté quand l'entité apparaît (quand le moteur de fps creator déclenche l'apparition de l'entité)

- Sur la ligne "Principale" vous indiquez le chemin du script fpi qui est exécuté durant la "vie normale de l'entité". C'est dans ce script en générale que l'on programme les actions et les réactions de l'entité (marcher, ouverture de porte pour une porte, etc...)

- Sur la ligne "destruction" vous indiquez le script fpi qui sera exécuté quand l'entité est détruite. En générale utilisé à la mort d'un personnage après un shoot ou à la destruction d'un objet inanimé comme une caisse.

- Sur la ligne "Tir" vous indiquez le script qui sera déclenché si l'entité peut tirer évidemment. Ce programme contient les instruction qui définissent la réaction d'une entité quand elle tir sur le joueur.

Remarque importante : Le chemin que vous devez indiquer dans chacune de ces cases n'est pas le chemin absolu ayant pour racine votre disque dur mais le chemin ayant pour racine le répertoire où ce trouves les script. C'est le répertoire "scriptbank" qui se trouve dans le répertoire Files du répertoire d'installation de Fps Creator. Autrement dit si votre script fpi se trouve ici :

C:\Program Files\The Game Creator\Fps Creator\Files\scriptbank\user\monscript.fpi

Vous devrez indiquer comme chemin dans la fiche de l'entité :

user\monscript.fpi

Si pour selectionner le script depuis la fiche vous le faites à la souris en cliquant sur le fichier, certaine version de Fps Creator ont un bug et placent le chemin entier à partir de C: dans la case. Il faut donc dans ce cas effacer la partie du chemin qui ne sert à rien sinon lors de la compilation Fps Creator ne retrouvera pas ses petits.

Vous n'avez pas à vous occuper des liens internes du script fpi avec l'entité. Dit autrement si votre script comporte des fonctions qui permettent de faire bouger l'entité (pour un personnage par exemple), il n'y à pas besoin dans le script de programmer le lien entre la fonction et la partie de l'entité sur laquelle la fonction agit. Le programme applique automatiquement ces fonction à l'entité à laquelle est lié le script fpi. Il est possible de modifier ces liens mais cela ce fait dans un autre fichier (le fichier fpe lié à l'entité) qui définit l'entité. Ce n'est pas le but de ce tutoriel.

Le langage de scripting fpi : exemple et tutoriel

Vous pouvez éditer un script fpi dans n'importe quel éditeur de texte. Vous pouvez également utiliser Fpi Editpad qui est un éditeur adapté aux scripts fpi et fpe. Cliquez ici pour télécharger Fpi Editpad

Le langage de scripting fpi est un langage simple d'intelligence artificielle pour programmer les entités d'un jeu vidéo. La syntaxe est basique et repose sur le principe du If/Then (Si/Alors). On teste si certaines conditions sont remplies, si c'est la cas une action est déclanchée et on passe au test suivant. Chaque ligne de code d'un script fpi correspond à une ou plusieurs conditions qui, si elles sont vraies, déclenchent une ou plusieurs actions.

La syntaxe d'une ligne de code d'un script fpi est la suivante : La (les) condition(s) pour qu'une ou plusieurs actions soient déclanchées sont énumérées entre deux " : " et sont séparées par des virgules. On inscrit à la suite les actions à effectuer séparées aussi par des virgules. La ligne ne doit pas contenir de retour chariot sinon la suite est considérée comme une autre ligne d'instruction.

Structure d'une ligne de code :

:condition00,condition01,condition02,conditionN:action01,action02,action03,actionN

Dans un script fpi vous pouvez aussi inscrire de simples remarques "pense-bête" pour comprendre votre script si vous y revenez plus tard. Ces remarques ne sont pas exécutées par l'interpréteur de script de Fps Creator, vous pouvez en mettre autant que vous voulez. Une remarque tient sur une ligne et ne doit pas contenir de retour chariot. Elle commence par le signe ";"

;Ceci est une remarque

Voici un exemple complet de la syntaxe d'un script fpi. Ce script ne contient pas de vrais conditions ni de vraies actions. Il ne sert qu'à expliquer la structure de base d'un script et le passage d'une ligne de conditions/actions à une autre. Nous emploierons donc condition01,condition02,etc... et action01,action02,etc... Pour représenter les conditions et les actions. Nous verrons des actions plus concrètes un peu plus loin.

ligne 00          ;Artificial Intelligence Script
ligne 01
ligne 02          ;Header
ligne 03
ligne 04          desc = Description de ce que fait le script
ligne 05
ligne 06          ;Triggers
ligne 07
ligne 08          :state=0,condition00:action01,state=1
ligne 09          :state=1:action02,action03,action04,state=2
ligne 10          :state=2,condition01,condition02:action05,action06,action07,state=3
ligne 11          :state=3,condition03:action08
ligne 12
ligne 13          ;End of Script

- La ligne 00 est un commentaire qui déclare que ce script est un script d'intelligence artificielle

- La ligne 02 déclare l'entête du script

- La ligne 04 (ce n'est pas un commentaire) décrit brièvement ce qu'est censé faire ce script

- La ligne 06 indique que commence ici les lignes de conditions/actions du script

Remarque : Tout script fpi possède une variable interne nommée "state". Cette variable est une variable numérique et permet de passer d'un état du script à un autre. L'état de la variable "state" est toujours à zéro au commencement du script. Par contre cette valeur peut changer ensuite selon le vouloir du programmeur. En générale pour que le programme soit plus clair on utilise des valeurs qui se suivent pour la variable "state".

Si on inscrit state=2 dans la partie des conditions alors state=2 signifie "est-ce que la variable state est égale à 2 ?".

Si on inscrit state=2 dans la partie de la ligne correspondant aux actions alors state=2 dans ce cas signifie "la variable state contient à présent la valeur 2". C'est une affectation.

Ceci étant dit passons à l'explication des autres lignes du programme d'exemple :

- La ligne 08. Nous avons comme conditions (entre les " : " donc) state=0,condition00 . Cela signifie que si le script est à l'état 0 et que la condition00 est vraie, alors on peut exécuter les actions situées après les " : " soit action01,state=1.
L'interpeteur exécute donc dans l'odre action01 (voir la liste des actions possible à la fin de la page) et state=1 indique que l'étape globale du script passe à 1.

- La ligne 09. Ici on ne teste qu'une seule condition : state=1. On pose en fait la question "est-ce que state contient la valeur 1 ? La réponse est oui puisqu'à la ligne précédent nous avons écrit dans les actions state=1 (nous avons affecté la valeur 1 à la variable globale state). Cette condition étant vraie l'interpreteur peut exécuter les actions situées après les ":". Ici plusieurs actions sont réalisées : action02,action03,action04 suivie de state=2 (qui est donc une affectation de valeur puisque nous sommes dans la partie action). Vous avez compris le truc pour passer d'une étape à une autre : dans une ligne on affecte une valeur à state dans la partie action. On teste dans une ligne suivante si cette valeur est bien celle que l'on a affectée ce qui permet de déterminer si on passe à une étape suivante ou non.

- La ligne 10. Ici nous testons donc si state contient bien la valeur déclarée à la ligne précédente (2). C'est le cas et l'interpréteur de script sait donc que nous nous trouvons à cette étape. Mais cela ne suffit pas pour effectuer les actions : il faut également que condition01 et condition02 soient vraies. Si une seul de ces conditions (y compris state=2) est fausse alors le script reste en attente jusqu'à ce que toutes les conditions soient vraies. Si elles sont totues vraies on exécute les actions et on passe la variable globale à 3 (state=3)

- La ligne 11. Si la variable globale state est bien égale à 3 et que la condition03 est vraie alors on exécute l'action08. Ici on n'affecte pas de nouvelle valeur à state car c'est la fin du script.

Remarque : Il est possible de faire boucler un script ; il suffit pour cela qu'à la dernière étape on affecte à la variable state une valeur correspondant à une ligne précédente. Si par exemple à la ligne 11 on avait écrit

:state=3,condition03:action08,state=1

Une fois cette ligne exécutée, l'interpréteur de script reprend le programme quand state=1 soit à la ligne 09. Le programme dans ce cas boucle sans arrêt entre la ligne 09 et la ligne 11. Ceci peut être utilisé par exemple sur un personnage qui doit toujours faire les mêmes gestes et les mêmes actions de manière répétitive.

- La ligne 13. Indique que la partie conditions/actions du script est terminée.

Vous connaissez à présent la syntaxe et la structure basique d'un script fpi. A partir de ce modèle il est possible de faire des scripts plus complexes simulant des boucles. On peut également déclarer plusieurs lignes d'actions pour une seule étape afin de simuler pour une même étape des actions différentes selon les conditions. Par exemple :

ligne 00           :state=0:state=1
ligne 01
ligne 02           :state=1,condition00:action00,state=2
ligne 03           :state=1,condition02:action02,state=2
ligne 04           :state=1,condition03:action03,state=2
ligne 05
ligne 06           :state=2:action04

Dans cet exemple la variable globale du script (l'étape courante donc) passe à "1" à la ligne 00. Ensuite toutes les ligne on pour condition que l'étape courante soit "1" (state=1). Nous simulons donc un système de choix : le script est en attente à l'étape 1 et selon que la condtion00 ou la condition02 ou la condition03 soit vrai, ce sera respectivement l'action00 ou l'action02 ou l'action03 qui sera déclenchée. Par contre quelle que soit l'action déclenchée, le script finit par arriver à l'étape 2 et exécuter l'action04 puisque chacune des trois possibilités d'action est ensuite suivie de state=2 ce qui passe l'étape courante à 2.

Voilà les bases de la structure d'un script fpi. Il est possible de faire des scripts beaucoup plus complexes mais tous parts de ces notions de base que l'on combinera pour obtenir des résultats plus étoffés.

Maintenant que les bases sont définies. Voici un exemple concret utilisant de vraies actions :

ligne 00           :state=0:hudreset,hudx=50,hudy=90,hudimagefine=languagebank\montexte.tga,hudname=monhud,hudhide=1,hudmake=display,state=1
ligne 01           :state=1,plrdistwithin=600:hudshow=monhud,timerstart,state=2
ligne 02           :state=2,timergreater=15000:plrsound=languagebank\monson.wav,hudfadeout=monhud

L'entête du script et la fin de script ont été délibérément omis pour plus de clarté. Ce fichier si il est placé dans la case "Principale" de la fiche d'une entité (un objet, une caisse, une lampe, etc...) agit de la sorte :

si le joueur s'approche à moins de 600 unités de distance de l'objet, alors un texte apparaît à l'écran par dessus le jeu et s'affiche pendant 15000 unités de temps (millisecondes). Puis ce texte disparaît et un son est émis.

- Ligne 00 :

:state=0: On teste si l'étape courante du script est 0. C'est vrai puisque le script vient juste de débuter. Les actions s'exécutent :

hudreset Initialisation du Hud (hud c'est les éventuels textes et décorations qui peuvent apparaître par dessus le jeu. Un dialogue, les icônes de santé, de munitions, etc...)

hudx=50,hudy=90 L'image du hud sera positionné sur l'écran à 50 unités en x et 90 en y.

hudimagefine=languagebank\montexte.tga Le chemin de l'image à afficher au format tga. La racine de référence est le répertoire Files de fps creator donc si le fichier est sur votre disque dans C:\Program Files\The game creator\fps creator\Files\languagebank\montexte.tga vous devez indiquer seulement languagebank\montexte.tga.

hudname=monhud Les actions précédentes définissent l'élément à afficher. Cette dernière commande donne un nom à cette configuration. Notre image à afficher sera donc connue à partir de cette ligne sous le nom de "monhud" dans le reste du programme. Cela évite de redéfinir à chaque fois la position en x et y etc...

hudhide=1 Quand le script commence le hud "monhud" est invisible au départ. Il existe bien mais il est masqué à l'écran.

hudmake=display le hud est activé (attention activé ne veut pas dire visible ! Disons que le hud est en attente prêt à être utilisé)

state=1 la variable globale "state" passe à 1 ce qui permet de passer à l'étape suivante.

- Ligne 01 :

:state=1,plrdistwithin=600: Des actions vont être déclenchées si l'étape courante est l'étape 1 (ce qui est vrai puisque l'étape a été activée à la ligne précédente) et si le joueur se trouve à moins de 600 unités de l'entité ayant ce script en script principal. Autrement dit quoi qu'il arrive le programme reste à l'étape state=1 sans rien faire tant que le joueur ne s'approche pas de l'objet. Dès que le joueur arrive à moins de 600 unités de l'objet alors les deux conditions sont vraies et seulement à cet instant les actions de la ligne sont exécutées.

hudshow=monhud On affiche réellement à l'écran le hud que l'on a définit dans la ligne précédente

timerstart Un timer (une minuterie si vous préférez) se met en marche et égrène les millisecondes à partir de zéro.

state=2 on passe ensuite la variable globale à 2 pour passer à l'étape suivante.

- Ligne 02 :

:state=2,timergreater=15000: state=2 vérifie que l'on se trouve à l'étape 2 mais les actions ne se déclencheront pas temps que la minuterie lancée à la ligne précédente n'arrive pas à 15000 millisecondes (timergreater=15000) Quand les 15000 millisecondes se sont écoulées alors les deux conditions sont vraies et les actions correspondantes peuvent être exécutées.

plrsound=languagebank\monson.wav Un son est joué. Le son doit être au format wav. La racine du chemin où se trouve le fichier est le répertoire Files. Donc comme il est expliqué précédemment si votre fichier se trouve dans c:\Program Files\The game creator\fps creator\Files\languagebank\monson.wav écrire simplement languagebank\monson.wav
Remarque : les sons au format wav doivent être codés sur 16 bits à un taux d'échantillonage de 22 KHz

hudfadeout=monhud l'image du texte affiché à l'écran que l'on a définit sous le nom de "monhud" à la première ligne de code disparaît dans un fondu. L'exécution du script est terminée.

Remarque : ce script s'exécute une seule fois. Si vous vous éloignez de l'objet est que vous revenez il ne fonctionnera plus. Si vous voulez qu'il s'exécute à tous les coups il suffit de le faire boucler en ajoutant à la dernière ligne de code "state=0"

Voilà pour un programme de départ. Ce n'est pas le must et il peut être grandement amélioré mais c'est une base d'apprentissage pour comprendre le fonctionnement d'une script fpi.

Actions et conditions possibles dans un script fpi :

Désolé pour les descriptions en anglais, traduction à venir... Vous pouvez trouver cette liste en français dans le manuel Fps Creator français

 

Liste des conditions

NEVER is never true

ALWAYS is always true

STATE=X is true when it's value stored in the current FPI script is equal to X

RANDOM=X is true when a random value between 0 and X is equal to one

HEALTH=X is true when health equals X

HEALTHLESS=X is true when the health is less than X

QUANTITY=X is true when quantity is equal to X

SPEED=X is true when speed is equal to X

PLAYERASSOCIATED is true when entity has been associated with player (lift)

PLRDISTWITHIN=X is true when player is within X units

PLRDISTFURTHER=X is true when player is further than X units

PLRALIVE=X is true when player is alive and X is one

PLRHIGHER=X is true when player is X units higher than entity

PLRELEVWITHIN=X is true when player can be seen within X degrees vertical

PLRELEVFURTHER=X is true when player cannot be seen X degrees vertical

ANYWITHIN=X is true when any other entity moves within X quarter tiles

ANYFURTHER=X is true when no within X quarter tiles

PLRCANBESEEN=X returns TRUE, if the player can be seen by the entity, where =X will provide additional vertical angle of sight data. If no =X is used, the default value is =22

PLRCANNOTBESEEN is true when player cannot be seen

PLRHASKEY=X is true when player has pressed the key denoted by the value X

PLRUSINGACTION=X is true when player performs the USE action

SHOTDAMAGE=X is true when damage taken exceeds the value X

IFWEAPON=X is true when the weapon being used by entity is ready and X is one

ACTIVATED=X is true when the activation value of the entity equals X

PLRWITHINZONE is true when player is within the trigger zone

ENTITYWITHINZONE is true when an entity is within the trigger zone

PLRINGUNSIGHT=X is true when an entity has the player is gun sights

NEARACTIVATABLE=X is true when entity is being near activated

NEWWEAPONCANBESEEN=X is true when the entity can see a better weapon

NOISEHEARD=X is true when the entity hears a broadcast noise from scene

RAYCAST=X Y is true when the raycast hits something in front from X to Y units

RAYCASTUP=X is true when the raycast hits something above from X to Y units

RAYCASTBACK=X is true when the raycast hits something back from X to Y units

FRAMEATEND=X is true when animation X is at an end

FRAMEATSTART=X is true when animation X is at the beginning

FRAMEWITHIN=X Y is true when animation X is within frame Y

FRAMEBEYOND=X Y is true when animation X is beyond frame Y

ANIMATIONOVER=X is true when animation X is complete

ALPHAFADEEQUAL=X is true when the alpha value equals X

REACHTARGET=X is true when the entity has reached its target

LOSETARGET=X is true when the entity has got stuck after X attempts

HEADANGLEGREATER=X is true when the angle of the head is greater than X

HEADANGLELESS=X is true when the angle of the head is less than X

WAYPOINTSTATE=X is true when the waypoint state value equals X

State 0 means the entity has not yet started following waypoints
State 1 means the entity is looking for the nearest waypoint marker to start from
State 2 means the entity is following a waypoint line to its current waypoint marker
State 3 means the entity has reached the waypoint marker and needs to decide what to do
State 4 means the entity has reached the waypoint marker and it splits off in more than one other direction
State 5 means the entity has reached the very end of the current waypoint structure and requires a decision to be made
(A state of 999 means the entity has been placed in zero-waypoint mode where the entity simply ignores waypoints)

IFMARKER=X is true when there is a marker previously dropped by entity in scene

IFPLRTRAIL=X is true when there is a trail left by the player in existence

HUDSELECTIONMADE=X is true when the user has clicked HUD button X

TIMERGREATER=X is true when the internal FPI timer exceeds X in milliseconds

ESCAPEKEYPRESSED=X is true when the Escape Key has been pressed

PLRHEALTHLESS=X is true when the players health falls below X

PLRHEALTHGREATER=X is true when the players health is greater than X

ANYWITHIN=X is true when any entity is closer than X to it

ANYFURTHER=X is true when any entity is further than X from it

CANTAKE is true if the entity can be collected by player

ANYWITHINZONE is true when any entity is within its zone

NORAYCASTUP=X Y is true when no collision upwards X to Y

HUDEDITDONE=X is true when ‘editable’ HUD item X is used

HUDHAVENAME is true when no player-name has been entered

LEVELEQUAL=X where X is level

LEVELNOTEQUAL=X where X is level

SCANCODEKEYPRESSED=X is true when X=the key code of a pressed key   ***Added by V1.03

Example: SCANCODEKEYPRESSED=15 is true when the TAB key is pressed


Liste des actions

NONE no action

DESTROY destroy entity

SUSPEND disable the entity permanently, and keep it visible

RUNFPIDEFAULT=X run a default FPI script by value X (0-init,1-main,2-end)

RUNFPI=X run another FPI script by name X(ie appear1.fpi)

STATE=X sets the value of the internal variable State to X

MOVEUP=X moves the entity up by X units

MOVEFORE=X moves the entity forward by X units

MOVEBACK=X move the entity back by X units

FREEZE=X stop entity from moving

ROTATEY=X set the entity angle around the Y axis for X degrees

ROTATEIY=X rotate the entity around the Y axis incrementally for X degrees

ROTATETOPLR rotate the entity to face the player

RESETHEAD reset the angle of the head if the entity has one

ROTATEHEAD=X rotate the head of the entity by X degrees

ROTATEHEADRANDOM=X rotate the head of the entity at random by X degrees

FORCEBACK=X apply a force to the entity by a factor of X backwards

FORCEFORE=X apply a force to the entity by a factor of X forwards

FORCELEFT=X apply a force to the entity by a factor of X left

FORCERIGHT=X apply a force to the entity by a factor of X right

FORCEBOUNCE=X apply a force to the entity to cause it to bounce back by X

SPINRATE=X spin the entity around the Y axis at a rate of X

FLOATRATE=X cause the entity to float in the air at a hover rate of X

SETFRAME=X set animation X start frame

INCFRAME=X increment another frame in animation X

DECFRAME=X decrement another frame in animation X

ANIMATE=X automatically play animation X

           In regards to characters provided, there are a number of animations built in which can be played.  The following table provides the Animation number and the start and end frame for each.

No. Animation Start End
0 = Spawn 190, 209
1 = Idle 210, 234
2 = Move Slow 235, 259
3 = Strafe Left 260, 279
4 = Strafe Right 280, 299
5 = Move Fast 300, 318
6 = Reload Weapon (or Toss) 319, 355
10 = Climb 160, 189
11 = Impact Front 0, 19
12 = Bounce Front 20, 39
13 = Get Up Front 522, 593
14 = Impact Back 40, 59
15 = Bounce Back 60,  79
16 = Get Up Back 523,  552
17 = Impact Left 120,  139
18 = Bounce Left 140,  159
20 = Impact Right 80,  99
21 = Bounce Right 100,  119
31 = Crouched Idle 356,  380
32 = Crouched Move Slow (same) 381,  405
33 = Crouched Strafe Left (same) 381,  405
34 = Crouched Strafe Right (same) 381,  405
35 = Crouched Move Fast (same) 381,  405
36 = Crouched Reload Weapon (or toss) 406,  442
40 = Freeform Idle 433,  462
41 = Freeform Move 463,  492
50 = Weapon Spawn 533,  572
51 = Weapon Idle 573,  597
52 = Weapon Move Slow 598,  622
53 = Weapon Strafe Left 623,  642
54 = Weapon Strafe Right 643,  662
55 = Weapon Move Fast 663,  681
56 = Weapon Reload Weapon (or Toss) 682,  731
57 = Weapon NEW Climb 160,  189
61 = Weapon Impact Front 0,  19
62 = Weapon Bounce Front 20,  39
63 = Weapon Get Up Front 822,  911
64 = Weapon Impact Back 40,  59
65 = Weapon Bounce Back 60,  79
66 = Weapon Get Up Back 912,  941
67 = Weapon Impact Left 120,  139
68 = Weapon Bounce Left 140,  159
70 = Weapon Impact Right 80,  99
71 = Weapon Bounce Right 100,  119
81 = Weapon Crouched Idle 732,  756
82 = Weapon Crouched Move Slow (same) 757,  781
83 = Weapon Crouched Strafe Left (same) 757,  781
84 = Weapon Crouched Strafe Right (same) 757,  781
85 = Weapon Crouched Move Fast (same) 757,  781
86 = Weapon Crouched Reload Weapon (or toss) 782,  831
90 = Weapon Freeform Idle 832,  851
91 = Weapon Freeform Move 852,  881
FPE fields and code to support arbitary footfall keyframes

FOOTFALLMAX = X
FOOTFALL0 = X
FOOTFALL1 = X


ASSOCIATEPLAYER associate this entity with the player (lift)

UNASSOCIATEPLAYER disassociate this entity from the player

PLRMOVEUP=X move the player up by X units

PLRMOVEDOWN=X move the player up by X units

PLRMOVEEAST=X move the player east by X units

PLRMOVEWEST=X move the player west by X units

PLRMOVENORTH=X move the player north by X units

PLRMOVESOUTH=X move the player south by X units

PLRMOVETO=X move the player to a new location described by entity name X

PLRMOVEIFUSED=X if player performs the USE action, move the player as above

ACTIVATEIFUSED=X activate entity described in IFUSED property

ACTIVATEIFUSEDNEAR=X activate entity described in IFUSED and near it

ACTIVATETARGET=X activates the entity previously marked as the target with X

ACTIVATE=X activate this entity using the value X

ACTIVATEALLINZONE=X activate all the entities within the trigger zone with X

PLRADDHEALTH=X adds X points to the players health

SETTARGET sets the internal target for the entity, follows ‘target’ conditions

ROTATETOTARGET rotate the entity to face the target

LOOKATTARGET rotate the head of the entity to face the target

MOVETOTARGET moves to the target

COLLECTTARGET if the target is a collectable, collect the target if close

SETTARGETNAME Specify an entity name to force the entity using the action to target the named entity

CHOOSESTRAFE randomly selects a strafe direction (ie left/right/forward)

STRAFE perform the previously chosen strafe to avoid player shots

PIVOTRANDOM=X randomly pivots around to face another direction by X degrees

LOOKATPLR=X look directly at the player even if the player cannot be seen

SOUND=X plays a sound specified by the X filename. Use $0 to specify soundest

PLRSOUND=X plays a 3d sound at the player's current position, the sound file is specified by=X

LOOPSOUND=X loops a 3D sound specified by the X filename

STOPSOUND stops playing the currently looping sound

ALTTEXTURE=X set the texture used based on X being either zero or one

SETALPHAFADE=X set the alpha value to X which causes entity transparency

INCALPHAFADE=X increment the alpha fade, X being the destination

DECALPHAFADE=X decrement the alpha fade, X being the destination

RUNDECAL=X create a decal from the entity, X being a specific mode 1-6

WAYPOINTSTART instructs the entity to find the closest waypoint

WAYPOINTSTOP stops the entity following waypoints

WAYPOINTREVERSE makes the entity reverse course and go the other way

WAYPOINTNEXT instructs the entity to find the next waypoint

WAYPOINTPREV instructs the entity to find the previous waypoint

WAYPOINTRANDOM instructs the entity choose a random waypoint direction

DROPMARKER drops a marker the entity can later return to

NEXTMARKER instructs the entity to go to the last dropped marker

RESETMARKERS resets all markers dropped by this entity

FOLLOWPLR follows the players trail if one exists

PLAYERTAKE used to add an entity to the players inventory and acquire its assets

PLAYERDROP used to drop an item from the players inventory

SHOOTPLR runs the internal FPI script SHOOT specified in character properties

USEWEAPON fires any weapon held by an entity in the direction of the target

RELOADWEAPON reloads the weapon from the entities stock of infinite ammo

COLOFF deactivate all player collision with this entity

COLON activate all player collision with this entity

ACTIVATE=X sets the activation value of the entity to X

AMBIENCE=X sets the overall ambient light level within the scene to X

AMBIENCERED=X sets the red component of the ambient light to X

AMBIENCEGREEN=X sets the green component of the ambient light to X

AMBIENCEBLUE=X sets the blue component of the ambient light to X

FOG=X sets the fog mode within the scene when X is one

FOGRED=X sets the red component of the fog to X

FOGGREEN=X sets the green component of the fog to X

FOGBLUE=X sets the blue component of the fog to X

SKY=X sets the skybox to the sky model specified by X filename

SKYSCROLL=X sets the sky scroll texture to the file specified by X filename

BACKDROP=X loads and pastes the screen backdrop using X filename

MUSIC=X loads and plays the WAV using X filename

MUSICVOLUME=X sets the music volume in the range of 80-100

LIGHTON=X lighton

LIGHTOFF=X lightoff

LIGHTRED=X lightred

LIGHTGREEN=X lightgreen

LIGHTBLUE=X lightblue

LIGHTRANGE=X lightrange

HUDRESET=X call this to reset the HUD creation system

HUDX=X sets the X position percentage of where you want your HUD item to be

HUDY=X sets the Y position percentage of where you want your HUD item to be

HUDZ=X sets the Z position percentage of where you want your HUD item to be

HUDSIZEX=X sets the X size of your HUD item 90

HUDSIZEY=X sets the Y size of your HUD item

HUDSIZEZ=X sets the X size of your HUD item

HUDRED=X sets the red component of your HUD item

HUDGREEN=X sets the green component of your HUD item

HUDBLUE=X sets the blue component of your HUD item

HUDIMAGE=X sets the image filename of your HUD item

HUDFONT=X sets the font name of your HUD item

HUDSIZE=X sets the font size of your HUD item

HUDTEXT=X sets the text that will be used in place of no image of the HUD item

HUDTYPE=X set the HUD type (1-lives,2-health,3-weapon)

HUDHIDE=X set X to the name of the HUD item to hide it

HUDSHOW=X set X to the name of the HUD item to reveal it

HUDUNSHOW=X set X to the name of the HUD item to un-hide it

HUDNAME=X set the name of the HUD item you are creating

HUDANIM=X set the filename X of the animation sequence (exclude #.TGA)

HUDMAKE=X when all HUD items set, use this action to finally create the HUD

NEWGAME=X trigger the running of a new game (typically from title page)

LOADGAME=X trigger the loading of a saved game

SAVEGAME=X trigger the saving of a current game

CONTINUEGAME=X continue game action issued to move onto the next page

QUITGAME=X trigger the current game to quit back to the title page

PAUSEGAME=X trigger the game to pause, and typically enter the game menu

RESUMEGAME=X trigger the game to resume, after previously being paused

TIMERSTART reset the FPI script timer to zero, allowing timing to take place 

FLOORLOGIC=X if X is one, entity never leaves its Y position

INCSTATE=X increments the state variable by X

RUNFORE makes the entity move forward at a run

ADVFRAME=X advances the animation by X percent

SHAPEDECAL=X changes the decal mode to X for the entity

TRIGGERFORCE=X applies a force to the entity by a magnitude of X

SOUNDSCALE=X changes the 3D sound scale by percentage X

HUDIMAGEFINE=X loads the image for the HUD using high quality

HUDFADEOUT causes the HUD item to fade from the screen

HOSTGAME triggers a multiplayer game to be HOSTED

JOINGAME triggers a multiplayer game to be JOINED

REPEATGAME triggers a multiplayer game to repeat play

NOGRAVITY Switches off gravity for physics entity

ACTIVEALLINZONE Activates everything within entity zone

SPAWNON Switches on entity’s ability to spawn

SPAWNOFF Switcjes off entities ability to spawn

VIDEO=X Plays an animation file full screen once

RAISEFACTOR=X where X is the number of units to raise an entity

HEADSHOT=X where 0 is immune and any other value equals headshot height

HEADSHOTDAMAGE=X sets the headshot damage to X health points

NOROTATE=X If X is NOT zero then this will prevent the entity from rotating and lock it in position

STOPSOUND Will stop any looping sound currently being played by the entity. (Does not work for MUSIC)

PLRFREEZE=X freezes the player for X milliseconds

MUSICOVERRIDE=X replaces in-game music in real time

GLOBALVAR=X set the current global variable index to write/read from to X

LOCALVAR=X set the current local variable index to wrire/read from to X

SETVAR=X -et the value of the current variable to X

INCVAR=X increases the value of the current variable by X

DECVAR=X decreases the value of the current variable by X

VAREQUAL=X returns true if the current variable equals X

VARNOTEQUAL=X returns true if the current variable does not equal X

VARGREATER=X returns true if the current variable is greater than X

VARLESS=X returns true if the current variable is less than X

NEWJUMPHEIGHT=X change the default jump height of the player to X (default 50)

LIGHTINTENSITY=X change the intensity of a dynamic light to new percentage

RAISEFACTOR=X allows model to be raised by X to correct model alignments

PLRSETHEALTH=X sets players health to the value of X

PLRSUBHEALTH=X subtracts from players health by the value of X

ADDHEALTH=X increases entities health by the value of X

SUBHEALTH=X decrease entities health value by the value of X

SETHEALTH=X sets entities health to the value of X

PLRDISABLE=X freezes player and disables all controls for X milliseconds


 

 


| Annuaires ref | Ressources Fps Creator | Manuel Fps creator | Tutoriels script fpi en anglais | Tutoriel script Fpi en français




jeu-gratuit-du-net

Ce site est listé dans la catégorie Jeux vidéo : Jeux vidéo d'aventure de l'annuaire Formation referencement Google Local et Définitions Dicodunet jeux video 2000 annuaire annuaire gratuit Annuaire Webmaster

creation site - referencement - annuaires - jeux pc -  - Jeux - google - referencement - Annuaire généraliste - Jeux vidéo - Jeux PC