Project 6: Advanced Computer Graphics: C-Script Editing with SED

Reference for this project: Chapter 7 (Link to page of draft book chapter. )

Figure 1.  An extremely simple level.

Basic Output: Error messages

Figure 2.  Error message.

Adding Actions

Figure 3.  Player and fish added.

Adding Keyboard Controls and If Statements

Adding Functions and Triggers

Figure 3.  Player and second fish added.

Creating and Animating New Entities

var tw_walk_counter;
action tw_walk
    while(1) //start loop
    tw_walk_counter = tw_walk_counter + 1;     //add to walk counter
     //ent_frame("walk",tw_walk_counter);          //old style syntax, pre 6.31
    ent_animate(me,"walk",tw_walk_counter,ANM_CYCLE+ANM_ADD);  //new syntax
    if(tw_walk_counter >= 100)
        tw_walk_counter = 0;                                 // reset counter at 100 percent
var tw_mod_vector[3]=30,40,50;                             // where entity is located         
string mod_name = <animatedmodel1.mdl>;             //file name of fish entity
function tw_create_mod1() //called by pressing "p"
ent_create (mod_name, tw_mod_vector, tw_walk);    //create the fish entity
Figure 4.  Another model added from within script at corner.

Gravity and Collision Detection

Figure 5.  Two entities in front of player with one going through floor.

Report and demonstration:

Copyright © 2005- 2007 by Thomas Paul Weldon

ACKNEX, WED, MED, and 3D GameStudio are trademarks of Conitec Corporation.
Microsoft, DOS, MS-Dos, Windows, DirectX, Halo, and Direct3D are trademarks of Microsoft, Inc.

PAC-MAN trademarks or registered trademarks of Namco Limited
Nintendo, Mario, are trademarks of Nintendo
Atari, Pong, are trademarks of Atari
Intel, 8086, are trademarks of Intel Corporation
id, DOOM, and Quake are trademarks or registered trademarks of Id Software, Inc.
Autodesk, 3D Studio, and 3ds Max are trademarks or registered trademarks of Autodesk, Inc.
Alias and Maya are trademarks or registered trademarks of Alias Systems Corp.