Cliquez pour la Version Française



Dragons And Castles 2010

Note par Laurent Cancé Francis.

né le 10 août 1975.

(+33) (0)6.72.97.79.56




   ...Previous

Additionnal objects (TAG) with scripts:

# opening of a door

# changing state of an object from position 1 to position 2 by action

INIT : SET POS1

INIT : SET BLOCKING

CASE POS1 ACTION : ANIM POS2

CASE POS1 ACTION : SET NONBLOCKING

CASE POS2 ACTION : ANIM POS1

CASE POS2 ACTION : SET BLOCKING

# key closed door

INIT : SET POS1

INIT : SET BLOCKING

CASE POS1 KEY ACTION : ANIM POS2

CASE POS1 KEY ACTION : SET NONBLOCKING

CASE POS2 ACTION : ANIM POS1

CASE POS2 ACTION : SET BLOCKING

# fix a light on an object

INIT : LIGHT TOP 1.0 0.8 0.3

# flags, animation

INIT : DYNAMIC ATTACHMENT

# flags, animation (exterior)

INIT : DYNAMIC ATTACHMENT WIND

# initializing a non player person

BOT (yohko) // player 1

BOT (yohko_blue) // player 2

BOT (goblin) // bot

# effect container on an object

EFFECT : TELEPORT

EFFECT : WIND LEAVES

EFFECT : WIND

EFFECT : SPIRITS

# object containing others

INIT : KEY

INIT : GOLD

INIT : GEM

etc.

# action on an object, end of level

CASE POS1 ACTION : SET ENDLEVEL

CASE POS1 ACTION : SET ENDLEVEL2

# incrementation of final state variables

CASE (cond) : INC FINAL

# condition on "FINAL" variable

CASE POS1 FINAL2 ACTION : SET NONBLOCKING

# script of a level : killing of a bot

# initialisation of the object TAG

BOT (goblinvert)

DEAD INC FINAL

DEAD ENDLEVEL

# action on an object to give thunder magical power

CASE GEM ACTION : THUNDER

# action on an object to give fireball magical power

CASE GEM ACTION : FIREBALL

ex:

CASE GEM_JAUNE GEM_BLEU : FIREBALL

dans defines.txt

OBJ:0

{

NAME="GEM_JAUNE"

MESH="data/3d/gemme_jaune.3d"

...

}

OBJ:1

{

NAME="GEM_BLEU"

MESH="data/3d/gemme_bleu.3d"

...

}

# trigger an animation (composite of the level or by operations on objects)

script TAG trigger:

TRIGGER

CASE NEAR : HIT_ADDED 33

CASE NEAR : HIT_ADDED 34

additionnals 33 and 34 are broken and fall by physic

# definition of configuration

multiusage NED file

objects can be scripted by using configuration file

[CONFIG0]

script configuration 0

[CONFIG1]

script configuration 1

..

[CONFIGX]

script configuration X

# hold of object by a non player bot

BAG GOLDKEY

ex:

BOT (mutant)

BAG GOLDKEY

   Next...