Questions

sherlock
04 Feb 2011, 00:42
how do you make a health stat or a attack button.

Alex
04 Feb 2011, 10:03
I've split this from the old thread you added to - please don't resurrect ancient threads.

Also please be more specific with your question, what is it exactly you are trying to do, and what have you got so far?

sherlock
06 Feb 2011, 04:38
sorry about the thread. My problem is with the "Execute as if typed by player" command how do you activate it. So i have a enemy and my helath bar. How do you have the enemy do damage to ot but it wont run the execute as if typed by player. Also how do you add a health bar to a enemy.

sherlock
06 Feb 2011, 21:24
I think ill use this to ask questions. I have one more how do you make a object start as flag on?

Alex
07 Feb 2011, 20:58
Probably the easiest way is to turn the flag on with a script when the game starts - choose "Game" from the tree in QDK, then under "When the game starts", edit "Run this script".

sherlock
07 Feb 2011, 21:02
Thank you. Also how do you make a status variable stop when it reaches 0?

Alex
07 Feb 2011, 21:15
You just type the name of the flag, you don't need to create it separately anywhere else.

If you don't want a status variable to go below zero, in the Edit Status Variable window you can create a script to run when the value is changed. You can add a conditional script (an "if") for this - add the condition "Compare two strings, values or properties" for "%YourVariable%" is less than or equal to zero. Next, in the "Then" script, you could either set the variable back to zero, make the player lose, or whatever else you want to happen.

sherlock
07 Feb 2011, 22:19
Thank you very. Sorry but im going to ask you a othere question. How does execute as if typed by player work? Because i have been trying to do it but it dont know how it is activated?

Alex
07 Feb 2011, 22:53
Well it will be "activated" when that script runs. So if you put that script inside an object's look script, it will be activated when the player looks at the object. If the parameter for the script command is "take object", then the object will be taken when the player looks at it.

sherlock
07 Feb 2011, 23:20
Thank you. :D

sherlock
07 Feb 2011, 23:50
two more questions. I made it so when i start it will lock door but it does not work. The othere one is i did the thing so when you start it makes a flag go on and i have a action that makes the flag go off but it does not work?

Alex
08 Feb 2011, 19:31
For anybody to help you we'll need a lot more information than "it doesn't work".

What exactly have you done?
What exactly is happening?
What exactly are you expecting to happen?

It also helps if you attach your ASL file to the forum post (you can click "Upload attachment" under the Save draft/Preview/Submit buttons when posting)

sherlock
08 Feb 2011, 19:59
The problem with the door lock thing is that i made it so when you start it locks the door. Then when you gain a object it unlocks but it wont. The flag thing is lets say to use the action "Kill" you need to use "Wound" first So i made it so kill starts with flag on and when you use "Wound" it will set "Kills" Flag off but it does not?

Alex
08 Feb 2011, 22:14
So how did you set up the unlock object? You put a script somewhere right... so, what script did you use and where did you put it?

As I said, it will really help if you attach your ASL file so we can see exactly how you've got things set up.

sherlock
08 Feb 2011, 23:06
What does ASL stand for? Do i upload the game? Or the ASL Code?

Alex
09 Feb 2011, 12:44
It's your game file, the one you're editing in QDK.

sherlock
09 Feb 2011, 15:05
Hey i will put the game up, but i was wondering how do you make a game that is turn based so it would switch in-between players? LIke that text based dice game somebody has on this site.

sherlock
09 Feb 2011, 17:10
Here it is. I made a new game and did the same thing i did wiht the one im working on. Its cald ASL Code

sherlock
09 Feb 2011, 18:39
Variable error. I have a timer every 5 seconds it makes a variable do down by 1. But each time it goes down by one you loose. But i made it if 0 is = to 0.

Alex
09 Feb 2011, 22:42
OK, I can only answer your "lock" question as that's the only one you've posted ASL code for.

The problem is in your lock/unlock script commands, you're using something like this:


Lock the exit from "Room 1" to "Room 2"



But the exits you've defined are compass exits, not "go to" exits. In your example, the exit from room 1 which leads to room 2 is "north", so you just need to change this to:


Lock the exit from "Room 1" to "north"



If you could please put separate questions in separate threads, it will be easier to answer new questions, and easier for other people to search for later.

sherlock
10 Feb 2011, 00:59
How do you make a Turn based game that Multyplayer like there and back again the dice game and thanks for that :D

sherlock
10 Feb 2011, 20:33
One more thing, how would you make in a game a place were the player could wright somthing like what should your name be? So it would refer to you through the game as what you typed in.

sherlock
10 Feb 2011, 23:00
And a othere thing. I want to have a object "Animal Trap" and have a timer activated when you use it. Every ohh lets say 20 seconds a animal will apear in that room becaus the "Trap" caught the animal.

Alex
11 Feb 2011, 20:08
I think all of these questions are answered in the tutorial.

If you are trying to implement something and have a specific question, please post to a new thread - one thread per question.