Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/iano/public_html/tpforums-vb5/forum/includes/class_core.php on line 5842

PHP Warning: Use of undefined constant MYSQL_NUM - assumed 'MYSQL_NUM' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: Use of undefined constant MYSQL_ASSOC - assumed 'MYSQL_ASSOC' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: Use of undefined constant MYSQL_BOTH - assumed 'MYSQL_BOTH' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in ..../includes/functions_navigation.php on line 588

PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in ..../includes/functions_navigation.php on line 612

PHP Warning: Use of undefined constant misc - assumed 'misc' (this will throw an Error in a future version of PHP) in ..../global.php(29) : eval()'d code(6) : eval()'d code on line 1

PHP Warning: Use of undefined constant index - assumed 'index' (this will throw an Error in a future version of PHP) in ..../global.php(29) : eval()'d code(6) : eval()'d code on line 1

PHP Warning: Use of undefined constant misc - assumed 'misc' (this will throw an Error in a future version of PHP) in ..../includes/class_bootstrap.php(1422) : eval()'d code(4) : eval()'d code on line 1

PHP Warning: Use of undefined constant index - assumed 'index' (this will throw an Error in a future version of PHP) in ..../includes/class_bootstrap.php(1422) : eval()'d code(4) : eval()'d code on line 1

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6
Help me please
Results 1 to 5 of 5

Thread: Help me please

  1. #1
    Junior Member
    Join Date
    Aug 2012
    Posts
    25

    Help me please

    Hello,
    My walker works fine, my targeter aswell.
    The only problem is that, it doesn't stand still when a monster is on the screen.

    So i tried this one:
    Code:
    For Each monster As Creature In c.BattleList.GetCreatures
                    If monster.IsReachable Then
                        walkStop = True
    But, it still doesn't work...
    Any ideas?

    Umbled,

  2. #2

    RE: Help me please

    For Each monster As Creature In c.BattleList.GetCreatures
    If monster.IsReachable Then
    TimerName.Stop = True
    else
    TimerWalker.Start = True

  3. #3
    Junior Member
    Join Date
    Aug 2012
    Posts
    25

    RE: Help me please

    Quote Originally Posted by taylor
    For Each monster As Creature In c.BattleList.GetCreatures
    If monster.IsReachable Then
    TimerName.Stop = True
    else
    TimerWalker.Start = True
    That wouldn't work for me, since im using different forms.

  4. #4
    Junior Member
    Join Date
    Aug 2012
    Posts
    25

    RE: Help me please

    Any ideas?

  5. #5

    RE: Help me please

    [code=C#]For Each monster As Creature In c.BattleList.GetCreatures
    If monster.IsReachable Then
    WalkStop = False
    else
    WalkStop = True[/code]

    Maybe looks a little confusing as I'd personally name it "WalkStart" instead of "WalkStop". Becuase if 'WalkStop = False' that means the Timer will be set to Disabled (look code below). 'WalkStart = False' looks better imo though :P But you do as you want ^^

    And here is WalkStop

    [code=C#]
    Public WriteOnly Property WalkStop() As Boolean
    Set
    Me.Invoke(DirectCast(Sub() Me.TIMERNAME.Enabled = value, MethodInvoker))
    End Set
    End Property[/code]

    TIMERNAME = your timer to stop/start walk

    That allows you to control the timer via another form or thread.
    Not sure if that's right as I translated from C#.

    Here's your WalkStop in C#
    [code=C#]
    public bool WalkStop
    {
    set
    {
    this.Invoke((MethodInvoker)delegate
    {
    this.TIMERNAME.Enabled = value;
    });
    }
    }
    [/code]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •