SRL Archive - OSR Help

Character Stuck Between Objects


VastlySuperior

2012-07-19 07:18:47

Hey

If my character is stuck between objects and I only want to move it along the y axis and click on the main screen so that it can move to that location, how do I do that?

This is what I Have But it is not working.

Procedure Test;
var
x ,y: Integer;
Begin
WriteLn('Test');
GetMousePos(x,y);
Mouse(x , (y + 300), 5, 5,True); // Make fire at another location
Wait(RandomRange(850, 1000));
End;

P1ng

2012-07-19 08:15:16

How do you mean stuck between two objects? What is it you are trying to get your character to do in full?

VastlySuperior

2012-07-19 08:52:10

It burns logs, and sometimes when burning the logs it gets jammed against a tree and then it turns around but cant create a fire because there is a existing fire where it wants to start the new one, so all I want to do it to move it a few pixels on the y axis, I think that would be all I need so that it can continue with the burning process from where it waits for the AveragePixelShift to reach a certain criteria before it continues with the loop. Otherwise it stands there until the fire burns out before continuing with the burning.

riwu

2012-07-19 09:03:26

Why are u still lighting logs in the conventional way when there is bonfire?

Also GetMousePos will get ur mouse position when it is called, which may not be at your character (it may be at ur inventory etc). Wouldn't ur character always be at MSCX,MSCY?
U will also need to ensure ur camera is perfectly north and the path is straight in order for this to work. Why not just let it run to ur original starting point and light from there?

P1ng

2012-07-19 09:29:59

Yea, if you are going to stick with conventional fire burning (which I don't recommend given how much easier bonfire is) I would create a function that walks via minimap back to where you started

VastlySuperior

2012-07-19 09:35:23

Ok,Then I would rather switch to bonfires, much easier and less complicated as well. Thanks guys. O just one more thing. If I create bonfires, will there still be ash to pick up or will I lose some ash? Just a thought about ash.

riwu

2012-07-19 09:38:40

iirc there will only be 1 ash/bonfire (after it runs out), but collecting ash is not good money anyway so why bother?