Most asked questions |
Top Previous Next |
Q: I'm working on a multiplayer game which is working fine starting through WED if I use -sv, -cl etc. How do you go about coding the startup files? A: You can use separate batch files for client, server, etc or you can use the engine itself (load a dummy level and use "exec").
Q: I like your footprint code in Aum9; how can I change it to create footprints only when the player is outdoors? A: Add scan_texture to trace_mode and compare the name of the texture with “your_snow_texture”. If these names are the same, create the footprints.
Q: How can I make that my enemy hear sounds and attack me? A: Check the distance between the player and your enemy (or use scan) and if the player makes a certain "noise" (opens a door, etc) set a variable and then check its value in enemy's action.
Q: How can you define a variable for a certain entity and then change its properties? A: You need to use pointers for that. Here's a sample:
Q: I have started to play a wave file by pressing the space button in my action. The wave file plays once from beginning to end. Can I stop it somehow before it ends? A: Yes, you can. Here's the code:
var sound_handle;
action your_action { ........... sound_handle = snd_play (my_great_music, 40, 0); ........... while (something) { if (key_s == 1) // press S to stop the sound { snd_stop (sound_handle); } } }
Q: I am trying to create a speedo for my game. I would like to use 2 panels; the first is the clock, and the second is the needle that indicates the speed. I need to make the needle rotate or 'roll'. Is this possible with a panel? A: Use two entities; their definitions should be similar to the bow entity in this Aum edition. This way you will be able to change the roll angle.
Q: Can you change a Map entities texture by script? A: Yes, you can use morph or use u and v to shift the texture (it should be twice the original size) until you see the new one.
Q: I was wondering if there is a way, instead of deleting the particle when the particle life expires, but to delete the particle when it passes a certain position or becomes X far away from where it started?
Q: I'm using Geometricks' attach_entity function. I did a generic attach statement, but my models were scaled, so the guns did not line up correctly. Can I scale the guns via script to match a model scaled in WED? A: The answer is easy if you know the scale in Wed:
Q: Is there a way for a (template) enemy to slowly fade from existence after a certain time and then remove itself? A: First of all, comment a line in action robot2: |