Q: I want to display a string just like a typewriting machine does, so that each letter or character is displayed after a little break.
Q: I would need a lite-C camera that always shows the player from its side.
Q: When a player gets a high score, I'd like to be able to prompt him to type in a name and then write it to a file. So far, I haven't discovered any Lite-C mechanism for doing this.
Q: I know that the goto instruction doesn't work in lite-C. Can you show me a good example on how to replace goto in lite-C?
Q: I would like to have a looping sound fade in / out as a player gets closer / farther to it.
Q: I'm making a subway and I want the doors to move along with the subway. How can I do this?
Q: How do you create bullets for a gun? I know that you can ent_create them, but how do you make it so that they will always end up coming out of the gun?
Q: How do I make it so that when the bullet hits the target, the target dies or an effect triggers?
Q: I would need the code for a rabbit that can detect obstacles (walls) and can jump over them automatically.
Q: How can I detect (inside the enemy code) if the enemy is hit by player's bullets and not by the other enemies' bullets? I need this for my shooter game.
Q: How can I attach a "real", working headlight to one of my models?
Q: I would like to have a task strip below the screen that rises when the mouse is placed at the bottom of the screen and includes clickable pictures.
Q: I have a function that shows a panel and activates the cursor. If I trigger it with event_impact, the cursor freezes. If I call it with a keystroke, the cursor works. What is wrong with my code?
if (event_type == EVENT_IMPACT)
snd_play(gong, 40, 0);
ent_remove(me); // disappear when hit
Q: I have an fps gun which animates using the left mouse button; however, if I release the mouse button, the animation will stop without completing the cycle. Can anyone help?
Q: My code uses the c_move instruction; however, the model penetrates the wall partially, just like in the picture below. What is wrong?
Q: How can I use the code snippets from Aum's faq? Do I save them as separate files, and then copy the files to my code folder? Or is there a step that I am missing?
Q: I can't get a flash sprite to animate at the gun muzzle. Can anyone help?
Q: I would like to be able to blow up a barrel with flames and smoke.
Q: I have a car and I would like to blow it up with smoke, flames and have it roll over on its side at the same time.
Q: I would like to have a flash (smashing like) appear in random places on my model. How do I do that?
Q: I want a camera that can zoom in and out, rotates around the player but always faces it. The left and right arrow key should do that; the up and down arrow should move above and below the player.
Q: How can I use baked textures?
Q: I would need some code which allows a player to ride upon a moving train on a path, but while the player is on the train he can move around also.
Q: I use the sys_trial code from Aum 74 for a demo. The code works correct, but I've got an ent_create instruction in a different file, which is included in the sys_trial file. The problem is that even after the demo expires, the ent_created model is still created. What is wrong?
Q: I'd like to have a machine gun that creates hit hole panels with random orientation on the walls. How can I do that?
Q: My script includes two gun entities. Setting their positions works fine, but I want to be able to change the gun model as well, depending on the value of a variable named currentGun. How can I do that?
Q: I am making my own version of Guitar Hero. I have already made a simple level and some note models. The level and the songs work, but I don't want to make a new level for each and every song, on each and every difficulty, on each and every instrument. Is it possible to make a file (like a text file, a script file or whatever) that contains the positions of the notes and how many neckboard pieces are needed, which can be opened by a script that loads the information and displays the notes and neckboard on the screen and also assigns the notes and the neckboard their actions?
Q: I want to create a different starfield effect; I want to have tiny white pixels. Creating a skycube produces blurred pixel dots; I want to have sharp white points. The stars cannot move while I move my ship, since they are very very far. So I need them to be created and just blink a little, following the player but without any trail.
Q: How do I make an object that when you walk up to it and press a key, it displays a message?
Q: I have a 3D map and little dots to show the enemy ships' positions. I am using screen entities for the cube map and the dots; is there any way to assign a function to the dots?
Q: Is there an opposite event for EVENT_SCAN? I want to display a text when I "see" an entity and let this text disappear when I don't see the entity anymore.
Q: I use particles for my waterfall; when I move away from my particle effect I can only see a few particles and this doesn't look natural. How can I fix that?
Q: I'd like a function that fades in a music track, plays it for 1 minute and then fades it out. Can you help?
Q: I'd be happy to make an aimlessly moving AI that changes direction at a random interval between 4 and 10 seconds.
Q: In my car simulation, I want to make a log file that shows what the driver does at a certain time. Can anyone help?
Q: I'm trying to add scripts that come with GameStudio to my project, but there are a few scripts which can not be opened, even though the files are already there. Did anyone else encounter this problem or knows a way to overcome it?
Q: Four entities share the same action. In a separate function I set one to be the active entity using a pointer; if I set its skill1 to any number, all the entities with the same action get the same value for skill1. Is this a bug or am I doing something wrong here? Have pointers changed under lite-C? Skill1 is being treated like a global variable here.
Q: I'm interested in reading out the sound volume for my music track. Anyone knows a variable or is it possible to get a handle with the volume to a sound or anything else?
Q: My game includes 5 important entities; I'd like to display their health values on top of their heads at all times. Can you help?
Q: Can I have an entity that is controlled using the arrow keys and acts like a magnet for some other entities?
Q: Is there an "official" semicolon counter for the "100 lines of code" contest?
Q: Do you have a snippet that allows me to control my model using the arrow keys (walk and attack)?
Q: I have made a simple educational game that runs at 800 x 600 pixels. When somebody stretches the window from its corners my button are not working anymore. Is there a way to lock my window?
Q: I need the code for a starfield that generates particles in the background. Can anyone help?
Q: I've got a box with a cylinder in front; it looks like a dial that can be rotated by pressing a key. I'd like to play a sound when the dial reaches a certain postion. Can you help?
Q: I recently noticed that the shadows in my level aren't as good looking as I remembered them. I say "remembered" because I'm starting to think that I imagined it since I never payed too much attention to the shadows.
Q: I have a bitmap that contains an animated sequence of heart beats. How can I play the sequence as a 2D animated sprite?
Q: How do I change (for collision detection purposes) the hull size of an entity to its "real" values?
Q: I have two entities but I'd like to switch the control from one to the other, using the same player action instead of creating several player actions. How can I do that?
Q: My player should turn towards a place (vector) on the map, start walking in that direction and stop when it has reached the proper spot. Can anyone help?
Q: How do I add movement to my player and put the camera behind it, so that when I press W,A,S,D the player will move and the camera will be kept always behind the player?
Q: How can I add pixel & vertex shaders to entities (the easiest way)?
Q: How can we create code that places bullet holes on surfaces?
Q: How can I program a character that changes its size every time when it is shot?
Q: I have encoded an animation to avi (Indeo 5.1) but when I play it in 3DGS it doesn't look good (bad image, sometimes bad frame rate). How can I play good quality videos using media_play?
Q: How can I destroy a little part of a wall using a bullet?
Q: How can I activate an "if" branch only if the model is, for example, "model.mdl"?
Q: How can we program a 3rd person camera that stays behind the player and rotates around the character if the player doesn't move for a while?
Q: How do you use FXA_Mirror? It doesn't work anymore! I am using A7 professional.
Q: My npc is supposed to rotate towards the player and say its line once, but only when it is looking directly at the player. How can I do that?
Q: Anyone got a snippet that makes a text appear when you touch something and makes it disappear when you move away?
Q: I would need a script that makes the camera follow the mouse pointer gently, but stops the camera when the pointer is close to the center of the screen.
Q: I would need a 3D arrow that points downwards, moving up and down, in order to show the player the following task.
Q: I want to play footstep sounds in time with my walking animation, I was wondering if it's possible to find out what frame is being played in the current animation and then play a sound.
Q: I want to place several sprites in the game but they have a background that I don't want to be visible. How can I tell the engine to ignore a certain color of a bitmap?
Q: I want the closest camera to be set and look at the player as soon as the player approaches it.
Q: I'm wondering if you can help me creating a crosshair that is controlled with the arrow keys, while the player can be moved using the WSAD keys.
Q: How can I create a particle glowing effect, surrounding a 3D model?
Q: Is there a simple way to display several tiny colored dots on top of a map? My best try is to use lots of 1x1 pixel panels.
Q: I have used WED to design the first level of my game. I build the level but when I run it none of the sprites are visible. What is wrong?
Q: I would like to create a 2D game that uses 4 different car sprites (for the 4 movement directions) and allows you to control the car using the arrow keys.
Q: I want to move my model using the WSAD keys; the script uses c_move as shown below. How fast (in quants) will the model move in the level? Is the speed dependent on the fps of the computer?
speed.x = 5 * (key_w - key_s);
c_move (my, vector(speed.x, speed.y, speed.z), nullvector, GLIDE);
Q: I'd like to create a radar that scans around it and highlights all the entities that are within its range.
Q: Is there a way to decrease the texture quality? I'm having a small frame rate in my game, and I narrowed it down to the texture quality, so if I could decrease the texture quality, that would really help.
Q: I'm currently making an outside level in which I would like some water the player can enter. I have set the passable flag for my water entity but when I enter the water the player just walks on top of the water and does not enter through the surface. What am I doing wrong?
Q: How can I read and display a very big string from a file? Right now, any separator (comma, etc) will break the string so I'll only get to see a part of it.
Q: I would like to have my player pick up the diary pages by colliding with them, like walking up to them and they go into the inventory.
Q: I have a hard time setting the proper size of the entities in my level; is there a possibility to change their size at runtime?
Q: I am creating an adventure game and I would like to have a "tooltip", a small text that appears at the top of the screen and explains what an object is or does when that object is touched by the mouse pointer. How can I do that?
Q: I need a function that writes the date and time to a log file (appending them to the existing info) and then shuts down the engine.
Q: When I run my wmb level, it uses about 65 MB of ram, but when I run it using the script it needs about 255 MB! My code loads several entities and scales them using values from an xml file. Is there a problem with my code?
Q: I was wondering if it is possible to make a door open and stay open when the player comes near it and close when the player moves out of range.
Q: I'm trying to create a character selection snippet; the player should go through all the available characters by clicking a model. How can I do that?
Q: How can I have my enemies detect me from far away when they can see me and also detect me when I'm behind (but very close to) them?
Q: Do you have some code for a bird that would fly randomly in a big outdoor level?
Q: I can't assign an action in Wed from an included script. If I create actions in my main script, they appear in Wed; I have no errors and I can call the included actions in my main script, but I want to attach them to my entities using Wed. Does anyone have an idea?
Q: I am trying to make a ball toggle its 2 skins when it collides with the wall.
Q: I would like to know more about the inner works of the "wait" instruction. When the number is positive, what is the time that the function pauses? What can "wait(50)" be replaced with using "wait(-x)" ?
Q: I'd like to have a panel that is barely visible (only a small edge should be visible on the screen) but slides until it is displayed completely when the player moves the mouse pointer over it.
Q: I have a puzzle in my game in which the 1st person player can only get past a door if he has found a hidden key. How can I do that?
Q: How do I make my entities to react to bullets only and not to the actual player?
Q: I am trying to get collision events for entities. Can someone show me a small example?
Q: I'd like to have a camera that swings out a bit, just like a boat riding a small wave.
Q: I have a bmp file (grid.bmp) and I would like to show it just a few pixels above my terrain. How I do to it?
Q: What action do I need to create (using lite-C) to get a model to follow a predefined path?
Q: I need to close the level and after one second load another level. I have used game_exit but this doesn't work.
Q: My player must move from the far left of the screen to the right, facing the proper way of course. Any press of the left or right keys should rotate the player in the direction he is walking.
Q: How can I swap the bmap of two panels?
Q: I have a car code that works ok, but I'd like to attach it sprite-based lights that move and rotate together with the car. How can I do that?
Q: I'm trying to set up a small game with a ship that is controlled using only the space key (press to give the ship some gas, release the key to cut it). Can you give some advice?
Q: How can I create the code that displays a menu when the player has clicked a building?
Q: Is there a special way to divide numbers? If I try to divide 6 / 4 I get "1" as the result.
Q: Could you please give us a snippet that's as simple as possible and includes all the needed lite-C code for a standalone 1st person player / camera combination?
Q: I want to change the model when the player dies; this way, I could use an impressive death sequence.
Q: How do I get an entity to blink when I move the mouse over it (like fading in and out white)?
Q: I have a countdown timer and I would like to put a 3D bar on the screen and connect it to the timer. As the time decreases, the bar would become smaller and smaller. Is this possible?
Q: I want my boat to pan / rotate when turning but only move to that new angle after a slight delay, creating a sliding effect like you would see when a car attempts to turn too fast or on a slippery surface.
Q: I'm trying to get a cool waving effect for my leaves
Q: I'm trying to make a gun fall to the floor without using physics. How can I do that?
Q: I want the camera to rotate as soon as the level is loaded, giving an overview of the level; after that it has to come back to the normal view, so that the player can move.
Q: How can I get a function to spawn particles in a circle around my character?
Q: How can I fade out a sound that is played by snd_loop?
Q: I need a 3D "button" which gets colored to red when it is clicked and returns to its normal color after the second click.
Q: I have created some pcx panels which use the overlay flag. When I run it the project, my panels still have some residual black spots around them. Has anyone found a fix to this?
Q: How can I change the X position of a model using the keyboard?
Q: I have an entity that should display a new string above its head every 3 seconds, reading it from a text file. Can anyone help?
Q: My model includes an animation named "dance". How can I call this animation when the player hits something, then restore it to "walk" when the "dance" frames end?
Q: I want to display a question on the screen, and then to accept the answer and compare it with the predefined answer in the code. If it is correct, then the code should display the next question and accept the answer, and so on.
Q: I'd like to have a turret who can detect friends and foes. If a friendly entity comes near the turret, the turret should just follow it. On the other hand, if the player approaches, the turret should rotate towards it and fire at it.
Q: I want to fill a test-tube with a given liquid. During runtime the test-tube has to be filled using mouse press or using arrows on the keyboard.