Hit a snag

Thanatos
08 Nov 2008, 02:24
Heyall. So, here's the deal. In my game you have a number of objects that must be put on the appropriate surfaces to create another object. Eg: Statue Item1 on Statue1, Statue Item2 on Statue2, Statue Item3 on Statue3, create Reward Item.

How can I do this? If, Then, Else doesn't cover surfaces/containers, so it looks like I need code. Help meh pl0x! :P

Elexxorine
10 Nov 2008, 13:22
Create a custom command/verb for those objects and set a flag when they're on the right surface. Make sure to tell quest to run the default command/verb if it's not the special objects.

If you're not sure on how to do that exactly or it doesn't work, post up the code in question and I'll have at look at it and make it work.

Freak
10 Nov 2008, 13:28
What exactly do you mean by "if/then/else doesn't cover surfaces/containers"?

paul_one
11 Nov 2008, 00:27
IMO I'd just have it so as soon as the object was out onto the correct statue it would accept it and that's it.

There's should be a way to do that through the default quest surface commands..

Thanatos
12 Nov 2008, 06:14
elexxorine wrote:Create a custom command/verb for those objects and set a flag when they're on the right surface. Make sure to tell quest to run the default command/verb if it's not the special objects.

If you're not sure on how to do that exactly or it doesn't work, post up the code in question and I'll have at look at it and make it work.


All I have are the custom objects and statues, no coding whatsoever. If you could just post up something along the lines of what you just said, so I could alter the names and stuff for my game, it would really help.

(I have 17 statues and 17 items that go to each statue.

Thanatos

Eg: Statue Item1 on Statue1, Statue Item2 on Statue2, Statue Item3 on Statue3, create Reward Item.

... up to 17.

Pweeeze :P

Thanatos
12 Nov 2008, 06:15
Freak wrote:What exactly do you mean by "if/then/else doesn't cover surfaces/containers"?


I mean that if you select If/Then/Else for the script, then it doesn't have an option like: "If Object is On/In Surface/Container"
Would be helpful. On the to-do list, eh Alex?


EDIT: Sorry to double post :oops:

Alex
12 Nov 2008, 18:10
You just need to read the "parent" property for the object. For example, if there is a cup on a table, then the cup will have parent=table.

You can check this in an "if" condition using "Compare two strings, values or properties", then check whether "#cup:parent#" is equal to "table".

Thanatos
13 Nov 2008, 03:59
Makes sense :D
Thanks Alex. But...

Thanatos

I mean that if you select If/Then/Else for the script, then it doesn't have an option like: "If Object is On/In Surface/Container"
Would be helpful. On the to-do list, eh Alex?