Q: I have downloaded some plant models but when I put them in a level they have a strange black frame around their leaves. What should I do?
A: The skins don't have "true" transparent areas (RGB = 000). Modify the skins or set the flare flag for the models.
Q: How can I deform things and persons?
A: Use vec_for_mesh and vec_to_mesh. You can find an example in Aum8.
Q: How do you get a pcx file to play without morphing an entity into the pcx?
A: Here's an example:
action my_animated_sprite
{
my.oriented = on;
my.passable = on;
my.pan = 0;
while (1)
{
if (my.frame < 10) // 10 animation frames
{
my.frame += 0.5 * time;
}
else
{
my.frame = 0;
}
wait (1);
}
}
Q: I am searching for a script which blurs the textures when you come closer to them. When you walk close to a building the wall will blur so you don't see the texture as ugly blocks.
A: You are running the engine in software mode. Set video_mode to 16 or 32 in your script.
Q: When I test my level and I move upwards, it starts to fly. How do I prevent this?
A: Place a player model in your level and attach it the player_walk or player_walk_fight action.
Q: How go I get each entity to follow its own defined path?
A: Use ent_path in your actions:
action tank
{
if (my.flag1 == 1)
{
ent_path("tankpath1");
}
if (my.flag2 == 1)
{
ent_path("tankpath2");
}
if (my.flag3 == 1)
{
ent_path("tankpath3");
}
if (my.flag4 == 1)
{
ent_path("tankpath4");
}
if (my.flag5 == 1)
{
ent_path("tankpath5");
}
..............................
}
Q: I want a script that will rotate a camera around the origin (0,0,0), 45 degrees per click. Could someone help me?
A: Here's an example:
view camera_45{}
action my_camera45 // attach it to a model, sprite, etc
{
my.invisible = on;
my.passable = on;
camera.visible = off;
camera_45.size_x = screen_size.x;
camera_45.size_y = screen_size.y;
camera_45.pos_x = 0;
camera_45.pos_y = 0;
camera_45.x = 0;
camera_45.y = 0;
camera_45.z = 0;
camera_45.tilt = -90;
camera_45.visible = on;
while (1)
{
if (mouse_left == 1)
{
camera_45.pan += 45;
while (mouse_left == 1) {wait (1);}
}
wait (1);
}
}
Q: Anyone knows how to load in a bitmap during runtime?
A: Here's an example:
function bitmap_stuff();
string my_bmp = <my.bmp>;
action bitmap_creator
{
.....................
ent_create (my_bmp, my.pos, bitmap_stuff);
.....................
}
function bitmap_stuff()
{
wait (1);
my.ambient = 100;
...............
}
Q: I attach weapons to my actors; how can I remove the weapons if the actors die?
A: Here's a function that works with the templates:
function attach_gun()
{
proc_late();
my.passable = on;
my.metal = on;
while(you._health > 0)
{
vec_set(my.x,you.x);
vec_set(my.pan,you.pan);
my.frame = you.frame;
my.next_frame = you.next_frame;
wait(1);
}
ent_remove(my);
}
Q: How can I have a progressive zoom using your code in Aum11?
A: Here's the modified code (use the keys A S X):
function init_sniper()
{
on_mouse_right = null;
while (1)
{
if (key_s == 1)
{
if (video_mode == 6)
{
sniper640_pan.visible = on;
}
if (video_mode == 7)
{
sniper800_pan.visible = on;
}
if (video_mode == 8)
{
sniper1024_pan.visible = on;
}
if (camera.arc > 10)
{
camera.arc -= 2 * time; // speed
}
}
else
{
if (key_x == 1)
{
if (video_mode == 6)
{
sniper640_pan.visible = on;
}
if (video_mode == 7)
{
sniper800_pan.visible = on;
}
if (video_mode == 8)
{
sniper1024_pan.visible = on;
}
if (camera.arc < 90)
{
camera.arc += 2 * time; // speed
wait (1);
}
}
else
{
if (key_a == 1)
{
camera.arc = 60;
sniper640_pan.visible = off;
sniper800_pan.visible = off;
sniper1024_pan.visible = off;
}
}
}
wait (1);
}
}
|