Duplicating objects....

For questions about using Classic.

Post » Thu May 22, 2008 6:12 am

[quote="Caspis Sinclair":1y4bdj97]When you're facing the front of the chest it would look much better if the top half of your character overlapped it.[/quote:1y4bdj97]
B
3
S
2
G
4
Posts: 322
Reputation: 2,119

Post » Thu May 22, 2008 11:29 am

Cleansed.
B
2
S
2
G
5
Posts: 391
Reputation: 2,432

Post » Thu May 22, 2008 9:44 pm

I hope I'm not fanning the flames, but TheInstance's example actually works very well. It fixes the problem where if you have a chest above you and to the side, or any other combination of two or more chests adjacent to you, all of them open.

I actually tried something similar to what he did back when Jeswin first helped out, but I messed up a few details and it didn't work quite right.

You can still trigger two chests at the same time if you are standing exactly in the middle of them, but as far as I can see that is the only remaining problem. I found out today that I'm going to have all of Saturday afternoon and Sunday evening off, so in addition to trying to fix that myself (although I very much appreciate the help, I really should stop asking for help whenever I run into a problem... :oops: ) I can get some more spriting work and begin a real demo.

(looks up to the heavens and calls out in a loud, strong voice)

Oh mighty Mod Powers that be, your humble servant requests that you lock this thread... lest we all suffer the wrath of Jeswin's growing annoyance with it!

:mrgreen:
B
4
S
2
G
4
Posts: 401
Reputation: 2,302

Post » Thu May 22, 2008 10:23 pm

The thread is fine! It's TheInstance -aka- j0h. He's usually a little hostile whether he means to be or not, but it doesn't matter. Point is, no need to lock.

As for solving opening two when you're right in the middle, may I suggest using an order system of sorts? Let's say you are at two chests which normally would both open, perhaps add a condition to open the one with a lesser X first, then the next one etc etc.

Other option is to use random with the existing conditions. Have Construct decide for you which to open first :o

EDIT: I'll go and clean up my posts above to be less intrusive.
B
2
S
2
G
5
Posts: 391
Reputation: 2,432

Post » Thu May 22, 2008 10:37 pm

I should not explain my motives so mutch .. but ...
I seem to be taken wrong so mutch ..

I am not really interrested in specific, isolated problems and in the solutions for them.
You never get a working system by solving each detail appart and isolated.

What i try to do is,
look at the isolated questions/problems, dig into them, and generate general rules,
starting from them.

I do this for myself, but can as wel *publish* my conclusions, and hope someone ads or takes from it.

You can read back, and see thats the case.

The cap that i made was just to illustrate. Nothing more nothing less.


And now allow me to dream a second. A few weeks ago i posted a .cap.

viewtopic.php?f=2&t=964

I really wish someone would look into it. And tell me why the T-blok is lagging. I cant find it !!

I really wish someone would tell me how i can make an event wait till the previous event has done moving its objects. Thats a big problem in that cap. And i illustrated that problem in many .caps

have a great weekend off.

Oh and, you can size the Thekey object to 1 pixel width, and separate the chests by 2 pixels. This will solve your problem totaly. TheKey is now 2 pixels, i think.
B
3
S
2
G
4
Posts: 322
Reputation: 2,119

Post » Thu May 22, 2008 10:44 pm

[quote="TheInstance":189apxx1]Oh and, you can size the Thekey object to 1 pixel width, and separate the chests by 2 pixels. This will solve your problem totaly. TheKey is now 2 pixels, i think.[/quote:189apxx1]

Yeah, that's what I thought too, but if he needs them touching for some reason, ordering them is really the only way I can see to avoid that.

Otherwise, rethink the entire concept and not use a detector :|
B
2
S
2
G
5
Posts: 391
Reputation: 2,432

Post » Thu May 22, 2008 11:27 pm

I was pretty sure that it was TheInstance that you were annoyed with and not the thread, Jeswen (I've been spelling it with an "i" for a while :? ). I know he has shown a certain lack of, well... social skills in other threads but I really do appreciate the help that he gave.

He was under no obligation to help out and he not only did, but he even addressed a problem that I didn't mention. So really, I don't mind at all.

Anyway...

What you suggested about the chests will probably work, but my original question had a dual-purpose to it. I'm making a mini-game where you pay a certain amount of money and three chests appear. You choose one of the three and you either break even, make money, or lose money. If you want to go on the number of chests increases each new round until you either run out of money or decide you've had enough.

The mini-game will be a part of the larger game that I'm currently planning out, and I'm actually not going to have the chests sit directly next to each other. There will be enough space for you to walk in between them.

However...

One important thing about the main game is that I want you to be able to dig up any empty square of ground that is not part of a road or anything else that should not be altered, and for this to work properly I need to have the grass/dirt made up of lots of individual squares, and they have to be right next to each other with no gap in between (it wouldn't make any sense for the shovel not to work just because you're standing in the gap between two patches of grass).

Well, I'm not sure if I'm going to work on solving the gap problem first or do some other things that I know for sure I can get done without problems. Hmmm... probably the latter. I'd like to have something worthwhile to post in the "Your Creations" section next week.


And again, thank you both. 8)
B
4
S
2
G
4
Posts: 401
Reputation: 2,302

Post » Thu May 22, 2008 11:29 pm

[quote="Jeswen":10oqsy6a]Otherwise, rethink the entire concept and not use a detector :|[/quote:10oqsy6a]

Thats always a possibility... I'd hate to spend a lot of time on the problem only to discover that it can't be done this way. :?
B
4
S
2
G
4
Posts: 401
Reputation: 2,302

Post » Thu May 22, 2008 11:51 pm

Have you considered having the player click a chest for this mini-game? They can still have to be near it, but that would save you a lot of hassle I would think.

Simple rectangle for a detector - if it's over a chest, they may click it. If it is over more than 1 chest, they may click either one, giving the player the choice.

Or if you want to keep it entirely to keyboard, you could also use keys (such as 1 and 2) for when two chests are available.

I may be going off track here, but I thought I'd check.
B
2
S
2
G
5
Posts: 391
Reputation: 2,432

Post » Fri May 23, 2008 12:09 am

[quote="Jeswen":1hojthor]Have you considered having the player click a chest for this mini-game? They can still have to be near it, but that would save you a lot of hassle I would think.[/quote:1hojthor]

Well... actually, the chests aren't the real problem. They won't be right next to each other so I can just allow the player to control the main character as they normally would to open the chests.

I used them as an example because solving the problem with duplicating them and having them right next to each other without triggering both would also enable me to have patches of ground that can be dug up.

I was trying to kill two birds with one stone... or one .cap, if you will.


Ugh, what a terrible analogy. :roll:
B
4
S
2
G
4
Posts: 401
Reputation: 2,302

PreviousNext

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 5 guests