|
Re: Newbie can't make connection: player walk
[Re: Rockfleet]
#366456
04/04/11 00:20
04/04/11 00:20
|
Joined: Dec 2008
Posts: 1,660 North America
Redeemer
Serious User
|
Serious User
Joined: Dec 2008
Posts: 1,660
North America
|
Hi, To connect a script to a level, you must first open the level's properties and assign the script through the dialog box you see on the first tab. Then, you must open your entity's properties and assign your action to the wizard under the behavior panel. Hope that helps. 
|
|
|
Re: Newbie can't make connection: player walk
[Re: Rockfleet]
#366467
04/04/11 03:20
04/04/11 03:20
|
Joined: Dec 2008
Posts: 1,660 North America
Redeemer
Serious User
|
Serious User
Joined: Dec 2008
Posts: 1,660
North America
|
To make footsteps, you need to use ent_playsound() to play a sound effect at the entity's location. To have the sound effect play only during certain parts of the wizard's animation, you will have to use some tricky conditional statements that check his current state of animation and play a sound effect. There's no one way to do this, so I'll leave it up to you to figure out; but if you need further help, I can write you an example.  To create a first person camera, you'll need to modify the position and rotation vectors of the "camera" object. An easy way to do this would be:
camera.x = my.x;
camera.y = my.y;
camera.z = my.z;
camera.pan = my.pan;
camera.tilt = my.tilt;
camera.roll = my.roll;
But a simpler way to write that would be:
vec_set (camera.x, my.x);
vec_set (camera.pan, my.pan);
Both blocks of code will place the camera at the entity's origin. Of course, you can move the camera up or down by simply adding or subtracting to the Z parameter of the camera object.
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|