Animal Trap
sherlock
11 Feb 2011, 20:57Im making a game werer you use a animal trap and every 30 or so seconds a died animal will apear. But my problem is hwo do i make it so the died animal will apear in the room were the trap is??
Alex
11 Feb 2011, 21:35Do you mean that you want a new animal object to be created every 30 seconds?
If so, probably the best way to do this would be to create one "animal" object in QDK in a hidden room. Then, in your timer script, use the "Clone an object" command from the "Modify" category to create a new animal object. You'll need to increment a numeric variable to give each animal a new number at the end of its name.
So if your numeric variable is called "animalcount", increment the variable, then for "New Object Name" enter "animal%animalcount%".
If so, probably the best way to do this would be to create one "animal" object in QDK in a hidden room. Then, in your timer script, use the "Clone an object" command from the "Modify" category to create a new animal object. You'll need to increment a numeric variable to give each animal a new number at the end of its name.
So if your numeric variable is called "animalcount", increment the variable, then for "New Object Name" enter "animal%animalcount%".
sherlock
11 Feb 2011, 22:19What is the Variable Content and how do you make the animal clone in the room were the trap is?
Alex
12 Feb 2011, 13:27Use "Increment a numeric variable" from the Variables category. You don't need to specify variable contents then, it will automatically start at 0 and be incremented each time 1, 2, 3...
I've created QDK to be intuitive. You should be able to figure things out by clicking around and experimenting. So the answer to your second question shouldn't be too hard to find - you'll see on the "Clone an object" options there's one called "Create Object in Room", so why not have a play with that and see what happens.
I've created QDK to be intuitive. You should be able to figure things out by clicking around and experimenting. So the answer to your second question shouldn't be too hard to find - you'll see on the "Clone an object" options there's one called "Create Object in Room", so why not have a play with that and see what happens.
sherlock
12 Feb 2011, 16:17I do that but my probelm is the variable. The variable is the room were the trap is. So werer every you put the trap it will show the variable is the rooms.
sherlock
12 Feb 2011, 16:31it didint work but what i tried for the animal trap timer is on it starts this If"Small Animal Trap" has action "use" Then Clone the object "Died Mouse" as "Died Mouse%Small Animal Trap% in "$Locationof(Small Animal Trap)$"