Author Topic: Rail Problem  (Read 1786 times)

0 Members and 1 Guest are viewing this topic.

Offline BlacklistedTopic starter

  • Jr. Member
  • **
  • Posts: 75
  • Activity:
    0%
  • Reputation Power: 2
  • Blacklisted has no influence.
  • Respect: +13
  • Referrals: 0
    • View Profile
Rail Problem
« on: August 16, 2011, 06:00:00 AM »
0
I'm having a drama with a rail i've wrote using ENs - Subs - MiniRail System
I have recorded right up to the hole but the character will stop just a couple of tiles before he reaches the hole and spams "can't get there".
any ideas whats causeing the issue?




This is the code i have to move to that hole.

Code: [Select]
;--------------------------------------------------------------
sub ENs_FindHole2
  If %Hole2LoopValueMax = N/A
    gosub SetupHole2LoopValues
  set !holefound #False
  set !Loopvalue 0
  repeat
    gosub hole2move !loopvalue
    if !loopvalue > 10
    {
    gosub findhole2
    }
  until #result   ; hole found


; finish the loop.
;  repeat
;    gosub hole2move !loopvalue
;  Until !loopvalue >= %Hole2LoopValueMAx

wait 15
Return
;--------------------------------------------------------------
;--------------------------------------------------------------
Sub Hole2Move
    set !x %Hole2LoopValuex . %1
    set !y %Hole2LoopValuey . %1
    set !z %Hole2LoopValuez . %1
    set !Exit 20
    Repeat
      set !Exit !exit - 1
      event pathfind !x !y !z
      wait 1
    Until ( #Charposx = !x && #charposy = !y ) || !exit < 1
    set !loopvalue !loopValue + 1
    If !loopvalue >= %Hole2LoopValueMAx
      set !LoopValue 1
Return
;--------------------------------------------------------------
;--------------------------------------------------------------
sub SetupHole2LoopValues
  gosub AddHole2loopvalue 5883 1864 4
  gosub AddHole2loopvalue 5921 1797 0
  gosub AddHole2loopvalue 5921 1797 0
  gosub AddHole2loopvalue 5921 1797 0
  gosub AddHole2loopvalue 5921 1808 1
  gosub AddHole2loopvalue 5921 1808 1
  gosub AddHole2loopvalue 5921 1808 1
  gosub AddHole2loopvalue 5921 1819 2
  gosub AddHole2loopvalue 5921 1819 2
  gosub AddHole2loopvalue 5921 1819 2
  gosub AddHole2loopvalue 5921 1834 3
  gosub AddHole2loopvalue 5921 1834 3
  gosub AddHole2loopvalue 5921 1851 1
  gosub AddHole2loopvalue 5921 1851 1
  gosub AddHole2loopvalue 5921 1851 1
  gosub AddHole2loopvalue 5915 1861 3
  gosub AddHole2loopvalue 5915 1861 3
  gosub AddHole2loopvalue 5908 1872 4
  gosub AddHole2loopvalue 5908 1872 4
  gosub AddHole2loopvalue 5908 1872 4
  gosub AddHole2loopvalue 5904 1876 2
  gosub AddHole2loopvalue 5904 1876 2
  gosub AddHole2loopvalue 5900 1872 0
  gosub AddHole2loopvalue 5900 1872 0
  gosub AddHole2loopvalue 5897 1875 0
  gosub AddHole2loopvalue 5897 1875 0
  gosub AddHole2loopvalue 5897 1875 0
return
;--------------------------------------------------------------
;--------------------------------------------------------------

sub AddHole2LoopValue
  if %Hole2LoopValueMAx = N/A
     set %Hole2LoopValueMax 0
  set %Hole2LoopValueMax %Hole2LoopValueMax + 1
  set %Hole2LoopValuex . %Hole2LoopValueMax   %1
  set %Hole2LoopValuey . %Hole2LoopValueMax   %2
  set %Hole2LoopValuez . %Hole2LoopValueMax   %3
Return
;--------------------------------------------------------------
;--------------------------------------------------------------
;--------------------------------------------------------------

Offline Endless Night

  • Global Moderator
  • *
  • *
  • Posts: 5467
  • Activity:
    0%
  • Reputation Power: 62
  • Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!
  • Respect: +393
  • Referrals: 1
    • View Profile
Re: Rail Problem
« Reply #1 on: August 16, 2011, 07:34:09 AM »
0
try pressing the space bar twice....  and if that doesnt work just manually add another position

eg  (walk to the spot and note the values of charposx , y, z in EUO)

gosub AddHole2loopvalue [values for charpos x y z]
Outlaw Josey Wales - "Manwink, A Long Gone Scripty, and Endless are always teasing us with their private sections lol. What there realy saying is scripters rule and users drool."
Briza - "Your a living breathing vortex of usefulness."

Offline BlacklistedTopic starter

  • Jr. Member
  • **
  • Posts: 75
  • Activity:
    0%
  • Reputation Power: 2
  • Blacklisted has no influence.
  • Respect: +13
  • Referrals: 0
    • View Profile
Re: Rail Problem
« Reply #2 on: August 16, 2011, 08:00:26 AM »
0
Thanks for replying:)
will give it a bash tonight and let you know how it goes.

Tags: