Problem with Object.Move

Started by MRollins, Wed 09/06/2010 00:55:28

Previous topic - Next topic

MRollins

Right, so I have a guillotine in a scene and a timer set to drop it. No problem except when the guillotine drops it shoots out to the left and then tries to correct itself back to the correct coordinates to the right but doesn't quite make it.

I've tried removing all hotspots and objects below it thinking they might be interfering with the path but nothing seems to work. What would cause the object not to drop straight down,? I've tried setting .Solid to false but I get the same results.

Below is the code for the object movement. The blades starting coordinates are 198, 70.

Code: ags


if (IsTimerExpired(1)) {
    oBlade.Move(198, 141, 15, eBlock);



Gilbert

Objects are also affected by walkable areas, try forcing it to move straight and see if that helps:
oBlade.Move(198, 141, 15, eBlock, eAnywhere);

MRollins

Thanks! That worked. I didn't realze objects needed walkable areas.

Khris

This is explained at length right in the manual entry for Object.Move.

MRollins

Right, so obviously I missed that. Thanks for pointing that out so EVERYONE knows how smart and well versed with the manual you are...

Atelier


Calin Leafshade

His point was that you should have read the relevant manual section *before* posting, not that he knows everything about the manual (although he actually does).

EDIT: also, you can actually just right click on the command in the script window any press something like "see function definition" and it takes you right there!

No excuse.

MRollins

No, I get it loud and clear. But does he (or anyone else) need to be a d!ck about it? It was obviously something I overlooked in the manual. There's no need for him or anyone else to chime in after the question has been politely answered. 

Calin Leafshade

well then everyone is happy.

You'll check the manual next time and Gilbert won't need to answer your question.

Problem solved :)

Khris

MRollins, to me it sounds like you're the one who's being a dick about it, and I guess the reason is that my comment made you feel stupid.

Gilbert

Sorry, Calin, but IMO Khris was really a bit rude here. The problem had already been solved and there is no need for him to put that in.

All right. Khris, since you just posted again. please refrain from posting such kind of comments and acting like a mod next time. As I said the problem is solved and I wouldn't mind people asking such questions in the forums and some solutions are not always as obvious as to people who really dig into the manual (as long as it's not a sign of laziness on not taking any effort to read and spam the forums continuous with basic questions).

You've been warned.

AdamM

Well Gilbet, IMO Khris was just being incidental, and MRollins was really overreacting with such a sarcastic reply. It doesn't matter whether someone's comment is helpful or redundant; it was completely unnecessary to such a hostile tone. I would have appreciated Khris's post, as it would have made clear to me how the manual could have answered my question instead, and that this knowledge would be helpful the next time I need it.

xenogia

People mis-interpret text :) Have a flower.

Gilbert

Adam, maybe, but indeed the thread was done already and Khris' comment wasn't particularly useful in this case. There wasn't a need to make that reply, be it incidental or not. I appreciate his knowledge and understanding on stuff but there are many cases where he shouldn't need to add anything, be it being misinterpreted or not, or could have worded it better. I warned that as a whole and not only for this topic.

AdamM

I just think you're berating the wrong person for the right reasons.

Khris

In MRollins shoes I'd have appreciated my first comment. That's why I made it.
I'll admit that the second one was unnecessary.

SMF spam blocked by CleanTalk