Most asked questions
|Top Previous Next|
Q: How can I create a script to allow me to click an object in 3D space to select it?
A: Use ACTION select_object for your objects that can be selected:
A: You have to add a single line to the laser code to make it work fine in outdoor areas:
IF (RESULT !=0)
Play with 2000 - it adjusts laser's length.
A: Here's an example for a panel that appears in the upper left corner and shifts to the lower right corner (define your_pan panel):
var camera_switch = 0;
Q: Is there a way to change the control or movement so that the up key is forward from the view? Where left and right were not turning or strafing, the player model faced the direction pressed and went and the camera followed accordingly. This is in a 3rd person view.
A: Here’s a wdl snippet that will solve the problem:
var camera_dist = 300; // play with this value
VIEW topview // set for 800x600 pixels
Q: I have given an action to an enemy (i.e player_attack); there is a patrol function in the templates, but I want my actor to patrol until it sees the enemy. Now if he sees the player then he should attack.
A: Please take a look at action robot1 in templates:
You have to check actor's FLAG4 and it will start patroling (if it finds a path nearby) and fight the player if it sees or gets shot by the player.
Q: is it possible to play a wav file as the music instead of midi?
Q: How can I decrease player's health during time. I'd like to decrease the health value when time goes on.
A: Use something like this:
function decrease_health() // call this in main
Q: I am working on an adventure game, just using the elevator, door and key actions. It really disturbs me that I can only define 4 keys. Maybe some of the WDL-Gurus can help me.
A: The newest templates have 8 keys. Update your doors.wdl file.
Q: Has anyone scripted a mouse sensitivity routine?
A: Look in movement.wdl, there's a var named mouseview that can change the sensitivity. Use a hslider or vslider that changes mouseview.
Q: I just upgraded to A5 and now the particles that used to look really cool with the MY_FLARE flag set to "ON", now look really lame. Does anyone know why this might be?
A: A5 has a better particle system; the new MY_ALPHA skill gives the transparency for the particles. Use MY_ALPHA = x; (x = 0..100) in your particle action and you'll get your good looking particles back.
Q: How do I modify the range for the weapons?
A: The _bulletspeed (skill5) gives the speed of the bullet AND its range (twice the bullet speed).
Q: I would like to record all the actors movements (triggered by some start/stop keys) into a file. Any suggestions? What about performance, when continuously (lets say every 100 ms) writing x/y/z/rotation coordinates into a file?
A: I would create an array that holds player's coordinates; when the game stops (just before the engine shuts down) write the array content in a file on disk.
A: Muzzle_vert is used for enemies and allows them to shoot with any vertex of their bodies. Open your mdl actor in med, click on the desired vertex and read the vertex number at the bottom of the screen, then add MY.SKILL32 = your_vertex_number; in actor's action (robot1 or so).