SRL Archive - OSR Help

Detecting movement?


Spartan 117

2013-03-17 01:30:29

Is there anyway to detect if the player is say attacking a cow or mining a rock? I've looked through some scripts and seems something about pixel shift. Am i correct in believing this is how to detect this?

If so will someone please explain how it works?

If not how on earth can I detect while I'm in battle?

Le Jingle

2013-03-17 01:35:25

Check for fighting bar above your player might work too ;)
srl_InFight is an example.

Justin

2013-03-17 02:09:40

Also look at making a PixelShift function :)

The Mayor

2013-03-17 02:41:54

You could also look at the existing SRL IsMoving function:


Function IsMoving: Boolean;

Begin
Result := PixelShift(IntToBox(MMCX-30, MMCY-30, MMCX+30, MMCY+30), 500) > 200;
End;